Socket API Interception for Shared-Memory TCP Communication
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Communication over Transmission Control Protocol (TCP) is suboptimal in terms of latency, throughput, and computational efficiency.
Innovation Solution
Replace socket application programming interface functions with customized socket API functions to create shared memory channels for communication between TCP client and server applications, without modifying their source code, using dynamic linkers or kernel modifications to support shared memory channels.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If TCP socket functions are used for communication, then application compatibility is maintained, but communication latency increases and throughput decreases
Solution Approach 1:
A dynamic linker is introduced as an intermediary component that sits between the TCP application and the operating system. The dynamic linker intercepts socket API calls and redirects them to alternative communication mechanisms (such as shared memory or Unix domain sockets) while maintaining the original application's TCP socket interface. This mediator enables low-latency communication without requiring application modifications.
Solution Approach 2:
The communication stack is segmented into separate layers: the application layer continues to use TCP socket APIs for compatibility, while the dynamic linker layer handles the translation to optimized communication mechanisms. This segmentation allows each layer to be optimized independently - the application maintains compatibility while the underlying layer achieves lower latency through alternative mechanisms.
2Reliability
If TCP socket functions are used for communication, then application compatibility is maintained, but computational efficiency decreases
Solution Approach 1:
The dynamic linker serves as a computational efficiency optimizer by intercepting socket calls and routing them through more efficient pathways. It can detect when applications are communicating locally and redirect those calls to mechanisms like shared memory that require minimal CPU processing, thereby improving computational efficiency while preserving application compatibility.
Solution Approach 2:
The system dynamically changes communication parameters based on the scenario. When applications are running on the same machine or in close proximity, the dynamic linker modifies the communication path to use local mechanisms (shared memory, Unix domain sockets) instead of network protocols, improving computational efficiency without affecting application code.
3Productivity
If socket API functions are replaced with customized functions, then communication efficiency improves, but application compatibility may be affected
Solution Approach 1:
The dynamic linker acts as a transparent intermediary that preserves application compatibility while enabling efficient communication. Applications continue to call standard socket API functions, and the dynamic linker handles the translation to optimized mechanisms. This approach improves communication efficiency without requiring applications to adapt to new interfaces.
Solution Approach 2:
The dynamic linker provides universal support for multiple communication mechanisms (TCP sockets, Unix domain sockets, shared memory) through a single interface. It can automatically select the most appropriate mechanism based on the communication scenario, providing both efficiency improvements and broad compatibility support.
Data Source
AI summary
Disclosed is a method comprising replacing one or more socket application programming interface functions with one or more customized socket application programming interface functions for at least one of a transmission control protocol client application or a transmission control protocol server application; and calling the one or more customized socket application programming interface functions for creating one or more shared memory channels for communication between the transmission control protocol client application and the transmission control protocol server application.


