Directed Acyclic Graphs for Parallel Microservice Data Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Microservices architectures face efficiency issues due to dependencies between hierarchies, where slow microservices in one hierarchy can slow down overall data processing, especially in complex business scenarios requiring coordination of tens or hundreds of services.
Innovation Solution
A directed acyclic graph is used to represent target microservices and their dependencies, allowing for optimized calling sequences and reducing redundant calls by writing service output parameters into context information, thus improving processing efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If hierarchical calling of microservices is used to manage complex business architectures, then service coordination and maintainability are improved, but overall data processing efficiency deteriorates when any microservice in a hierarchy is called too slow
Solution Approach 1:
The patent segments the microservice dependency graph into multiple levels (first level, second level, etc.) based on dependency relationships. Services at different levels are called in parallel rather than sequentially, which resolves the bottleneck of hierarchical calling where slow services in any level would block all subsequent calls. This segmentation maintains clear dependency management while enabling parallel execution to improve overall efficiency.
Solution Approach 2:
The patent dynamically determines the calling sequence of microservices based on their dependency relationships and execution status. Instead of fixed hierarchical levels, the system adapts the calling order by monitoring which services have completed execution and which are still running, allowing flexible parallel calling that optimizes both coordination and efficiency.
2Device complexity
If all microservices in a hierarchy must be called before moving to the next hierarchy, then dependency management is simplified, but waiting time increases and processing efficiency decreases
Solution Approach 1:
The patent performs preliminary analysis of dependency relationships to construct a dependency graph before execution. This graph is then used to identify independent service groups that can be called in parallel. By preparing the calling plan in advance based on dependency analysis, the system avoids sequential waiting while maintaining clear dependency management through the pre-computed call sequence.
Solution Approach 2:
The patent divides the microservice dependencies into multiple independent segments (first level, second level, etc.) based on the dependency graph. Services within the same level can be called in parallel since they have no dependency conflicts, while the level structure itself provides simple dependency management. This segmentation eliminates the need to wait for all services in a hierarchy to complete before proceeding.
3Reliability
If redundant calls to microservices are made, then service reliability is improved through retries, but resource consumption and processing time increase
Solution Approach 1:
The patent introduces a feedback mechanism where the result of each microservice call is recorded and fed back into the system. When a service is called, its output parameters are stored and subsequent calls to the same service can check whether the result is already available. This feedback loop allows the system to avoid redundant calls while maintaining reliability through the recorded results, thereby reducing resource consumption.
Solution Approach 2:
The patent creates a copy of the service result in the form of a dependency graph that records both the service call results and their relationships. This copied information allows the system to determine whether a service has already been called and whether its result is needed, enabling intelligent call optimization that prevents redundant resource consumption while preserving reliability through the recorded service outcomes.
Data Source
AI summary
A data processing method includes: obtaining a directed acyclic graph for a target business and one or more target service output parameters for the target business in response to a business request for the target business; optimizing the directed acyclic graph based on context information, where the context information includes respective values of one or more service output parameters of each of one or more called microservices in a service pool; calling target microservices based on the optimized directed acyclic graph to obtain respective values of one or more service output parameters of each of the target microservices, and writing the obtained respective values of the one or more service output parameters of the each of the target microservices into the context information; and returning response data corresponding to the business request based on the context information and the one or more target service output parameters.


