HIDL Request Routing Through Shared Memory for Multi-Client Servers
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing solutions in request processing methods for electronic devices, specifically involving Hardware Abstraction Layer (HAL) interfaces, are limited by the fixed registration of server ends with client ends, preventing a single server end from processing requests from multiple client ends of HIDL interfaces.
Innovation Solution
A method and apparatus that allows multiple invokers to send requests through a server end of a device interface, identifying the invoker using information carried in the request, and returning response data to the correct invoker, enabling a single server end to process requests from multiple client ends by using an interface proxy module to create proxy objects for client ends.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If client ends and server ends of HIDL interfaces are one-to-one bound, then request processing is simple and reliable, but a server end cannot simultaneously process requests from multiple client ends
Solution Approach 1:
The patent implements a universal server end that can serve multiple client ends through a shared memory mechanism. The server end of the first HIDL interface is configured to receive requests from multiple client ends (including client ends of different HIDL interfaces) by accessing a shared memory space, eliminating the need for separate server ends for each client end while maintaining request-response correspondence through memory addresses.
Solution Approach 2:
The patent introduces a shared memory as an intermediary between multiple client ends and the server end. The shared memory acts as a communication medium where client ends write requests and the server end reads them, enabling multi-to-one communication without direct binding. The memory address serves as an identifier that links requests to their corresponding invokers.
2Productivity
If multiple server ends are created to handle requests from multiple client ends, then request processing capability is improved, but resource utilization decreases
Solution Approach 1:
The patent merges multiple server end functionalities into a single server end by using a shared memory mechanism. Instead of creating separate server end instances for each client end, the patent combines their request handling capabilities through a common server end that accesses requests via shared memory, thereby reducing the total number of server ends while maintaining processing capability for multiple clients.
Solution Approach 2:
The server end is designed with universal functionality to handle requests from any client end through the shared memory interface. This multi-functional server end can process requests from multiple invokers simultaneously by identifying them through memory addresses, eliminating the need for multiple specialized server ends and optimizing resource utilization.
3Adaptability or versatility
If a shared memory space is allocated for request exchange, then multiple invokers can access the same server end, but memory management complexity increases
Solution Approach 1:
The patent implements self-service mechanisms where each invoker is responsible for managing its own request data in the shared memory. The invoker writes its request to a specific memory address and reads the corresponding response from the same address, eliminating the need for complex centralized memory management. The system automatically maintains the correspondence between requests and responses through memory address binding.
Data Source
Figure 1a
Figure 1b~1c
Figure 1d
AI summary
This application relates to the field of electronic information technologies, and discloses a request processing method and a related apparatus, to meet a requirement that a server end of one HIDL interface simultaneously processes requests delivered by client ends of a plurality of HIDL interfaces. A specific solution is as follows: Requests of a plurality of invokers are sent to a server Server end of a first device interface. The request carries information used to indicate an invoker to which the request belongs. Then, response data that corresponds to each request and that is returned by the server end of the first device interface is received. The response data corresponding to the request carries information used to indicate an invoker to which the request belongs. Further, for the response data corresponding to each request, an invoker to which the response data corresponding to the request belongs can be identified based on the information that is carried in the response data corresponding to the request and that is used to indicate the invoker to which the request belongs, and the response data corresponding to the request can be returned to the invoker to which the response data corresponding to the request belongs.