I want to use I/O Completion ports for Windows and Asynchronous I/O (AIO) for solaris and Linux versions of my server application. The application server is multithreaded and it can a开发者_Go百科ccept lot of concurrent TCP connections and can process many requests per conenction. Is this criteria well enough to use the latest AIO?. Is there any standardization using which one code can be used to all platforms.
Thanks, Naga
Every request will be handled by seperate detached thread.
That's not how I/O Completion Ports work on Windows... They allow you to use a very small number of threads to process vast amounts of I/O.
For example, here: http://www.lenholgate.com/blog/2005/10/the-64000-connection-question.html I talk about handling 64,000 concurrent active TCP connections with around 4 threads...
For Linux I expect the route to take is to use libevent.
For cross platform someone is sure to suggest ASIO.
精彩评论