ASYNCHRONOUS FULL-DUPLEX REQUEST/RESPONSE PROTOCOL
FIELD OF THE INVENTION The present invention relates to computer networks in general, and more particularly to asynchronous full-duplex communications between computers in a network environment.
BACKGROUND OF THE INVENTION The TCP/IP communications protocol is often employed for full- duplex asynchronous communications between computers in a network environment, such as the Internet. However, firewalls often prevent communications using ordinary TCP/IP sockets via arbitrary ports. In contrast, communications that employ request/response protocols, such as HTTP communications via port 80, are generally allowed through firewalls. However, in a client-server environment, such communications must always be initiated by the client, with communications from the server coming only in response to the client request. Thus, in a request/response system, a server-initiated asynchronous communication is not currently possible.
SUMMARY OF THE INVENTION
The present invention seeks to provide methods for employing network request/response protocols in support of asynchronous full-duplex communications between computers in a network environment. The present invention provides a novel way to use a request/response protocol in combination with a channel identifier in order to provide transparent, asynchronous, full- duplex communications between computers on a computer network, and particularly to allow for such communications via firewalls where other forms of communication might not be allowed to pass through the firewall. The present invention is additionally advantageous where the HTTP protocol is used in that the HTTP protocol provides built-in encryption in most browsers and servers,
thus adding a layer of security to otherwise less secure asynchronous, full-duplex communications techniques.
There is thus provided in accordance with a preferred embodiment of the present invention a method for establishing an asynchronous, fiill-duplex communications channel between a client and a server, the method including a) transmitting an information request from the client to the server, thereby forming a communications channel between the client and the server, the information request including an identifier identifying the channel b) asynchronously transmitting a plurality of server-to-client messages as responses to the information request, each of the responses including the identifier and c) asynchronously transmitting a plurality of client-to-server messages, each of the responses including the identifier.
Further in accordance with a preferred embodiment of the present invention the transmitting step a) includes transmitting using an HTTP protocol GET request.
Still further in accordance with a preferred embodiment of the present invention the asynchronously transmitting step b) includes transmitting using an HTTP protocol GET response.
Additionally in accordance with a preferred embodiment of the present invention the asynchronously transmitting step c) includes transmitting using an HTTP protocol POST request.
Moreover in accordance with a preferred embodiment of the present invention the method further includes mamtaining the communications channel subsequent to asynchronously transmitting the first of the server-to-client messages.
Further in accordance with a preferred embodiment of the present invention any of the transmitting steps includes transmitting via a proxy server, and where the method further includes periodically transmitting a dummy message between the first-mentioned server and the client with sufficient frequency to prevent the proxy server from terminating the communications channel.
There is also provided in accordance with a preferred embodiment of the present invention a method for establishing an asynchronous, full-duplex communications channel between a client and a server, the method including a) transmitting an information request from the client to the server, thereby forming a communications channel between the client and the server b) generating an identifier at the server identifying the channel c) asynchronously transmitting in response to the information request a first server-to-client message indicating the identifier d) asynchronously transmitting a plurality of server-to-client messages as responses to the information request, each of the responses including the identifier and e) asynchronously transmitting a plurality of client-to-server messages, each of the responses including the identifier.
Further in accordance with a preferred embodiment of the present invention the transmitting step a) includes transmitting using an HTTP protocol GET request. Still further in accordance with a preferred embodiment of the present invention the asynchronously transmitting steps c) and d) includes transmitting using an HTTP protocol GET response.
Additionally in accordance with a preferred embodiment of the present invention the asynchronously transmitting step e) includes transmitting using an HTTP protocol POST request.
Moreover in accordance with a preferred embodiment of the present invention the method further includes maintaining the communications channel subsequent to asynchronously transmitting the first server-to-client message.
Further in accordance with a preferred embodiment of the present invention any of the transmitting steps includes transmitting via a proxy server, and where the method further includes periodically transmitting a dummy message between the first-mentioned server and the client with sufficient frequency to prevent the proxy server from terminating the communications channel. There is additionally provided in accordance with a preferred embodiment of the present invention an asynchronous, full-duplex
communications system including a client and a server, where the client is operative to transmit an information request to the server, thereby forming a communications channel between the client and the server, the information request including an identifier identifying the channel, where the server is operative to asynchronously transmit a plurality of response messages to the client in response to the information request, each of the response messages including the identifier, and where the client is operative to asynchronously transmit a plurality of posting messages to the server, each of the posting messages including the identifier. Further in accordance with a preferred embodiment of the present invention the client is operative to transmit the information request using an HTTP protocol GET request.
Still further in accordance with a preferred embodiment of the present invention the server is operative to transmit the response messages using an HTTP protocol GET response.
Additionally in accordance with a preferred embodiment of the present invention the client is operative to transmit the posting messages using an HTTP protocol POST request.
Moreover in accordance with a preferred embodiment of the present invention the server is operative to maintain the communications channel subsequent to asynchronously transmitting the first of the response messages.
Further in accordance with a preferred embodiment of the present invention the system further includes a proxy server, where the information request and the messages are transmitted via the proxy server, and where either of the first-mentioned server and the client is operative to periodically transmit a dummy message between the first-mentioned server and the client with sufficient frequency to prevent the proxy server from terminating the communications channel.
There is also provided in accordance with a preferred embodiment of the present invention an asynchronous, full-duplex communications system including a client and a server, where the client is operative to transmit an
information request to the server, thereby forming a communications channel between the client and the server, where the server is operative to generate an identifier identifying the channel, asynchronously transmit to the client in response to the information request a first response message indicating the identifier and thereafter a plurality of response messages to the client in response to the information request, each of the response messages including the identifier, and where the client is operative to asynchronously transmit a plurality of posting messages to the server, each of the posting messages including the identifier.
Further in accordance with a preferred embodiment of the present invention the client is operative to transmit the information request using an HTTP protocol GET request.
Still further in accordance with a preferred embodiment of the present invention the server is operative to transmit the response messages using an HTTP protocol GET response. Additionally in accordance with a preferred embodiment of the present invention the client is operative to transmit the posting messages using an HTTP protocol POST request.
Moreover in accordance with a preferred embodiment of the present invention the server is operative to maintain the communications channel subsequent to asynchronously transmitting the first of the response messages.
Further in accordance with a preferred embodiment of the present invention the system further includes a proxy server, where the information request and the messages are transmitted via the proxy server, and where either of the first-mentioned server and the client is operative to periodically transmit a dummy message between the first-mentioned server and the client with sufficient frequency to prevent the proxy server from terminating the communications channel.
The disclosures of all patents, patent applications, and other publications mentioned in this specification and of the patents, patent applications, and other publications cited therein are hereby incorporated by reference.
BRIEF DESCRIPTION OF THE DRAWINGS The present invention will be understood and appreciated more fully from the following detailed description taken in conjunction with the appended drawings in which:
Fig. 1 is a simplified conceptual illustration of a computer network employing a request/response protocol in support of asynchronous full-duplex communications, constructed and operative in accordance with a preferred embodiment of the present invention; Fig. 2 is a simplified flowchart illustration of an exemplary method of operation of the system of Fig. 1, operative in accordance with a preferred embodiment of the present invention;
Fig. 3 is a simplified flowchart illustration of an exemplary method of operation of the system of Fig. 1, operative in accordance with a preferred embodiment of the present invention;
Fig. 4 is a simplified conceptual illustration of a computer network employing a request/response protocol in support of asynchronous full-duplex communications, constructed and operative in accordance with a preferred embodiment of the present invention; and Fig. 5 is a simplified flowchart illustration of an exemplary method of operation of the system of Fig. 4, operative in accordance with a preferred embodiment of the present invention.
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS Reference is now made to Fig. 1 which is a simplified conceptual illustration of a computer network employing a request/response protocol in support of asynchronous full-duplex communications, constructed and operative in accordance with a preferred embodiment of the present invention. In the system of Fig. 1 a client computer 10 is configured to transmit an information request using a request/response protocol, such as by using the HTTP GET command, to a server 12 via a network 14, such as the Internet. Server 12 is
preferably configured to asynchronously transmit one or more messages to client 10 in the form of responses to the information request using the request/response protocol as described in greater detail hereinbelow. Client 10 is likewise preferably configured to asynchronously transmit one or more messages to server 12 using a request/response protocol, such as by using the HTTP POST command. The system of Fig. 1 may be used to communicate via a firewall 16.
It is a particular feature of the invention that once the channel created by client 10's information request is established between client 10 and server 12, server 12 does not terminate channel subsequent to sending its first message to client 10. For example, in the HTTP request/response protocol, server 12 would normally send a content length header to client 10 indicating the length of the response to the HTTP GET request, with the connection being terminated once a message of the indicated length has been transmitted. Server 12 may also terminate the request/response transaction using any one of several methods, such as by closing the HTTP connection (i.e., the underlying TCP/IP socket) or by sending a zero-length chunk where HTTP/1.1 chunked encoding is used. In the present embodiment, however, server 12 does not provide a content length header, nor does server 12 explicitly terminate the request/response transaction after initially responding to the HTTP GET request. Thus, both client 10 and server 12 maintain the connection established between them, allowing server 12 to "respond" to client 10's HTTP GET request with as many messages as server 12 requires and whenever server 12 wishes, thus creating an asynchronous communications channel.
Reference is now made to Fig. 2 which is a simplified flowchart illustration of an exemplary method of operation of the system of Fig. 1 , operative in accordance with a preferred embodiment of the present invention. In the method of Fig. 2 client 10 generates an identifier that will be used to identify the communications channel between client 10 and server 12 (step 200). Client 10 then appends the identifier to a request message, such as an HTTP GET message, and sends the request message to client 12 (step 210). Server 12, upon receiving the request message and channel identifier from client 10, sends a response
message to client 10, such as an HTTP GET response message, preferably likewise appending the channel identifier to the response message (step 220). Server 12 maintains the communications by not sending a content length header to client 10 and by not terminating the connection by other means (step 230). Once the communications channel is established between client 10 and server 12, either may communicate with the other in an asynchronous, full-duplex fashion, with client 10 sending messages, such as HTTP POST messages, to server 12 including the channel identifier (step 240) and server 12 sending response messages, such as HTTP GET response messages, to client 10, also including the channel identifier (step 250).
Reference is now made to Fig. 3 which is a simplified flowchart illustration of an exemplary method of operation of the system of Fig. 1, operative in accordance with a preferred embodiment of the present invention. The method of Fig. 3 is similar to the method of Fig. 2 with the notable exception that client 10 does not generate the channel identifier. Rather, server 12 generates a unique identifier which server 12 preferably communicates to client 10 as the channel identifier along with the first response message that server 12 sends to client 10. Client 10 is preferably configured to discern the channel identifier from this message. Thereafter, asynchronous, full-duplex communications between client 10 and server 12 proceed as described hereinabove.
Reference is now made to Fig. 4 which is a simplified conceptual illustration of a computer network employing a request/response protocol in support of asynchronous full-duplex communications, constructed and operative in accordance with a preferred embodiment of the present invention, and additionally to Fig. 5, which is a simplified flowchart illustration of an exemplary method of operation of the system of Fig. 4, operative in accordance with a preferred embodiment of the present invention. The network of Fig. 4 is similar to the network of Fig. 1 with the notable exception that client 10 and server 12 communicate with each other via one or more proxy servers 18. Proxy servers, while generally configured to transparently relay messages between parties such as client 10 and server 12, are often configured to terminate links between
communicating parties after no traffic is detected between the parties for a predetermined period of time. To overcome this problem and allow client 10 and server 12 to continue to maintain their communications channel for an indefinite period of time even in the absence of communications between them, in the method of Fig. 5 server 12 periodically sends dummy response messages to client 10 (step 530) with a sufficient frequency such that any proxy servers encountered along the communications channel will not terminate the link between client 10 and server 12. Server 12 may send these dummy messages at a configurable time interval any time after the communications channel is established, or only when the communications channel between server 12 and client 10 has been silent for a predetermined period of time. Client 10 is preferably configured to identify and ignore dummy messages.
It is appreciated that one or more of the steps of any of the methods described herein may be omitted or carried out in a different order than that shown, without departing from the true spirit and scope of the invention.
While the present invention as disclosed herein may or may not have been described with reference to specific hardware or software, the present invention has been described in a manner sufficient to enable persons of ordinary skill in the art to readily adapt commercially available hardware and software as may be needed to reduce any of the embodiments of the present invention to practice without undue experimentation and using conventional techniques.
While the present invention has been described with reference to one or more specific embodiments, the description is intended to be illustrative of the invention as a whole and is not to be construed as limiting the invention to the embodiments shown. It is appreciated that various modifications may occur to those skilled in the art that, while not specifically shown herein, are nevertheless within the true spirit and scope of the invention.