API Query Execution via Union Relationships and Parallel Subqueries
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing API systems face performance and reliability issues due to reliance on a single data store, leading to processing latencies and potential single points of failure when handling API function calls, as they generate multiple discrete queries that are not executed atomically.
Innovation Solution
The system processes API queries by generating subqueries based on object schemas and union relationships between data objects, optimizing execution by identifying services for each data object and executing subqueries in parallel across multiple services, thereby reducing the number of queries and improving efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a single data store is used to store and retrieve data objects, then data consistency is maintained, but processing latency increases and reliability decreases due to sequential query execution and single point of failure
Solution Approach 1:
The patent segments the monolithic data store into multiple distributed data stores, each capable of storing subsets of data objects. This segmentation allows parallel query execution across multiple services, reducing processing latency while maintaining data consistency through the graph-based execution plan that coordinates queries across the distributed stores.
Solution Approach 2:
The patent introduces a new dimension of parallelism by executing multiple queries simultaneously across different data stores rather than sequentially in a single data store. The graph projection and execution plan enable queries to be distributed across multiple dimensions of the system architecture, achieving both improved reliability and reduced latency.
2Productivity
If multiple discrete queries are generated against a single data store to resolve data objects, then complete data resolution is achieved, but processing latency increases due to sequential execution
Solution Approach 1:
The patent merges multiple discrete queries into a coordinated execution plan represented as a graph. This execution plan combines queries for parent objects and child objects into a unified structure that can be executed in parallel across multiple services, significantly improving query resolution efficiency while reducing processing latency compared to sequential execution.
Solution Approach 2:
The system performs preliminary actions by generating the execution plan and identifying parallelizable queries before actual data retrieval. The graph projection pre-analyzes the data model relationships and determines which queries can be executed in parallel, enabling optimized query resolution efficiency and reduced latency during actual execution.
3Reliability
If queries are executed against a single data store instance, then data consistency is maintained, but the system creates a single point of failure
Solution Approach 1:
The patent segments the single data store into multiple distributed data stores, eliminating the single point of failure. Each data store can independently operate and fail without bringing down the entire system, thereby improving system availability. The segmentation is managed through the graph-based execution plan that coordinates access across the distributed architecture.
4Reliability
If atomic execution of all queries is required, then data consistency is ensured, but additional delays are introduced due to non-atomic execution behavior
Solution Approach 1:
The patent performs preliminary analysis by generating an execution plan that identifies which queries can be safely executed in parallel and which require sequential execution to maintain consistency. This pre-planning allows the system to achieve near-atomic execution behavior without the full delay of traditional atomic transactions, as the execution plan pre-determines the safe parallel execution paths.
Data Source
AI summary
Aspects of the present disclosure provide techniques for executing requests in an object schema-based application programming interface (API) based on union relationships between data objects. Embodiments include receiving an API query from a client application. The API query identifies a navigable path through a graph projection of the API and includes a plurality of nodes in the graph. One or more data objects to resolve in order to satisfy the API query are identified based on an object schema associated with each node in the query. For each respective data object of the one or more data objects, one or more services associated with properties of the respective data object are identified, and one or more subqueries are generated to the services to satisfy the properties of the respective data object. The subqueries are transmitted to the identified services for execution, and a result of the API query is returned.


