Jump to content
  • Advertisement
Sign in to follow this  
nfries88

best non-blocking I/O library?

This topic is 2829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm looking for a portable non-blocking I/O library upon which to build a portable distributed programming framework (similar to OTP).

libtorque looks great, but it's very young and only available on FreeBSD 7.1+ and Linux 2.6+. It operates on such a low level that porting must be a painful task, too.

libevent2 sounds good, but libevent1.x doesn't support IOCP on Windows; making it unfavorable. Also, it doesn't appear that libevent2 is a stable release yet. Does anyone know if libevent2 is ready for production use?

I'm not finding a ton of information on libev or liboop.

I'm already familiar with boost.asio from a previous project, and when we converted our networking model to use it we got an impressive performance improvement on Windows (pretty good on Linux too). However, I'm not actually fond of the API.

I might be missing some. What are people's personal experiences with these libraries? Scalability and performance are essential, for me; but full support on the big 3 (Windows, Linux, OS X) are also very important.

Share this post


Link to post
Share on other sites
Advertisement

I might be missing some. What are people's personal experiences with these libraries? Scalability and performance are essential, for me; but full support on the big 3 (Windows, Linux, OS X) are also very important.


If you want to go C/C++, your options really are:
1) Some version of libevent. If you need to improve Windows support, you may have to do it yourself and contribute back.
2) Boost::Asio
3) Roll your own abstraction.

Personally, I'd probably use Boost in this case. You don't need to be "fond" of an API to use it, as long as it is robust and performs well for the cases that matter to you!

Share this post


Link to post
Share on other sites

[quote name='nfries88' timestamp='1299362028' post='4782219']
I might be missing some. What are people's personal experiences with these libraries? Scalability and performance are essential, for me; but full support on the big 3 (Windows, Linux, OS X) are also very important.


If you want to go C/C++, your options really are:
1) Some version of libevent. If you need to improve Windows support, you may have to do it yourself and contribute back.
2) Boost::Asio
3) Roll your own abstraction.

Personally, I'd probably use Boost in this case. You don't need to be "fond" of an API to use it, as long as it is robust and performs well for the cases that matter to you!
[/quote]

I ran into some trouble with libevent2 and decided to use boost.asio instead. Aside for being unable to stop the io_service and being unable to use the io_service for dispatching and scheduling events without crashing (https://svn.boost.org/trac/boost/ticket/5311), I've got it working fine.

Share this post


Link to post
Share on other sites

I ran into some trouble with libevent2 and decided to use boost.asio instead. Aside for being unable to stop the io_service and being unable to use the io_service for dispatching and scheduling events without crashing (https://svn.boost.or...ost/ticket/5311), I've got it working fine.


c0000005 is buffer overrun. There's no example source code, but are you sure you got the memory set up properly? The async model can be slightly tricky and asio may make it more obscure than it could be.

I've used io_service as generic async dispatcher without the network part with no problems even in earliest versions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!