摘要:
An improved method and system for layering RPC communications on top of an HTTP transport. An RPC data stream of individual request/reply packets is mapped to HTTP primitives, and RPC requests are mapped to one large, HTTP, POST-like request (IN channel). Corresponding replies are mapped to another large, HTTP, GET-like request (OUT channel). The client establishes the IN channel and OUT channel as simultaneously open connections with a large content-length for each. Before the content-length is exhausted, the client and server open a new IN or OUT channel while the corresponding channel is still alive, so that there is always at least one opened IN or OUT channel available. If traffic is too infrequent, the client keeps the connection alive so that it will not be closed for being idle. This provides a bi-directional virtual connection that remains open for an unlimited time for tunneling unlimited amounts of RPC traffic.