Version 7 of The DNS blocking problem

Updated 2003-02-06 14:23:34

[ DNS non-portability non-resolution ...]

[DJB implementation: http://cr.yp.to/ ]

See also the very new "dns" module in tcllib, by Pat Thoyts.

[PT] 06Feb03: I wonder if instead of using the c library resolver we should have Tcl link to an independent asynchronous DNS resolver - perhaps ares [L1 ] (which has an MIT license). It should be possible to convert all gethostbyname() calls to do then equivalent of

   async_gethostbyname(..., dns_callback_func);
   wait_with_events();

which would deal with the main problem Tk applications have of freezing during bad DNS lookups.

Obviously this needs a fair bit more investigation first - like what does browsex do? Does Tmn fix this already? Does it work for unix/win32/mac?


DKF - The problem is that DNS is not the only way of resolving host names to IP addresses. I've also seen NIS+ and LDAP used for this purpose, and there's also hosts files to think about. Plus it is a really good idea to follow the local policy on this matter, as that is sometimes set for technical reasons. To cut a long story short, there's a great deal more complexity here than you might naively expect.

So what? Well, the problem is that the library call that interfaces to all this (gethostbyname()) is synchronous, and way too complex for us to safely make assumptions about it (I know that the configuration file for this on Solaris is not actually a config file, but a Shared Library to load for the purpose.) This sucks. This sucks a lot. The only ways to do asynchronous name resolution on UNIX are to use a separate thread or a separate process.

NEM - I believe BrowseX takes this route. IIRC, it has a separate executable to do the DNS stuff which it execs in the background.


[ Category Internet ]