httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <p...@querna.org>
Subject Re: apr_pollcb
Date Thu, 12 Mar 2015 22:49:23 GMT
right, libuv[1] is a good example of an IO completion API[2] that works
across both epoll/kqueue and IOCP.  There have been a couple offhand
discussions about libuv on httpd-dev, but no one is clamoring for adoption.

APR currently has no such abstraction.

pollcb was added to provide a polling API that was lock free, allowed
cross-thread addition and didn't keep extra data structures around for N
sockets under management.  (this contrasts to APR's pollset which has
locks, uses a couple RINGs of structures to keep track of things, etc)


[1] - https://github.com/libuv/libuv
[2] - http://nikhilm.github.io/uvbook/filesystem.html#buffers-and-streams


On Thu, Mar 12, 2015 at 3:40 PM, Ivan Zhakov <ivan@visualsvn.com> wrote:

> On 9 March 2015 at 20:04, Jim Jagielski <jim@jagunet.com> wrote:
> > As far as I can tell, there are no real consumers of apr_pollcb_*()
> > other than Motorz (and Simple)... Not sure, but it looks like the
> > pollcb stuff may be lagging, since I'm getting some weird behavior
> > when using that impl. So I'll likely be moving Motorz off of
> > pollcb and use the "traditional" impl which has been proven in
> > Event.
> >
>
> I'd like to share some thoughts about pollcb as Windows developer.
> Most efficient way to handle a lot of connections on Windows is I/O
> completion ports  (IOCP). They are like epoll, but different. Here is
> good writeup about difference [1]. In short: IOCP provides
> notification when I/O completes, while epoll provides notifications
> when socket is ready to perform I/O operation. It would require
> additional buffer to implement pollcb using IOCP on Windows. Or
> APR/HTTPD should have different abstraction that is responsible for
> I/O and waiting for completion.
>
> [1]
> http://www.ulduzsoft.com/2014/01/practical-difference-between-epoll-and-windows-io-completion-ports-iocp/
>
> --
> Ivan Zhakov
>

Mime
View raw message