In an effort to gain a wider audience for my blog I have been pimping it a little lately. I've posted comments to a few popular blogs I read. I've made some in-links accessable from my blog. I've joined technorati. I've even gotten around to moving my bookmarks to del.icio.us as another marketing scam.
I recieved my first email in quite some time over the blog last night, regarding the possibility of using SRV DNS records to handle ad hoc services. On first glance the definition of service assumed in the RFC has a different emphasis to the definition I would use. It seems that they would call http a service, whereas I would tend to think of it as a protocol. I would see something like myname_sqlite as a service, in this case one to look through the files of user "myname" and treat them all as sqlite databases to support SQL query.
The difference in emphasis may be inconsequential, however, if I can work out how to use this kind of lookup in a URI. I would prefer to use "http://localhost:myname_sqlite/mydb?myquery" (which as I mentioned previously is not a valid URI because it has non-digit port content) over "myname_sqlite://localhost/mydb?myquery" for obvious reasons. I want clients to understand which protocol to speak when they get to the relevant port. So far in my brief browsing I haven't found a definitive resource. Does my URI become "http://_myname_sqlite._tcp.localhost/mydb?myquery"? I'll have to look into this further. If a defined relationship does exist this may reinvigourate DNS in the small network environment for me, where NIS and LDAP rule alongside their more literal /etc/hosts and /etc/services file counterparts. I'll also have to look into the libc apis for this again. At first glance, this port information does not appear to be available from getaddrinfo(3).
Anyway, back to the pimping. The gentleman who contacted me appears to be a SLUG member. I've put a planet SLUG entry into my liferea feeds list to see what other interesting folk I might stumble across. This lead me to also look into Linux Australia's planet and wonder if I might be advised to request membership.
Surprisingly to me, I found I was already a member :) I must have missed that memo, as all planet HUMBUG members seem to have made their way there. I'm pleased at the outcome but a little but put off by my lack of fore-knowledge.
Anyway, off to do more pimping...
Update:
On second reading of the gentleman's email, I notice that the URI scheme
would just be a matter of host aliasing. My sample URIs above could be made
to look like
"http://sqlite.myname.localhost/mydb?myquery"
in combination with the DNS record
_http._tcp.sqlite.myname.localhost. IN SRV 0 0 1717 localhost.
Very nice, indeed. With a dynamic edit of bind's configuration at application
start-up it should be possible to access these ad hoc services in an entirely
appropriate and convenient manner. Compliant clients would resolve their http
URI to port 1717 of host 127.0.0.1. So long as the DNS changes can be propagated
to relevant clients (and remember we're talking about a small network situation
here) we should be able to access services fairly reliably.
Benjamin

