Active application socket management
OwnerPaul G. Joseph, Sanjeev Nandan +2inventors
InventorsPaul G. Joseph, Sanjeev Nandan, Suyash K. Apte, Deepa Saini
Life of this patent
Estimating the term…
Abstract
Methods and systems are disclosed that effectively manage sockets in client-to-server connections at the application level to enhance the availability of sockets by timely closing idle sockets. This reduces the role of the TCP-level management to a single listen thread on a listen socket. Connected sockets are placed into the application's socket pool that is managed by a configurable number of worker threads. The proposed methods and systems are intended to prevent a situation where many connections are opened, thereby using all the network memory on the machine.
Claims12
A method for managing socket allocation in a client-server system, comprising:
- (a) providing a listener thread for monitoring connection requests to the server;
- (b) the listener thread receiving a connection request and providing a socket for said connection request;
- (c) the listener thread placing said socket in a socket pool;
- (d) providing a plurality of worker threads monitoring said socket pool;
- (e) a worker thread removing said socket from the socket pool and reading data transmitted on said socket between the client and the server;
- (f) the worker thread returning said socket to the socket pool;
- and
- (g) if additional data is received on said returned socket before expiration of a configurable time period, returning to step (e);
- and
- (h) if no additional data is received on said returned socket before expiration of the configurable time period, the worker thread closing said socket.
A computer system for use in managing socket allocation in a client-server environment, comprising computer instructions for:
- (a) providing a listener thread for monitoring connection requests to the server;
- (b) causing the listener thread to provide a socket when the listener thread receives said connection request;
- (c) causing the listener thread to place said socket in a socket pool;
- (d) providing a plurality of worker threads monitoring said socket pool;
- (e) causing a worker thread to remove said socket from the socket pool and read data transmitted on said socket between the client and the server;
- (f) causing the worker thread to return said socket to the socket pool;
- and
- (g) if additional data is received on said returned socket before expiration of a configurable time period, returning to step (e);
- and
- (h) if no additional data is received on said returned socket before expiration of the configurable time period, causing the worker thread to close said socket.
A computer-readable medium storing a computer program executable by at least one server computer, the computer program comprising computer instructions for:
- (a) providing a listener thread for monitoring connection requests to the server;
- (b) causing the listener thread to provide a socket when the listener thread receives said connection request;
- (c) causing the listener thread to place said socket in a socket pool;
- (d) providing a plurality of worker threads monitoring said socket pool;
- (e) causing a worker thread to remove said socket from the socket pool and read data transmitted on said socket between the client and the server;
- (f) causing the worker thread to return said socket to the socket pool;
- and
- (g) if additional data is received on said returned socket before expiration of a configurable time period, returning to step (e);
- and
- (h) if no additional data is received on said returned socket before expiration of the configurable time period, causing the worker thread to close said socket.
Dependencies are inferred from the claim text.