Microservice Workflow Simulation via Historical Request Pattern Matching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for simulating microservice workflows, such as those using OpenAPI specifications, struggle to accurately reflect complex relationships between multiple requests, leading to incomplete simulation of microservice characteristics and reduced engineering efficiency.
Innovation Solution
A method is proposed that determines a target request pattern based on previous requests and selects a target historical request with similar characteristics from historical data. This allows for the generation of a target response that accurately reflects the actual workflow, improving simulation accuracy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If OpenAPI specifications are used to simulate microservice workflows, then the simulation can be generated, but the simulation accuracy is reduced and engineering efficiency decreases
Solution Approach 1:
The patent creates mock servers by copying and adapting historical request-response patterns from production environments. Instead of using generic OpenAPI specifications, the system replicates actual microservice interaction patterns, including request parameters, response structures, and workflow sequences. This copying approach preserves the authenticity of microservice behaviors while enabling accurate simulation without requiring full engineering efficiency gains.
Solution Approach 2:
The patent performs preliminary analysis of historical request patterns and workflows before generating mock servers. By pre-processing production data to extract request patterns, response patterns, and workflow sequences, the system prepares accurate simulation templates in advance. This preliminary action ensures that when mock servers are generated, they already contain embedded accuracy information from real microservice interactions.
2Ease of manufacture
If generic request simulation methods are used, then the implementation is simple, but the complex relationships between multiple requests cannot be accurately reflected
Solution Approach 1:
The patent implements a nested structure where mock servers are embedded within a workflow orchestration system. The mock servers themselves contain nested patterns of requests and responses, with each mock server potentially calling other mock servers in sequence. This nesting allows the system to maintain simple individual mock server implementations while achieving complex workflow simulation through the nested arrangement of multiple mock servers working together.
Solution Approach 2:
The patent introduces a workflow orchestration layer as an intermediary between the simple mock servers and the complex microservice workflows. This mediator analyzes historical data to determine request patterns and coordinates the sequence of mock server calls to reproduce complex workflow relationships. The intermediary handles the complexity of workflow management while allowing individual mock servers to remain simple to implement.
Data Source
AI summary
A method of managing resources is provided in embodiments of the present disclosure. The method includes determining a set of candidate historical requests associated with a target request. Here, the set of candidate historical requests has the same request type and target resource as the target request. The method further includes determining a target request pattern of the target request based on at least one previous request of the target request. The method includes determining a target historical request from the set of candidate historical requests based on the target request pattern. The method includes generating a target response to the target request based on a historical response to the target historical request. In this way, by determining a response to a historical request that has the most similar request pattern to the target request, a simulated response that is more in line with the context can be generated.


