Directed Graph Scheduling for Mixed Microservice Execution Order
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing microservice architectures face challenges in determining the execution order of services, particularly when both serial and parallel execution relationships coexist, leading to inefficiencies in large-scale deployments.
Innovation Solution
A method and apparatus that constructs a directed graph using to-be-processed services as points and relationship information as edges, allowing for the determination of execution order information, including both serial and parallel relationships.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If traditional execution order determination methods are used for microservices, then the system can handle simple serial or parallel execution relationships, but it cannot efficiently determine execution order when both serial and parallel relationships coexist in large-scale deployments
Solution Approach 1:
The patent segments the complex execution order determination problem into distinct components by identifying and separating serial execution relationships from parallel execution relationships. This is achieved through the execution order determination module that processes different relationship types independently, allowing the system to handle mixed execution patterns without overwhelming complexity
Solution Approach 2:
The patent introduces a new dimensional approach by representing execution relationships as a directed graph structure where services are nodes and relationships are edges. This graphical model adds a visual and structural dimension to execution order determination, enabling the system to simultaneously represent both serial and parallel relationships in a unified framework
2Productivity
If the system determines execution order for services with both serial and parallel relationships, then execution efficiency is improved, but the complexity of the determination mechanism increases
Solution Approach 1:
The patent introduces an execution order determination module as an intermediary component that mediates between the service registration information and the actual service execution. This module processes execution relationships, determines optimal execution orders considering both serial and parallel constraints, and coordinates service execution without requiring complex logic in each individual service
Solution Approach 2:
The patent implements preliminary action by pre-determining execution orders based on registered service relationships before actual service execution begins. The execution order determination module analyzes the directed graph structure and establishes execution sequences in advance, allowing services to execute efficiently without real-time decision-making delays
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Embodiments of the present disclosure disclose a method and apparatus for generating information. A specific embodiment of the method includes: acquiring at least one to-be-processed service and at least one piece of relationship information, the relationship information being used to represent an execution order between two to-be-processed services in the at least one to-be-processed service; constructing a directed graph with a to-be-processed service in the at least one to-be-processed service as a point and with a piece of relationship information in the at least one piece of relationship information as a directed edge; and generating execution order information of the to-be-processed service in the at least one to-be-processed service according to the directed graph. According to this embodiment, execution order information of a plurality of to-be-processed services having a serial execution relationship and a parallel execution relationship at the same time may be determined.