Re: libuv example
Gisle Vanem gvanem_at_broadpark.no wrote: Clemens Gruber clemens.gruber_at_pqgruber.com wrote: I am sure many of you are aware that libev and libevent only support select()/poll() on Windows, but not the nice and much faster IO Completion Ports API. libevent as used in the Tor-project and others has used IOCP for some time now. Since ver 2.0? Ref: http://sourceforge.net/projects/levent/ http://sourceforge.net/scm/?type=gitgroup_id=50884source=navbar Would be nice to see how libuv compares to libevent. --gv Hi, sorry to reply that late. The libevent NEWS for 2.0 state: 3.3. Windows: better support for everything Bufferevents on Windows can use a new mechanism (off-by-default; see below) to send their data via Windows overlapped IO and get their notifications via the IOCP API. This should be much faster than using event-based notification. (...) 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. But unfortunately in the 2.1 NEWS, I did not find anything related to the backend. Maybe they delayed it. Therefore I assume, libuv still has better support on Windows. Please correct me if I am wrong. I would really like to see a benchmark between those two. If I have time, I'll try to set one up. Best regards, Clemens --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: libuv example
Clemens Gruber clemens.gru...@pqgruber.com wrote: I am sure many of you are aware that libev and libevent only support select()/poll() on Windows, but not the nice and much faster IO Completion Ports API. libevent as used in the Tor-project and others has used IOCP for some time now. Since ver 2.0? Ref: http://sourceforge.net/projects/levent/ http://sourceforge.net/scm/?type=gitgroup_id=50884source=navbar Would be nice to see how libuv compares to libevent. --gv --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
libuv example
Hi, I am sure many of you are aware that libev and libevent only support select()/poll() on Windows, but not the nice and much faster IO Completion Ports API. Luckily, the guys from Node.js made a library called libuv. It should be equally fast on unixes (uses epoll/kqueue/etc like libev/libevent) but it should be MUCH faster on Windows due to libuv's usage of IO completion ports. Could come in handy if you have to manage several hundreds or thousands of connections! Benchmarks would be very interesting. I just updated an example for uvbook, to show how to integrate libuv with libcurl. (Using the multi interface) Maybe the following code example would also be an interesting one for the curl homepage? If you agree, I will create a pull request on Github. Then we could improve it further. What do you think? Here is the code: https://gist.github.com/clemensg/5248927 Best regards, Clemens --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: libuv example
On Tue, 26 Mar 2013, Clemens Gruber wrote: Maybe the following code example would also be an interesting one for the curl homepage? If you agree, I will create a pull request on Github. Then we could improve it further. What do you think? Sounds excellent! I'd love to add a libuv example to our set. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html