Re: (DNS) draft wording for W.G. review.
hallam@w3.org
Wed, 27 Mar 96 14:08:11 -0500
>- dns is a real performance pain
>- gethostbyname call doesn't give you ttl information back
> So, if a ttl info is needed, you have to basicially integrate all
> resolver code, talking udp to DNS server. Also server selection, timing out,
> exponential back off and all that. Basically, it is a integration of the
whole
> BIND into client/server.
Gethostbyname is not rocket science. Its a few UDP calls and a bit of unpacking.
It should not be very hard. I wrote an interface in a couple of days.
Not using the Berkley interface is an obvious thing to do to improve performance
if you do not have threads. It is a bit sad that Netscape hangs while waiting to
do a dns lookup.
I don't think we should restrict the spec on the basis of an inadequate API to
what is only a few lines of code. The complexity of BIND lies in the server not
in the client. Anwat's post pretty much describes what one has to do.
Note that there are some platforms where it is difficult to interface directly
to the bind daemon because someone has tried some half baked optimisations. I
remember when we used to ship libwww with two versions of code, one for the
people using the O/S version and the other (and by far the more widely used)
which used a direct interface to dns. I don't know whether that is still an
issue.
If people like I will post the code [just don't clutter the list with requests
or JG will be upset]. It may requires some tweaks since I use a garbage
collector and a few layers of macros, I think its only about 100 lines of code
though].
Phill