开发者

Multithreaded comet server library

I'm looking for multithreaded comet server library - what I need is async io (using epoll) working on a threadpool (4-8 threads). Tornado would be ideal if it was multithreaded.

Why multithreaded? I need to process and serve data which could come from every connected user - it could be synchronised between tornado instances using database but even nosql would be too big slowdown - almost every request would end up with database write/update - which even by using async drivers isn't a good idea. I can store everything in local volataile memory so it can be very fast - but must be run on 开发者_开发知识库single process to avoid inter-process communication. I don't need to scale - single box is enough - but it MUST be fast. Some data will be stored in MongoDB - but number of mongo queries will be like 5% of normal requests.

And important thing - semaphores (and other higher level approaches) are not rocket science for me so I'm not afraid of synchronisation.

Requirements:

  • async io
  • non-blocking
  • thousands of concurrent connections
  • FAST
  • basic HTTP features (GET, POST, cookies)
  • ability to process request asynchronously (do something, async call with callback (ex. database query), process callback, return data)
  • thread pool
  • C++/Java/Python
  • simple and lightweight

It would be nice to have async mongo driver too

I've looked into Boost ASIO and it seems to be capable of doing what I need - but I want to focus on application - not writing http request processing.

I've read about Tornado (seems ideal but is single threaded), Simple (not sure if it can process request asynchronously and return data after async call), BOOST ASIO (very nice, but too low-level)


Well, after more digging I decided to change technology... I decided to create my own protocol on top of TCP and Netty

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜