Socket API Bypassing TCP/IP Stack for Local Data Transactions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional networking systems face inefficiencies in data transactions between local applications within a single host due to the use of TCP/IP loopback communications, which result in unnecessary processing and delays, especially in scenarios like SSL and HTTP proxy communications.
Innovation Solution
The implementation of optimized socket APIs that allow local IP connections to bypass the entire TCP path, enabling direct access to memory buffers of local applications through handle data structures, thereby reducing processing burdens and overhead associated with the TCP/IP protocol stack.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If TCP/IP loopback communications are used for data transactions between local applications, then guaranteed delivery and ordering are ensured, but processing overhead and latency increase
Solution Approach 1:
The patent extracts the essential guarantee function from the full TCP/IP protocol stack by implementing a simplified guarantee mechanism that operates directly at the application layer through socket handles. This allows the system to maintain reliable delivery guarantees while eliminating the intermediate protocol processing steps that cause latency in traditional loopback communications.
Solution Approach 2:
The patent introduces socket handles as an intermediary mechanism that directly connects application memory buffers without requiring data to traverse the complete TCP/IP protocol stack. This intermediary approach maintains the reliability guarantees needed for data transmission while significantly reducing processing overhead and latency compared to conventional loopback methods.
2Reliability
If conventional TCP/IP protocol stack processing is used, then protocol compliance and error handling are ensured, but processing burden and system overhead increase
Solution Approach 1:
The patent extracts the error handling and protocol compliance functions from the heavy TCP/IP protocol stack and implements them through simplified socket handle operations. This allows applications to maintain protocol compliance and error handling capabilities while significantly reducing the processing burden associated with full protocol stack traversal.
Solution Approach 2:
The patent enables applications to serve their own protocol compliance and error handling needs through direct socket handle operations. By allowing applications to directly access and manage data in peer application memory buffers through handles, the system eliminates the need for intermediate protocol processing while maintaining necessary reliability and error handling capabilities.
3Reliability
If data is copied through the TCP/IP protocol stack for loopback communications, then protocol processing is performed, but data transaction efficiency decreases
Solution Approach 1:
The patent uses memory buffer handles that allow direct reference to application data without physical copying. The handle contains a pointer to the peer application's memory buffer, enabling one application to directly access and process another application's data in memory without the data being copied through intermediate protocol buffers, thereby maintaining protocol processing capabilities while dramatically improving data transaction efficiency.
4Reliability
If TCP loopback messages are used for local application communication, then connection establishment is guaranteed, but additional processing steps and delays occur
Solution Approach 1:
The patent implements preliminary connection establishment through socket handle creation and exchange before actual data transactions. Applications establish connections by creating sockets and exchanging handles, which set up direct memory buffer access paths in advance. This preliminary action guarantees connection establishment while simplifying subsequent data communications by eliminating the need for repeated protocol processing steps.
Data Source
AI summary
Methods and systems for efficient data transactions between applications running on devices associated with the same host. According to one embodiment, a host system includes an HTTP proxy and an SSL/TLS proxy operatively coupled with each other. The SSL/TLS proxy may be configured to perform SSL negotiation with a client and the HTTP proxy may be configured to communicate with a web server in clear text. Data can be transferred directly between the proxies through a pair of connected sockets using a handle of the other proxy's socket. The handle includes a pointer to an address within a memory of a first device upon which the other proxy is running. In this manner, data stored at the address may be processed by a proxy running on a second device without copying the data to the second device and without the overhead associated with the TCP/IP protocol stack.


