Compounded Responses in Asynchronous RPC Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In asynchronous Remote Procedure Call (RPC) communications, the need for one-to-one response matching with requests leads to network latency and increased read/write context switches, especially when multiple responses are pending in a different address space.
Innovation Solution
Implementing compounded responses that piggyback onto acknowledgement messages, allowing multiple responses to be combined and sent together, rather than individually, thereby eliminating the need for separate response communications for each request.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If separate response communications are sent for each request, then response delivery is ensured, but network latency increases and read/write context switches increase
Solution Approach 1:
Multiple individual response communications are merged into a single compounded response message. The server collects multiple responses that are ready to be sent and combines them into one communication packet, which is then sent to the client. This reduces the number of separate network transactions and eliminates redundant read/write context switches while ensuring all responses are still delivered to their respective request handlers.
2Reliability
If separate response communications are sent for each request, then response delivery is ensured, but read/write context switches increase
Solution Approach 1:
Multiple read and write operations that would otherwise occur separately for each response are combined into a single read operation to retrieve multiple responses and a single write operation to transmit the compounded response. This significantly reduces the number of context switches between read and write operations, improving system efficiency while maintaining reliable response delivery.
3Ease of operation
If responses are sent individually, then request-response mapping is simple, but system performance decreases due to multiple communications
Solution Approach 1:
Multiple responses are compounded into a single message structure that includes metadata identifying which responses correspond to which requests. The client receives this compounded response and uses the metadata to correctly map each response to its corresponding request, maintaining simple and accurate request-response mapping while achieving improved system performance through reduced communication overhead.
Data Source
AI summary
A first request to execute a first task is received from a first module in a first address space and by a second module in a second address space. The first task is placed into a task queue for execution in the second address space. Pending responses not yet returned to the first module that are results of execution for other tasks in the second address space are extracted by the second module from a response queue. Requests for the other tasks were previously sent by the first module to the second module for execution in the second address space. The pending responses are compounded. The pending responses and a return value for acknowledgement the first request to execute the first task are combined, by the second module into a combined communication. The combined communication is transmitted by the second module to the first module in the first address space.


