High Level Block Diagram

The high level blocks is as below:

The goal of the library is to provide a highly scalable and highly performance server library that can be used to create servers such as chat server, http server etc. MS asynchronous sockets creates a new thread for every connection or data that comes in which does not provide a way to control the resources utilized at any given time. Hence the library does not use the asynchronous socket functionality provided by the MS layer. It uses the “Select” functionality to check for availability of data in the multiple sockets and distributes work to a set of predefined threads.

A Selector layer is present over the existing ASP.NET’s socket layer. This will define two types of Channels a Server Channel and a Client Channel. The Server Channel allows the socket to listen and accept connections, while the Client socket is created by the Server channel for every connection received and allows for sending and receiving data. A Selector is defined that monitors multiple Client Sockets for Read and Write operations.

A Channel streaming layer is present over this, which will allow multiple connections to be distributed across a pool of workers. All data received and sent is streamed through a pipeline up and down. This layer allows the various handlers in the pipeline to be executed synchronously or asynchronously. It provides standard handlers that can help reading messages and persisting them in the database (Persistence is currently in development).

A utilities layer is developed that will provide small utility functions such as a lock free list that can work with multiple threads, a thread pool implementation, a pipeline implementation etc that can be used outside the library if necessary.

Last edited Jan 17, 2011 at 2:57 PM by rsankarx, version 2


No comments yet.