# US 2020/0401386 A1 · Reconfiguring application software into microservice architecture

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

- Number: US 2020/0401386 A1
- Document ID: US20200401386A1
- Status: Published application
- Kind: A1
- Application number: 16/445,880
- Filed: 2019-06-19
- Published: 2020-12-24
- Earliest claimed: 2019-06-19
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Gireesh Punathil; Vijayalakshmi Kannan; Deepthi Sebastian
- Web page: https://patentgrep.com/patent/US20200401386A1

## CPC

- G06F 8/436: {Semantic checking}
- G06F 8/433: {Dependency analysis; Data or control flow analysis}
- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F 8/75: Structural analysis for program understanding
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An automated method extracts the topology of a software application, identifies static and runtime internal code flow, data flow, dependencies, accessibility, reachability, and resource consumption characteristics of the application. The method identifies code refactoring boundaries, and helps to adapt and/or re-configure the software application into a set of microservices for deployment in a cloud environment.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving a software application comprising a plurality of code blocks, including a first code block and a second code block;
semantically parsing, in conjunction with statically analyzing, in a recursive depth-first-search manner, the plurality of code blocks of the software application, to generate an abstract topology model of the software application where the abstract topology model has a first node and a second node respectively corresponding to the first code block and the second code block;
determining, with respect to interrelationships among and between the plurality of code blocks: (i) a dependency information; (ii) a reachability information, and (iii) an accessibility information;
determining, respectively, a plurality of resource consumption profiles for each of the plurality of code blocks, including a first resource consumption profile corresponding to the first code block and a first resource;
generating an architectural model of the software application, based on a combination of: (i) the abstract topology model, (ii) the dependency information, (iii) the accessibility information, (iv) the reachability information, and (v) the first resource consumption profile; and
restructuring the software application into a plurality of microservices based, at least in part, on the architectural model.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
the dependency information comprises a relationship between the first code block and the second code block where the first code block generates an output object and the second code block depends on the output object;
the reachability information comprises information with respect to a relationship between the first code block and the second code block, where the first code block has access to a data object of the second code block; and
the accessibility information comprises information with respect to a relationship between the first code block and a global data object, where the first code block has access to the global data object.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the dependency information comprises:
receiving the abstract topology model;
monitoring an execution of the software application, to determine a runtime dependency profile of the software application; and
generating a dependency model based on the abstract topology model in conjunction with the runtime dependency profile.

### Claim 4 (depends on 3)

The method of claim 3, wherein the dependency model represents dependency interrelationships among and between the plurality of code blocks.

### Claim 5 (depends on 3)

The method of claim 3, wherein determining the reachability information comprises:
receiving the dependency model;
subjecting the application to runtime control flow analysis;
determining, based at least in part on the dependency model in conjunction with the runtime control flow analysis, a first subset of code blocks, of the plurality of code blocks, where the first subset of code blocks appears in both of the abstract topology model and a result of the runtime control flow analysis; and
generating a reachability model based, at least in part, on a combination of the dependency model, the result of the runtime control flow analysis, and the first subset of code blocks.

### Claim 6 (depends on 5)

The method of claim 5, wherein determining the accessibility information comprises:
receiving the dependency model;
receiving the reachability model;
subjecting the application to runtime data flow analysis;
identifying a path of a data object where the data object is passed among a second subset of code blocks at runtime;
fusing the second subset of code blocks into a parent code block; and
generating an accessibility model based, at least in part, on the parent code block.

### Claim 7 (depends on 1)

The method of claim 1, wherein:
the first resource consumption profile, with respect to the first code block, includes information selected from the group consisting of:
an amount of a resource consumed, as measured during runtime, and
a predicted amount of the resource consumed, as calculated based on a static code analysis; and
the first resource is selected from the group consisting of: memory footprint, storage footprint, network bandwidth, input/output traffic, central processing unit (CPU) clock cycle, CPU time, electrical power usage, and electrical energy consumed.

### Claim 8

A computer program product comprising a computer readable storage medium having stored thereon program instructions programmed to perform:
receiving a software application comprising a plurality of code blocks, including a first code block and a second code block;
semantically parsing, in conjunction with statically analyzing, in a recursive depth-first-search manner, the plurality of code blocks of the software application, to generate an abstract topology model of the software application where the abstract topology model has a first node and a second node respectively corresponding to the first code block and the second code block;
determining, with respect to interrelationships among and between the plurality of code blocks: (i) a dependency information; (ii) a reachability information, and (iii) an accessibility information;
determining, respectively, a plurality of resource consumption profiles for each of the plurality of code blocks, including a first resource consumption profile corresponding to the first code block and a first resource;
generating an architectural model of the software application, based on a combination of: (i) the abstract topology model, (ii) the dependency information, (iii) the accessibility information, (iv) the reachability information, and (v) the first resource consumption profile; and
restructuring the software application into a plurality of microservices based, at least in part, on the architectural model.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein:
the dependency information comprises a relationship between the first code block and the second code block where the first code block generates an output object and the second code block depends on the output object;
the reachability information comprises information with respect to a relationship between the first code block and the second code block, where the first code block has access to a data object of the second code block; and
the accessibility information comprises information with respect to a relationship between the first code block and a global data object, where the first code block has access to the global data object.

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein determining the dependency information comprises:
receiving the abstract topology model;
monitoring an execution of the software application, to determine a runtime dependency profile of the software application; and
generating a dependency model based on the abstract topology model in conjunction with the runtime dependency profile.

### Claim 11 (depends on 10)

The computer program product of claim 10, wherein the dependency model represents dependency interrelationships among and between the plurality of code blocks.

### Claim 12 (depends on 10)

The computer program product of claim 10, wherein determining the reachability information comprises:
receiving the dependency model;
subjecting the application to runtime control flow analysis;
determining, based at least in part on the dependency model in conjunction with the runtime control flow analysis, a first subset of code blocks, of the plurality of code blocks, where the first subset of code blocks appears in both of the abstract topology model and a result of the runtime control flow analysis; and
generating a reachability model based, at least in part, on a combination of the dependency model, the result of the runtime control flow analysis, and the first subset of code blocks.

### Claim 13 (depends on 12)

The computer program product of claim 12, wherein determining the accessibility information comprises:
receiving the dependency model;
receiving the reachability model;
subjecting the application to runtime data flow analysis;
identifying a path of a data object where the data object is passed among a second subset of code blocks at runtime;
fusing the second subset of code blocks into a parent code block; and
generating an accessibility model based, at least in part, on the parent code block.

### Claim 14 (depends on 8)

The computer program product of claim 8, wherein:
the first resource consumption profile, with respect to the first code block, includes information selected from the group consisting of:
an amount of a resource consumed, as measured during runtime, and
a predicted amount of the resource consumed, as calculated based on a static code analysis; and
the first resource is selected from the group consisting of: memory footprint, storage footprint, network bandwidth, input/output traffic, central processing unit (CPU) clock cycle, CPU time, electrical power usage, and electrical energy consumed.

### Claim 15

A computer system comprising:
a processor set; and
a computer readable storage medium;
wherein:
the processor set is structured, located, connected and/or programmed to run program instructions stored on the computer readable storage medium; and
the program instructions include instructions programmed to perform;
receiving a software application comprising a plurality of code blocks, including a first code block and a second code block;
semantically parsing, in conjunction with statically analyzing, in a recursive depth-first-search manner, the plurality of code blocks of the software application, to generate an abstract topology model of the software application where the abstract topology model has a first node and a second node respectively corresponding to the first code block and the second code block;
determining, with respect to interrelationships among and between the plurality of code blocks: (i) a dependency information; (ii) a reachability information, and (iii) an accessibility information;
determining, respectively, a plurality of resource consumption profiles for each of the plurality of code blocks, including a first resource consumption profile corresponding to the first code block and a first resource;
generating an architectural model of the software application, based on a combination of: (i) the abstract topology model, (ii) the dependency information, (iii) the accessibility information, (iv) the reachability information, and (v) the first resource consumption profile; and
restructuring the software application into a plurality of microservices based, at least in part, on the architectural model.

### Claim 16 (depends on 15)

The computer system of claim 15, wherein:
the dependency information comprises a relationship between the first code block and the second code block where the first code block generates an output object and the second code block depends on the output object;
the reachability information comprises information with respect to a relationship between the first code block and the second code block, where the first code block has access to a data object of the second code block; and
the accessibility information comprises information with respect to a relationship between the first code block and a global data object, where the first code block has access to the global data object.

### Claim 17 (depends on 15)

The computer system of claim 15, wherein determining the dependency information comprises:
receiving the abstract topology model;
monitoring an execution of the software application, to determine a runtime dependency profile of the software application; and
generating a dependency model based on the abstract topology model in conjunction with the runtime dependency profile.

### Claim 18 (depends on 17)

The computer system of claim 17, wherein the dependency model represents dependency interrelationships among and between the plurality of code blocks.

### Claim 19 (depends on 17)

The computer system of claim 17, wherein determining the reachability information comprises:
receiving the dependency model;
subjecting the application to runtime control flow analysis;
determining, based at least in part on the dependency model in conjunction with the runtime control flow analysis, a first subset of code blocks, of the plurality of code blocks, where the first subset of code blocks appears in both of the abstract topology model and a result of the runtime control flow analysis; and
generating a reachability model based, at least in part, on a combination of the dependency model, the result of the runtime control flow analysis, and the first subset of code blocks.

### Claim 20 (depends on 19)

The computer system of claim 19, wherein determining the accessibility information comprises:
receiving the dependency model;
receiving the reachability model;
subjecting the application to runtime data flow analysis;
identifying a path of a data object where the data object is passed among a second subset of code blocks at runtime;
fusing the second subset of code blocks into a parent code block; and
generating an accessibility model based, at least in part, on the parent code block.
