The invention pertains to communication between multiple sockets within a communication network.
It may be applied to any process which receives messages or data from multiple sources via Internet communication networks and which operate using protocols such as TCP (“Transport Control Protocol”) or their equivalents.
Generally, a socket comprises a receive list that lists buffer memories containing the received data stream, and a send list that lists buffer memories containing the data streams to be send.
The receive lists and send lists are said to be “doubly linked” in that the buffer memories that constitute them each possess a structure comprising a “previous” pointer indicating the buffer memory that precedes the current buffer memory in the corresponding list, and a second “next” pointer indicating the buffer memory which follows the current buffer memory in the corresponding list.
With only one socket, the process may receive messages or data while waiting for them to arrive in said socket's receive list.
With multiple sockets, it is necessary to first execute a cyclical analysis of the receive lists to find the sockets which have received messages intended to be read.
Multiple known solutions, particularly those known as “select”, “poll”, “kqueue”, and “epoll” have been proposed to implement this analysis.
These known solutions are relatively satisfactory, but do not take into account the order in which the messages arrive, and involve an additional task.
The result is a significant degradation in network performance, with this degradation growing larger the more sockets need to be read, such as with more than 1000 sockets.
The invention mitigates this drawback.
It pertains to a communication device for communicating between multiple sockets within a communication network wherein each socket comprises a receive list listing the buffer memories that contain the received data stream, said buffer memories each having a structure comprising a “previous” pointer indicating the buffer memory which precedes the current buffer memory in the corresponding receive list, and a second “next” pointer indicating the buffer memory which follows the current buffer memory in the corresponding receive list.
According to one general definition of the invention, one of the sockets is designated to be capable of receiving the data stream received by each socket associated with a selected process,
said socket thereby designated further comprises an additional receive list listing buffer memories containing the data stream received by all of the sockets involved in a selected process, and
the buffer memories of each socket simultaneously belong to both receive lists, and each further comprise an additional “previous” pointer indicating the buffer memory which precedes the current buffer memory in the additional receive list, and an additional “next” pointer indicating the buffer memory which follows the current buffer memory in the additional receive list.
In this manner, the inventive device makes it possible for the socket thereby designated to access the data stream received by all of the sockets involved in said process, and to do so in the order in which said received data stream arrived.
The result is network performance which is superior to prior structures.
Another object of the invention is a communication method implemented by the inventive device.
Other characteristics and advantages of the invention will become apparent by way of the detailed description below, and the drawings, in which:
In
Such a process receives messages from multiple sources via a communication network which operates using the TCP protocol.
A socket SC is associated with each source; they are individually denoted SC1, SC2, and SC3.
Each socket SC comprises a receive list RX listing buffer memories SKB that contain the received data stream.
Each socket further comprises a send list (not shown) listing buffer memories that contain the data stream to send.
In
The buffer memories are linked to one another for a selected socket.
Each buffer memory SKB identifies the structure of the device ND for which the data packet is sent or from which the data packet is received.
A buffer memory SKB is associated with each packet. The packets' headers are correctly located by means of a set of pointers TH, IPH, and MAC.
The buffer memories are linked for a given socket, and contain information such as the links to the protocol headers, and the device associated with the packet.
We refer again to
The socket SC3 is designated to additionally receive the data stream received from each socket SC1, SC2, and SC3 associated with a selected process, such as the messaging process.
The socket SC3 comprises an additional receive list RXS listing buffer memories SKB containing the data streams received by the set of sockets involved in said process.
We refer again to
The buffer memories SKB of each socket SC1, SC2, SC3 simultaneously belong to both receive lists RX, RXS.
The buffer memories SKB each further comprise an additional “previous” pointer PPS indicating the buffer memory that precedes the current buffer memory in the additional receive list RXS and an additional “next” pointer PPS indicating the buffer memory which follows the current buffer memory in the additional receive list RXS.
Within the thereby designated socket SC3, it is possible to access the data stream received by the set of sockets involved in said process, and in the order in which said received data stream arrived.
This is because the additional receive list RXS contains the pointer information that makes it possible to locate the received data streams in the order that this data arrived at the various sockets.
For example, in
Skb 3.1
Skb 2.1
Skb 1.1
Skb 3.2
Skb 1.2
Skb 1.3
Using the additional receive list RXS, it is possible to access the data streams in this order, whereas when the additional receive list is absent, access is based on the rank of the socket, i.e. first socket SC1, then socket SC2, and then SC3. In such a case, the order in which the data streams are processed would be:
Skb 1.1
Skb 1.2
Skb 1.3
Skb 2.1
Skb 3.1
Skb 3.2
Number | Date | Country | Kind |
---|---|---|---|
07 59931 | Dec 2007 | FR | national |
Number | Name | Date | Kind |
---|---|---|---|
6073177 | Hebel et al. | Jun 2000 | A |
6138186 | Simms et al. | Oct 2000 | A |
6922727 | Banerjee | Jul 2005 | B2 |
7181525 | Hebel et al. | Feb 2007 | B1 |
7206864 | Enko et al. | Apr 2007 | B2 |
7269661 | Ree et al. | Sep 2007 | B2 |
7430623 | Walls et al. | Sep 2008 | B2 |
7751346 | Park et al. | Jul 2010 | B2 |
7769905 | Chu et al. | Aug 2010 | B1 |
20070088854 | Park et al. | Apr 2007 | A1 |
20090116503 | Sebastian | May 2009 | A1 |
20090240780 | Brown et al. | Sep 2009 | A1 |
Number | Date | Country | |
---|---|---|---|
20090310611 A1 | Dec 2009 | US |