

Number of them and if they all block then no socket IO will occur until they unblock. To maintain performance we need to make sure that the threads in the socket server's thread pool do not block, there are a finite Shrink without us keeping track of the IO operations associated with a particular worker thread and only allowing the thread to terminate when all IO This means that the socket server's thread pool cannot The threads in this poolĬannot be terminated whilst they have outstanding IO operations or the operations will be terminated. As we pointed out in the last article, all of our asynchronous socket IO is handled by the socket server's thread pool. To be able to handle variable load it's often useful to have a thread pool that can be expanded and contracted depending on the current load on the The scalability and performance of the server by moving potentially blocking work off into its own thread pool. This article continues to make the example server more usable in the real-world byĪdding a business logic thread pool to the server so that messages are processed by a thread that isn't part of the IO thread pool. Some slightly more real-world packet echo server and a fake POP3 server. We presented a series of simple examples, from the humble echo server through to Server class to make writing high performance socket based servers easy. In the previous article we designed a reusable socket Please browse the documentation and the rest of this site to learn more about The Server Framework.

#Logic world socket code#
The design and code of The Server Framework has moved on considerably since this article was written. Note: This article was originally published in 2002 and it refers to designs and code that form part of The Free Framework.
