On 13. 7. 25 12:40, Graham Leggett wrote:
On 12 Jul 2025, at 22:27, Branko Čibej <br...@apache.org> wrote:

So, years ago, around the time I was adding the OCSP verification bits to Serf, I integrated Serf into a system that used libdispatch. Libdispatch does not like blocking code, at all, so Serf was close to being na ideal fit.

Except for DNS lookups, which are synchronous and blocking. This messed up the implementation quite a bit, especially with OCSP verification thrown in the mix.

So here I am, 10 years later, throwing this proposal in the mix: Let's make Serf truly asynchronous by getting rid of the blocking name resolver. By "getting rid of", I mean adding support for an asynchronous replacement such as, for example, c-ares. The real culprit is actually APR with its blocking resolver calls, but it shouldn't be too hard to work around that apr_sockaddr_info_get.

Thoughts? I'd be interested in putting in the work to make this happen. I would not be interested in implementing a DNS client in Serf.

Definite +1.

I had good results integrating unbound[1] into redwax-tool[2], which has an async element that triggers a DNS lookup that in turn triggers an SSL client connection. All of this is APR based.

I am keen to see APR(util) support platform independent async DNS, so that blocking DNS calls aren't the default everywhere.


Putting the async DNS bits into APR has also crossed my mind. It would certainly be more visible there than in Serf.

-- Brane



[1] https://github.com/NLnetLabs/unbound
[2] https://redwax.eu/rt/

Regards,
Graham
--

Reply via email to