[ntp:hackers] Asynch resolver

Brian Utterback brian.utterback at sun.com
Mon May 8 12:34:23 UTC 2006


Danny Mayer wrote:
> Brian Utterback wrote:
>> I think that we really need to be careful here. Does eventlib really
>> provide asynchronous naming services, even if it is not DNS in use? What
>> if the naming service is not reenterant or not idempotent? If eventlib
>> handles these issues via a managed thread, is it really doing so in
>> the same manner that a forked process would? If we start
>> using threads, we run into many of the same issues that we had with
>> signaled I/O, namely, as all of the operations used by ntpd thread-safe?
>>
>>  Danny Mayer wrote:
> 
> Eventlib has nothing to do with asynchronous naming services. It is a
> library that in effect acts like a multithreaded application library and
> allows you to create tasks to be executed in an asynchronous fashion. A
> DNS call then becomes a task (or event) to be executed. It gets rid of
> all of the select, poll, signal, etc. silliness and allows you to
> concentrate on the task to be accomplished. Eventlib is not currently
> multithreaded but could be made to be. There are other issues that get
> raised when you are multithreaded, principally locking.
> 
> Danny

If it is not threaded, then how can it possibly be used to implement
an async resolver? As you pointed out in your previous message, we
cannot assume that the host name resolution is being done by DNS.
Since library calls like getaddrinfo do not have a non-blocking
interface, we cannot use them asynchronously unless they are used
in either a separate thread or process.

-- 
blu

Rose are #FF0000, Violets are #0000FF. All my base are belong to you.
----------------------------------------------------------------------
Brian Utterback - OP/N1 RPE, Sun Microsystems, Inc.
Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom


More information about the hackers mailing list