13

I am looking to write a server application in C++ that is meant to handle tens of thousands of clients simultaneously. It should run under Windows and Linux. I have been looking around for frameworks and libraries and have come across Boost Asio, which seems like a highly mature and widely used alternative. I just have trouble wrapping my head around strands/thread pools, mainly because of the millions of templates. My background is mainly in C, so am not really used to the template mess that Boost in general seems to be full of. I tried to find someone to develop a relatively thin wrapper around Boost Asio that would take care of the threading/synchronization aspect using strands, bind and the like, but have been unable to find someone yet who can do it within my budget (2 or 300 US dollars).

Can any of you recommend any other libraries that scale as well as Boost Asio (e.g. with IOCP on Windows and epoll on Linux etc), or a source where I might find skilled Boost developers looking for smaller freelance jobs?

Thanks very much in advance for any help.

Kind regards,

Philip Bennefall

NmdMystery
  • 2,778
  • 3
  • 32
  • 60
Philip Bennefall
  • 1,477
  • 5
  • 20
  • 33

4 Answers4

11

Best 4 choices i know

I really like zeromq.. but libuv seems interesting.. (libev and libevent are very nice too)

Adi Shavit
  • 16,743
  • 5
  • 67
  • 137
Felipe Cruz
  • 940
  • 5
  • 14
4

ACE is the framework you are looking for. Even boost Asio is just an implementation of Proactor pattern, which was introduced by Douglas C. Schmidt. He is best known as the author of POSA Vol.2 and the creator of ACE framework.

The Boost.Asio library offers side-by-side support for synchronous and asynchronous operations ... based on the Proactor design pattern [POSA2].

Although it is a cross-platform C++ network framework and uses template, just simple template is used. (or not at all)

My background is mainly in C, too, and I don't like Boost's massive template-programming style. However, ACE wasn't like that.

ddoman
  • 1,051
  • 1
  • 10
  • 12
  • My opinion of ACE is just for research network programming. Not for production use. – Magic Feb 10 '12 at 07:08
  • 3
    ACE is horribly written, the most confusing networking framework I've ever worked with. – expert Sep 22 '12 at 06:45
  • 3
    Ermm - agreed - ACE is fairly kludgy by modern standards, but please dont be too harsh on it. ACE evolved in a period before c++ compilers were even remotely standards compliant - hence the kludge. And there are tons of telcos out there running ACE based servers. That said - it's time in the sun is about done. – quixver Feb 19 '13 at 22:05
3

Try libevent on for size. Its whole raison d'etre is to address the C10K problem. I'd say it's probably more lightweight than boost.

Chris Eberle
  • 47,994
  • 12
  • 82
  • 119
  • Not like I care terrifically, but would the downvoter care to explain why he / she disagrees? – Chris Eberle Jul 15 '11 at 04:27
  • Thanks for the suggestion Chris. I've looked into the library and it seems interesting for sure. I'll start hacking on this. Thanks! – Philip Bennefall Jul 15 '11 at 13:32
  • The problem for me is that I am using a so called screen reader because I am blind, and for some reason I am not able to invoke the accept answer command. It just appears as normal text, rather than a link or button or even a clickable area. So while I certainly would accept answers if I could, I currently do not know how. – Philip Bennefall Jul 15 '11 at 20:46
  • 1
    Very interesting, that may be something to post to http://meta.stackoverflow.com/. I'm sure you're not the only one with this problem. – Chris Eberle Jul 15 '11 at 20:55
0

Try Pulsar Server Framework. Main benefit is it is built over libuv network library (used by node.js) that uses asynchronous I/O based on event loops.

  1. It’s perfectly scalable. You can just go adding servers as your user base increases.

  2. It is designed to work with server farm.

  3. Highly configurable and easy to use

Currently it has been built for Windows x64 server.

Atul
  • 3,778
  • 5
  • 47
  • 87