Query Decomposition for Microservice Data Retrieval
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In micro-service architectures, client applications face inefficiencies when requesting data stored across multiple services, requiring multiple queries and requests to retrieve specific data, as they are not aware of the data's location, leading to redundant and fragmented data retrieval processes.
Innovation Solution
A method is introduced where a service front-end receives a query from a client, determines the data's distribution across multiple micro-services, generates targeted queries for each service, joins the responses, and returns a unified result to the client, utilizing a dependency graph to optimize the order of data retrieval and filtering out unnecessary data.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If a client application issues multiple requests to retrieve data from multiple micro-services, then the client can obtain complete data, but the number of requests and data retrieval complexity increases
Solution Approach 1:
The patent segments the data retrieval process by dividing the query into multiple micro-service queries, each targeting a specific micro-service. The query decomposition component analyzes the original query and splits it into smaller, manageable queries that can be executed across different micro-services, with each query requesting only the specific data needed from that service.
Solution Approach 2:
The patent introduces a query decomposition component as an intermediary between the client application and multiple micro-services. This intermediary receives the original query, determines which micro-services need to be queried, generates appropriate queries for each service, and coordinates the retrieval process, thereby simplifying the client's interaction with the distributed system.
2Loss of information
If a client application issues multiple requests to retrieve data from multiple micro-services, then the client can obtain complete data, but the time required for data retrieval increases
Solution Approach 1:
The patent applies preliminary action by having the query decomposition component analyze and prepare multiple micro-service queries before execution. The component determines the optimal query structure and ordering in advance, so that when data retrieval begins, the queries are already optimized and can be executed efficiently without unnecessary delays.
Solution Approach 2:
The patent ensures continuity of useful action by coordinating multiple micro-service queries to run concurrently rather than sequentially. The query decomposition component manages the retrieval process so that data is fetched from multiple services simultaneously, maintaining continuous progress on the overall data retrieval operation and minimizing total time.
3Loss of information
If a client application issues multiple requests to retrieve data from multiple micro-services, then the client can obtain complete data, but redundant data transmission occurs
Solution Approach 1:
The patent extracts only the necessary data from each micro-service by carefully constructing queries that request specific fields and properties. The query decomposition component analyzes the original query to identify exactly which data elements are needed from each micro-service, preventing requests for unnecessary or redundant information.
Solution Approach 2:
The patent applies partial action by requesting only the specific data needed from each micro-service rather than retrieving entire datasets. The queries are precisely targeted to fetch only the necessary fields, avoiding excessive data transmission and reducing the overhead of processing and filtering unnecessary information.
Data Source
AI summary
Techniques are disclosed to decompose a query from a client application. Embodiments include receiving a query based on a request provided by a user via a user interface. Embodiments include identifying a set of data elements requested by the query and identifying a predicate expression of a plurality of expressions in the query and a dependent expression of the plurality of expressions in the query. Embodiments include generating a first micro-service query for at least a first data element corresponding to the predicate expression and a second micro-service query for at least a second data element corresponding to the dependent expression. Embodiments include determining an order for issuing the first micro-service query and the second micro-service query based on the predicate expression and the dependent expression.


