Monolith-to-microservice refactoring via source-code-to-domain-model graph comparison
AssigneeInternational Business Machines Corporation
InventorsSrikanth Govindaraj Tamilselvam, Amith Singhee, Divakar R. Mysore, Radhika Vaddarse
Life of this patent
Estimating the term…
Abstract
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.
Claims20
A system, comprising:
- a memory that stores computer-executable components;
- and
- a processor that executes at least one of the computer-executable components that:
- trains a neural network to refactor monolithic applications into microservices according to target domain models;
- accesses, using the neural network, source code of a monolithic application and a target domain model corresponding to the monolithic application;
- and
- generates, using the neural network, a group of microservices associated with the target domain model based on refactoring the monolithic application, by aligning a first graph representing the source code with a second graph representing the target domain model, wherein the aligning the first graph with the second graph yields a set of node pairs that respectively map nodes of the first graph to nodes of the second graph, wherein the nodes of the second graph respectively correspond to the group of microservices, wherein the set of node pairs indicate that a first node of the first graph is mapped to a second node of the second graph, wherein the first node represents a program within the source code, wherein the second node represents a service domain within the target domain model, and wherein the refactoring further comprises:
- comparing, via natural language processing, non-exposing method calls written within the program to business capabilities specified by the target domain model for the service domain, and
- comparing, via the natural language processing, program-exposing method calls written within the program to service domain interactions specified by the target domain model for the service domain.
A computer-implemented method, comprising:
- training, by a system operatively coupled to a processor, a neural network to refactor monolithic applications into microservices according to target domain models;
- accessing, by the system, using the neural network, source code of a monolithic application and a target domain model corresponding to the monolithic application;
- and
- generating, by the system, using the neural network, a group of microservices associated with the target domain model based on refactoring the monolithic application, by aligning a first graph representing the source code with a second graph representing the target domain model, wherein the aligning the first graph with the second graph yields a set of node pairs that respectively map nodes of the first graph to nodes of the second graph, wherein the nodes of the second graph respectively correspond to the group of microservices, wherein the set of node pairs indicate that a first node of the first graph is mapped to a second node of the second graph, wherein the first node represents a program within the source code, wherein the second node represents a service domain within the target domain model, and wherein the refactoring further comprises:
- comparing, via natural language processing, non-exposing method calls written within the program to business capabilities specified by the target domain model for the service domain, and
- comparing, via the natural language processing, program-exposing method calls written within the program to service domain interactions specified by the target domain model for the service domain.
A computer program product for facilitating monolith-to-microservice refactoring via source-code-to-domain-model graph comparison, the computer program product comprising a non-transitory computer-readable memory having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:
- train a neural network to refactor monolithic applications into microservices according to target domain models;
- access, using the neural network, source code of a monolithic application and a target domain model corresponding to the monolithic application;
- and
- generate, using the neural network, a group of microservices associated with the target domain model based on refactoring the monolithic application, by aligning a first graph representing the source code with a second graph representing the target domain model, wherein the aligning the first graph with the second graph yields a set of node pairs that respectively map nodes of the first graph to nodes of the second graph, wherein the nodes of the second graph respectively correspond to the group of microservices, wherein the set of node pairs indicate that a first node of the first graph is mapped to a second node of the second graph, wherein the first node represents a program within the source code, wherein the second node represents a service domain within the target domain model, and wherein the refactoring further comprises:
- comparing, via natural language processing, non-exposing method calls written within the program to business capabilities specified by the target domain model for the service domain, and
- comparing, via the natural language processing, program-exposing method calls written within the program to service domain interactions specified by the target domain model for the service domain.
Dependencies are inferred from the claim text.