Class TThreadedSelectorServer


public class TThreadedSelectorServer extends AbstractNonblockingServer
A Half-Sync/Half-Async server with a separate pool of threads to handle non-blocking I/O. Accepts are handled on a single thread, and a configurable number of nonblocking selector threads manage reading and writing of client connections. A synchronous worker thread pool handles processing of requests.

Performs better than TNonblockingServer/THsHaServer in multi-core environments when the bottleneck is CPU on the single selector thread handling I/O. In addition, because the accept handling is decoupled from reads/writes and invocation, the server has better ability to handle back-pressure from new connections (e.g. stop accepting when busy).

Like TNonblockingServer, it relies on the use of TFramedTransport.