With my pedantic hat on, we're using the "c-ares" fork of ares, but
the original ares is dead anyway. I don't think we have any issues
with the library, but if you are considering using a library such as
c-ares, please be aware that there are other choices that might better
suit your needs.
We were looking into asynchronous libraries in SSSD as pretty much all
processing we do, we try to perform asynchronously for performance
reasons. The two we were considering in the end were c-ares and
libasyncns, other projects seem to be either dead (adns) or limited
(udns, getaddrinfo_a).
There is a fundamental difference between the two:
c-ares is a standalone resolver that does everything on its own using
low-level async I/O. The drawback is that it doesn't tie into glibc
stack, so it can only handle two databases now - /etc/hosts and DNS.
So if you plan on using mdns, for example, you'd have to implement the
support yourself.
libasyncns is a wrapper around otherwise blocking calls which are
spawned in worker threads. If I understand correctly, there were even
plans to integrate it into GLib, not sure what is the status.
We chose c-ares mainly on the grounds of "there shall be no threads in
SSSD" design decision.
On Mon, Feb 28, 2011 at 10:31 PM, Adam Stokes <ajs(a)redhat.com> wrote:
Awesome thanks so much Jakub. I'm reading those usage rules now.
Lastly I see you guys are using the ares library, is this something that should be
considered with Matahari and have you guys run into any blocking issues with the library
in particular?
Thanks!
----- Original Message -----
> Hi,
>
> This looks fine (visually, haven't tested) although the code does not
> seem to implement "Usage Rules" of RFC 2782 (pages 5,6 of
>
http://www.ietf.org/rfc/rfc2782.txt)
>
> We've been down this route in SSSD couple of months back, so feel free
> to check out
>
https://fedorahosted.org/sssd/browser/src/resolv/async_resolv.c
> The three last functions could be of interest -
> resolv_sort_srv_reply(), reply_weight_rearrange() and
> reply_priority_sort().
>
> Hope this helps,
> Jakub
--
__ __
.-----.| |_.-----.| |--.-----.-----.
|__ --|| _| _ || <| -__|__ --|
|_____||____|_____||__|__|_____|_____|
.----------------------------------.
( ajs(a)redhat.com || 919.754.4187 )
`----------------------------------'