[getdns-api] async comments (0.268)

William Chan (陈智昌) willchan at chromium.org
Wed Feb 6 11:51:10 MST 2013


On Thu, Feb 7, 2013 at 3:46 AM, Dan Winship <dan.winship at gmail.com> wrote:
> On 02/05/2013 11:52 PM, Paul Hoffman wrote:
>> On Feb 5, 2013, at 8:27 PM, Dan Winship <dan.winship at gmail.com> wrote:
>>> In the short term, you might be able to hardcode the behavior of
>>> getaddrinfo() on specific releases of specific OSes that you care about,
>>> but that doesn't seem like a plausible long-term solution. (None of the
>>> other async DNS libraries have managed to achieve this, why would getdns
>>> be any different?)
>>
>> I'll take Wil's word for it being possible (because they have done it) over yours that it isn't. :-)
>
> AFAICT, they have a resolver that gets the same DNS results as the
> system getaddrinfo() would, but does not attempt to handle non-DNS sources.

No, we handle non-DNS sources. That was an explicit requirement of
ours, and yet another reason why it was such a PITA and why we didn't
want to do it.

>
>>> I want exactly (b). (And I don't think (d) would actually work, at all.)
>>
>> Hrm. You went from (d) being "it will take a bunch of ugly #defines" to it not working at all.
>
> I mean that I don't think plan (d) would lead to a world where the
> majority of developers who wanted to use an async DNS library could
> expect to find an implementation of getdns() that gives roughly the same
> results as getaddrinfo() on their platform of choice and integrates
> with their event library of choice.
>
>>> So if there's an API that
>>> lets getdns tell the local event loop what fds it cares about, then that
>>> would let it integrate with libevent, libuv, GLib, Qt, Twisted, etc.
>>
>> If I read you correctly, I agree. Do you think that should be part of this API? If so, please sketch out what it would take.
>
> That's what the API I suggested in my first message was
> (getdns_context_set_event_loop() and all that).
>
> I'm attaching a more concrete sketch of how it could work....
>
> -- Dan
>
> _______________________________________________
> getdns-api mailing list
> getdns-api at vpnc.org
>


More information about the getdns-api mailing list