I'm looking for some code to crib that'll give me an event-driven (non-blocking) DNS resolver, preferably one that caches. I've looked at the BSD bind resolver, but it is is process-based, and blocks while waiting for a reply.
A couple of suggestions:
1) A better place to look or ask might be news:comp.protocols.domains.
I'd probably say that this is slightly off topic for NANOG. If
you don't have a news server (or even if you do) you may want to
use dejanews (http://www.dejanews.com) to search for asyncronous
resolver or non-blocking resolver. I just tried this and although
there isn't many hits, some of them do look interesting. If you can't
find anything, post a message after looking at suggestion #2.
2) In the current bind-contrib distribution, there is at least one
asynchronous library. The directory name in my bind 8.1.1 distrib is
arlib. There may be more than one, but I didn't look very hard. I
personally haven't used this code, but the majority of the code in the
contrib stuff is pretty good.
3) If the above doesn't work, and you're willing to pay someone to write
something for you, I'd drop a note to Paul Vixie or someone else at
the isc about the possibility of you paying them to write the code.
Hope this helps.
- Forrest W. Christian (forrestc@imach.com)