Monolith-to-Microservice Refactoring via Graph Comparison
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing techniques for refactoring monolithic applications into microservices are either bottom-up, which fail to consider external microservice information, or top-down, which are manual and time-consuming.
Innovation Solution
A computer-implemented method and system that facilitates monolith-to-microservice refactoring via source-code-to-domain-model graph comparison, using graph theory comparison metrics to automatically align the source code of a monolithic application with a target domain model, thereby identifying which parts of the source code correspond to available microservices.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If bottom-up refactoring technique is used, then refactoring can be performed automatically, but accuracy is poor because external microservice information is not considered
Solution Approach 1:
The patent introduces a domain model as an intermediary that bridges the monolithic source code and target microservices. The domain model serves as a mediator that captures business capabilities and microservice information, enabling accurate mapping between source code modules and microservices without direct manual analysis. This intermediary structure allows automated refactoring while maintaining high accuracy by leveraging the domain model's representation of business logic and microservice relationships.
2Measurement precision
If manual top-down refactoring technique is used, then accuracy can be maintained by considering external microservice information, but time consumption is high
Solution Approach 1:
The patent performs preliminary actions by automatically generating a domain model from the monolithic source code before the actual refactoring process. This domain model pre-computes the structural relationships, business capabilities, and module dependencies, which are then used during refactoring to quickly and accurately map to microservices. By preparing the domain model in advance, the system eliminates time-consuming manual analysis while maintaining high accuracy through the pre-computed structural understanding.
3Manufacturing precision
If graph comparison metrics are used to align source code with domain model, then refactoring precision is improved, but system complexity increases
Solution Approach 1:
The patent creates a simplified copy of the source code structure in the form of a domain model, which replicates the essential structural relationships and business capabilities. This domain model copy is then compared with the target microservice architecture using graph comparison metrics. By working with this simplified representation rather than the full complex source code, the system achieves high precision in mapping while reducing the computational and analytical complexity of the refactoring process.
Data Source
AI summary
Systems/techniques that facilitate monolith-to-microservice refactoring via source-code-to-domain-model graph comparison are provided. In various embodiments, a system can access source code of a monolithic application and a target domain model corresponding to the monolithic application. In various aspects, the system can refactor the monolithic application into microservices, by aligning a first graph representing the source code with a second graph representing the target domain model.


