Browse Prior Art Database

Method to Optimize Socket Connection Management

IP.com Disclosure Number: IPCOM000237357D
Publication Date: 2014-Jun-16
Document File: 4 page(s) / 60K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method will be introduced which will do more negotiation during socket connection to make client and server understand each other’ s behavior, and avoid error or function broken during communication.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 01 of 4

Method to Optimize Socket Connection Management

There are kinds of servers that provide kinds of services, and there are kinds of clients that connect to these servers to get information. Both clients and servers have their own configuration and settings, and most times these configurations and settings are mismatched and even conflict with each other which causes all kinds of issues. An example is when a client has 1 minute as idle timeout but server has 30 seconds idle timeout, then when the client tries to communicate with server after 45 seconds it will fail as server has closed the socket which make the socket half closed and the client side has no knowledge of what server side has done , which causes client side logic to fail and unnecessary data transferred between client and server.

In this invention, a method will be introduced which will do more negotiation during socket connection to make client and server understand each other's behavior, and avoid error or function broken during communication.

There is one more negotiation process introduced after a socket is connected. In this negotiation process, client and server will exchange kinds of configuration and setting data which will help client and server to understand each other and avoid errors and failures in advance like the connection idle timeout, the read timeout, the maximum connections and so on.

In this way, there are kinds of errors that can be avoided to improve the program robustness and performance. Take two examples:


1. Client knows the server idle timeout, and it will re-initiate the connection if the socket connection has exceeded the server side idle timeout limit to avoid unexpected exception. And server knows client will not initiate any query after idle timeout; it can close the socket to release the resource for future reuse.


2. Server knows the client timeout, and if client has not read all the data within the client read timeout, server can clear current data exchange, and wait for the next request to avoid the data mixing and probable error.

Then the application robustness and performance is improved as error calls and unneeded connection retries are avoided , also communication efficiency between server side and client side is improved. The known issues like half closed sockets which cause lots of EOF errors and unnecessary network data can be avoided. Server side can release unneeded connections in time to allow more connections which improve...