I have started working on a server project. The server is being developped in C++ and will have to work on Windows and eventually on Solaris but we're focusing on Windows for now.
The server is basically some sort of proxy server that will use a home protocol to provide access to the data (database and file transfer) for applications. It will have to service a few hundreds clients.
I have read that, in order to scale, we should use asynchronous I/O. On windows platform, it means using I/O completion. For what i understant about it, evey time the server receives a connection it registers it to an I/O completion port "object". Then you can have a certain number of threads sitting on calls to
GetQueuedCompletionStatus which will wake the threads when an I/O operation completes. I am wrong ?
So, i will need a pool of threads to manage the I/O completion operations. I will likely need another pool to process the queries in order to keep the I/O from blocking for too long,
I was looking at the Win32 threadpool api. At a first glance, it doesn't seem too bad but is it really something i should use ? It seems like the threadpool api is also capable of handling I/O completion.
Also, does anyone have a good reference on I/O completion port ?