Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [iot-pmc] libuv, libevent and alternatives

Hi Jens,

Thanks, I think this is worth discussing further - I'm not sure what
the best course of action is right now.

There is some support for IOCP in libevent, but if you read a bit
further in the document you see

" Unfortunately, the main Windows backend is still select()-based: from
  testing the IOCP backends on the mailing list, it seems that there isn't
  actually a way to tell for certain whether a socket is writable with IOCP.
  Libevent 2.1 may add a multithreaded WaitForMultipleEvents-based
  backend for better performance with many inactive sockets and better
  integration with Windows events."

So the network code doesn't use IOCP.

The in-progress "what's new" document for 2.1 makes no mention of
IOCP: https://raw.githubusercontent.com/libevent/libevent/master/whatsnew-2.1.txt

Using select() on Windows limits you to 64 sockets unless you override
the size of FD_SETSIZE. I believe that libevent does do this, so an
arbitrarily large number of sockets can be supported, but performance
will be very poor if you have to iterate over a large number of
sockets after every call to select() (or poll()). epoll and IOCP are
designed to get around these problems.

libevent 2.1 has been under development for over two years already. I
don't have much faith that it will be released (with or without socket
IOCP) any time soon.

On the libuv front, I received a reply that is worth reading:
https://github.com/joyent/libuv/issues/1536 The node project is now
moving to open governance and I take that as a positive point,
although whether it will result in the change that we want in a
reasonable time frame is of course not something that can be
predicted.

Regards,

Roger



On Tue, Nov 4, 2014 at 8:27 AM, Jens Reimann
<jens.reimann@xxxxxxxxxxxxxxx> wrote:
> Hi,
>
> I was just stumbling over the situation at CQ8709 for libuv. Now I don't
> want to start a discussion whether or not to use it! If you want it,
> take it!
>
> However I would like to understand the reasons and maybe find possible
> alternatives for portable asynchronous network IO for C.
>
> As far as I remember Roger said something about issues with sockets on
> Win32 with libevent.
>
> I also stumbled over [1] which mentions that libevent2 has support for
> Windows IOCP. Which should do the trick?!
>
> So maybe every one who is interested should throw in a few more ideas.
> Or event better, some facts ;-)
>
> Jens
>
> [1]
> https://raw.githubusercontent.com/libevent/libevent/patches-2.0/whatsnew-2.0.txt
> - Section 3.3
>
> _______________________________________________
> iot-pmc mailing list
> iot-pmc@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/iot-pmc


Back to the top