# US 2021/0232390 A1 · Microservice decomposition strategy of monolithic applications

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0232390 A1
- Document ID: US20210232390A1
- Status: Published application
- Kind: A1
- Application number: 16/750,532
- Filed: 2020-01-23
- Published: 2021-07-29
- Earliest claimed: 2020-01-23
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Jinho Hwang; Anup Kalia; Jin Xiao; Malik Jackson; Maja Vukovic; John Rofrano; Senthil Kumar Kumarasamy Mani
- Web page: https://patentgrep.com/patent/US20210232390A1

## CPC

- H04L 41/16: using machine learning or artificial intelligence
- G06F 8/72: Code refactoring
- G06F 9/226: {Microinstruction function, e.g. input/output microinstruction; diagnostic microinstruction; microinstruction format}
- H04L 41/0803: Configuration setting
- H04L 41/40: using virtualisation of network functions or resources, e.g. SDN or NFV entities
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and techniques that facilitate automated recommendation of microservice decomposition strategies for monolithic applications are provided. In various embodiments, a community detection component can detect a disjoint code cluster in a monolithic application based on a code property graph characterizing the monolithic application. In various aspects, the code property graph can be based on a temporal code evolution of the monolithic application. In various embodiments, a topic modeling component can identify a functional purpose of the disjoint code cluster based on a business document corpus corresponding to the monolithic application. In various embodiments, a microservices component can recommend a microservice to replace the disjoint code cluster based on the functional purpose.

## Claims

### Claim 1

A system, comprising:
a memory that stores computer-executable components; and
a processor, operably coupled to the memory, that executes the computer-executable components stored in the memory, wherein the computer-executable components comprise:
a community detection component that detects a disjoint code cluster in a monolithic application based on a code property graph characterizing the monolithic application;
a topic modeling component that identifies a functional purpose of the disjoint code cluster based on a business document corpus corresponding to the monolithic application; and
a microservices component that recommends a microservice to replace the disjoint code cluster based on the functional purpose.

### Claim 2 (depends on 1)

The system of claim 1, wherein the business document corpus includes at least one from a group consisting of a design document, a user guide, a code annotation, a wiki-document, a github-document, and a readme-document corresponding to the monolithic application.

### Claim 3 (depends on 1)

The system of claim 1, wherein the code property graph is based on a temporal code evolution of the monolithic application.

### Claim 4 (depends on 3)

The system of claim 3, further comprising:
a graph component that:
generates the code property graph based on source code of the monolithic application, wherein the code property graph comprises a combination of an abstract syntax tree, a control flow graph, and a program dependence graph characterizing the monolithic application; and
augments edge weights of the code property graph based on the temporal code evolution, wherein the temporal code evolution comprises changes to the source code of the monolithic application over time.

### Claim 5 (depends on 1)

The system of claim 1, wherein the topic modeling component identifies the functional purpose of the disjoint code cluster by employing a Latent Dirichlet Allocation algorithm.

### Claim 6 (depends on 1)

The system of claim 1, further comprising:
a feedback component that collects user feedback associated with the recommended microservice and the disjoint code cluster, wherein the feedback component modifies parameters of the community detection component or parameters of the topic modeling component based on the collected user feedback.

### Claim 7 (depends on 1)

The system of claim 1, further comprising:
a dependency pattern storage component that stores dependency patterns learned from code property graphs of other monolithic applications, wherein the community detection component and the topic modeling component leverage the dependency patterns to identify the disjoint code cluster and the functional purpose.

### Claim 8 (depends on 1)

The system of claim 1, wherein the microservices component replaces the disjoint code cluster with the recommended microservice.

### Claim 9

A computer-implemented method, comprising:
detecting, by a device operatively coupled to a processor, a disjoint code cluster in a monolithic application based on a code property graph characterizing the monolithic application;
identifying, by the device, a functional purpose of the disjoint code cluster based on a business document corpus corresponding to the monolithic application; and
recommending, by the device, a microservice to replace the disjoint code cluster based on the functional purpose.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, wherein the business document corpus includes at least one from a group consisting of a design document, a user guide, a code annotation, a wiki-document, a github-document, and a readme-document corresponding to the monolithic application.

### Claim 11 (depends on 9)

The computer-implemented method of claim 9, wherein the code property graph is based on a temporal code evolution of the monolithic application.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, further comprising:
generating, by the device, the code property graph based on source code of the monolithic application, wherein the code property graph comprises a combination of an abstract syntax tree, a control flow graph, and a program dependence graph characterizing the monolithic application; and
augmenting, by the device, edge weights of the code property graph based on the temporal code evolution, wherein the temporal code evolution comprises changes to the source code of the monolithic application over time.

### Claim 13 (depends on 9)

The computer-implemented method of claim 9, wherein the identifying the functional purpose of the disjoint code cluster employs a Latent Dirichlet Allocation algorithm.

### Claim 14 (depends on 9)

The computer-implemented method of claim 9, further comprising:
collecting, by the device, user feedback associated with the recommended microservice and the disjoint code cluster; and
modifying, by the device, parameters of an algorithm that facilitates the detecting the disjoint code cluster or parameters of an algorithm that facilitates the identifying the functional purpose based on the collected user feedback.

### Claim 15 (depends on 9)

The computer-implemented method of claim 9, further comprising:
storing, by the device, dependency patterns learned from code property graphs of other monolithic applications, wherein the dependency patterns facilitate the detecting the disjoint code cluster and the identifying the functional purpose.

### Claim 16 (depends on 9)

The computer-implemented method of claim 9, further comprising:
replacing, by the device, the disjoint code cluster with the recommended microservice.

### Claim 17

A computer program product for facilitating automated recommendation of microservice decomposition strategies for monolithic applications, the computer program product comprising a computer readable memory having program instructions embodied therewith, the program instructions executable by a processing component to cause the processing component to:
detect a disjoint code cluster in a monolithic application based on a code property graph characterizing the monolithic application;
identify a functional purpose of the disjoint code cluster based on a business document corpus corresponding to the monolithic application; and
recommend a microservice to replace the disjoint code cluster based on the functional purpose.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the business document corpus includes at least one from a group consisting of a design document, a user guide, a code annotation, a wiki-document, a github-document, and a readme-document corresponding to the monolithic application.

### Claim 19 (depends on 17)

The computer program product of claim 17, wherein the code property graph is based on a temporal code evolution of the monolithic application.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein the program instructions are further executable to cause the processing component to:
generate the code property graph based on source code of the monolithic application, wherein the code property graph comprises a combination of an abstract syntax tree, a control flow graph, and a program dependence graph characterizing the monolithic application; and
augment edge weights of the code property graph based on the temporal code evolution, wherein the temporal code evolution comprises changes to the source code of the monolithic application over time.

### Claim 21

An apparatus, comprising:
a processor, operably coupled to a memory, that executes computer-executable components stored in the memory, wherein the computer-executable components comprise:
a community detection component that identifies candidates for microservice decomposition in a monolithic application based on a code property graph corresponding to the monolithic application; and
a topic modeling component that identifies functions respectively performed by the identified candidates based on business documents corresponding to the monolithic application.

### Claim 22 (depends on 21)

The apparatus of claim 21, wherein the business documents include at least one from a group consisting of a design document, a user guide, a code annotation, a wiki-document, a github-document, and a readme-document corresponding to the monolithic application.

### Claim 23 (depends on 21)

The apparatus of claim 21, further comprising:
a graph component that generates the code property graph based on source code of the monolithic application and modifies the code property graph based on a temporal code evolution of the monolithic application.

### Claim 24

A computer-implemented method, comprising:
identifying, by a device communicatively coupled to a processor, candidates for microservice decomposition in a monolithic application based on a code property graph corresponding to the monolithic application; and
identifying, by the device, functions respectively performed by the identified candidates based on business documents corresponding to the monolithic application.

### Claim 25 (depends on 24)

The computer-implemented method of claim 24, further comprising:
generating, by the device, the code property graph based on source code of the monolithic application; and
modifying, by the device, the code property graph based on a temporal code evolution of the monolithic application.
