Microservice creation using runtime metadata
Abstract
A computer implemented method creates microservices for an application. A number of processor units clusters programs and data structures for the application using runtime metadata to form groups of the programs and data structures. The runtime metadata is obtained from running the application. The number of processor units creates a design for the microservices for the application using the groups of the programs and the data structures.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 8 · Forward citations: 1.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
A computer implemented method for creating microservices for an application, the computer implemented method comprising: clustering, by a number of processor units, programs and data structures for the application using runtime metadata to form groups of the programs and the data structures for the microservices, wherein the runtime metadata is obtained from running the application and wherein the runtime metadata comprises information describing how the programs in the application interacts with data in the data structures in response to running the application; creating, by the number of processor units, a design for the microservices for the application using the groups of the programs and the data structures; recommending, by the number of processor units, updates to the groups to meet a set of objectives; and performing, by the number of process or units, a number of the updates to the groups of the programs and the data structures based a selection of the number of the updates, wherein each group in the groups is for a microservice in the microservices and wherein recommending, by the number of processor units, the updates to the groups to meet the set of objectives comprises: identifying a first number of cross database queries that access a data structure in a source database for the data structure; determining a first execution frequency for the first number of cross database queries; identifies a second number of cross database queries that occur from placing the data structure in a target database; determining a second execution frequency for the second number of cross database queries; and recommending moving the data structure from the source database to the target database in response to the second execution frequency being less than the first execution frequency by a threshold.
- Claim 2Depends on #1
The computer implemented method of claim 1, wherein clustering, by the number of processor units, the programs and the data structures for the application using the runtime metadata to form the groups of the programs and the data structures comprises: creating, by the number of processor units, a call graph, wherein nodes in the call graph represent the programs and the data structures in the application and wherein edges between the nodes identify relationships between the programs and between the programs and the data structures; and clustering, by the number of processor units, the programs and the data structures for the application using the call graph and the runtime metadata to form the groups of the programs and the data structures, wherein the runtime metadata is obtained from running the application.
- Claim 3Depends on #2
The computer implemented method of claim 2 further comprising: setting, by the number of processor units, weights for the edges in the call graph using the runtime metadata.
- Claim 4Depends on #3
The computer implemented method of claim 3, wherein the runtime metadata used to set the weights are selected from a group consisting at least one of a frequency a table is accessed by a particular program, an execution frequency of queries on a database, a frequency at which different queries are made by a program, average time to execute a query, change in data schemas, times at which the queries are executed, or an average output size for the query.
- Claim 5Depends on #1
The computer implemented method of claim 1, wherein each group in the groups is for a microservice in the microservices and wherein recommending, by the number of processor units, the updates to the groups to meet the set of objectives comprises: recommending, by the number of processor units, the updates to the groups that reduce data access issues in accessing data in the microservices, wherein the updates comprises placement of the programs and data structures in the groups taking into account the runtime metadata using criteria that reduces the data access issues.
- Claim 6Depends on #1
The computer implemented method of claim 1, further comprising: determining, by the number of processor units, an order in which to create the microservices for the application based a complexity of each of the microservices.
- Claim 7Independent Claim
A computer system comprising: a number of processor units, wherein the number of processor units executes program instructions to: cluster programs and data structures for an application using runtime metadata to form groups of the programs and the data structures for microservices, wherein the runtime metadata is obtained from running the application and wherein the runtime metadata comprises information describing how the programs in the application interacts with data in the data structures in response to running the application; create a design for microservices for the application using the groups of the programs and the data structures; recommend updates to the groups to meet a set of objectives; and perform a number of the updates to the groups of the programs and the data structures on a selection of the number of the updates, wherein each group in the groups is for a microservice in the microservices and wherein recommend updates to the groups to meet the set of objectives comprises: identify a first number of cross database queries that access a data structure in a source database for the data structure; determine a first execution frequency for the first number of cross database queries; identify a second number of cross database queries that occur from placing the data structure in a target database; determine a second execution frequency for the second number of cross database queries; and recommend moving the data structure from the source database to the target database in response to the second execution frequency being less than the first execution frequency by a threshold.
- Claim 8Depends on #7
The computer system of claim 7, wherein in clustering the programs and the data structures for the application using the runtime metadata to form the groups of the programs and the data structures, the number of processor units executes the program instructions to: create a call graph, wherein nodes in the call graph represent the programs and the data structures in the application and wherein edges between the nodes identify relationships between the programs and between the programs and the data structures; and cluster the programs and the data structures for the application using the call graph and the runtime metadata to form the groups of the programs and the data structures, wherein the runtime metadata is obtained from running the application.
- Claim 9Depends on #8
The computer system of claim 8, wherein the number of processor units executes the program instructions to: set weights for the edges in the call graph using the runtime metadata.
- Claim 10Depends on #9
The computer system of claim 9, wherein the runtime metadata used to set the weights are selected from a group consisting at least one of a frequency a table is accessed by a particular program, an execution frequency of queries on a database, a frequency at which different queries are made by a program, average time to execute a query, change in data schemas, times at which the queries are executed, or an average output size for the query.
- Claim 11Depends on #7
The computer system of claim 7, wherein in recommending the updates to the groups to meet the set of objectives, the number of processor units executes the program instructions to: recommend the updates to the groups that reduce data access issues in accessing data in the microservices.
- Claim 12Depends on #7
The computer system of claim 7, wherein the number of processor units executes the program instructions to: determine an order in which to create the microservices for the application based a complexity of each of the microservices.
- Claim 13Independent Claim
A computer program product for creating microservices for an application, the computer program product comprising a computer-readable storage medium having program instructions embodied therewith, the program instructions executable by a computer system to cause the computer system to perform a method of: clustering programs and data structures for the application using runtime metadata to form groups of the programs and the data structures for the microservices, wherein the runtime metadata is obtained from running the application and wherein the runtime metadata comprises information describing how the programs in the application interacts with data in the data structures in response to running the application; creating a design for the microservices for the application using the groups of the programs and the data structures; recommending updates to the groups to meet a set of objectives; and performing a number of the updates to the groups of the programs and the data structures based a selection of the number of the updates, wherein each group in the groups is for a microservice in the microservices and wherein recommending, by the number of processor units, the updates to the groups to meet the set of objectives comprises: identifying a first number of cross database queries that access a data structure in a source database for the data structure; determining a first execution frequency for the first number of cross database queries; identifies a second number of cross database queries that occur from placing the data structure in a target database; determining a second execution frequency for the second number of cross database queries; and recommending moving the data structure from the source database to the target database in response to the second execution frequency being less than the first execution frequency by a threshold.
- Claim 14Depends on #13
The computer program product of claim 13, wherein clustering the programs and the data structures for the application using the runtime metadata to form the groups of the programs and the data structures comprises: creating a call graph, wherein nodes in the call graph represent the programs and the data structures in the application and wherein edges between the nodes identify relationships between the programs and between the programs and the data structures; and clustering the programs and the data structures for the application using the call graph and the runtime metadata to form the groups of the programs and the data structures, wherein the runtime metadata is obtained from running the application.
- Claim 15Depends on #13
The computer program product of claim 13, wherein refining the groups of the programs and the data structures based on a policy that defines rules for grouping the programs and the data structures comprises: refining the groups of the programs and the data structures based that reduces data access issues in the microservices.
- Claim 16Depends on #1
The computer implemented method of claim 1, wherein the data structure is a table, the source database is source micro database, and the target database is a target micro database.
- Claim 17Depends on #1
The computer implemented method of claim 1, wherein each group in the groups is for a microservice in the microservices and wherein recommending, by the number of processor units, the updates to the groups to meet the set of objectives comprises: identifying a list of data structure tables that have frequently changed schema in which the frequently changed schema are schema that have changes greater than a threshold; determining whether all tables in the list of tables are in a single micro database; and recommending placing all tables in the list of tables in a single micro database in response to all of the tables in the list of table not being in a single micro database.
- Claim 18Depends on #14
The computer program product of claim 14 further comprising: setting weights for the edges in the call graph using the runtime metadata.
- Claim 19Depends on #18
The computer program product of claim 18, wherein the runtime metadata used to set the weights are selected from a group consisting at least one of a frequency a table is accessed by a particular program, an execution frequency of queries on a database, a frequency at which different queries are made by a program, average time to execute a query, change in data schemas, times at which the queries are executed, or an average output size for the query.
- Claim 20Depends on #13
The computer program product of claim 13, wherein the data structure is a table, the source database is source micro database, and the target database is a target micro database.
Technical Overview & Description
BACKGROUND 1. Field The disclosure relates generally to an improved computer system and more specifically to creating microservices for an application using runtime metadata associated with data. 2. Description of the Related Art A monolithic architecture is a traditional model for a software application. In this traditional model, the software application is built as a unified unit that is self-contained and independent from other applications. This type of application is difficult to manage because interdependent processes in the application can be easily affected if a single process in the application fails or has an error. In addition, adding or enhancing features of a monolith application becomes more complicated because the code for all of the features are deployed together. Another type of architecture for applications is a microservices architecture. With this type of architecture, an application is represented as a set of microservices where each microservice includes programs and data structures for one functionality of the application. With a microservices architecture, an application is built as a collection of independent components. For example, a business transaction application built with a microservices architecture can have a microservice that functions to perform monetary transactions, and another microservice that performs invoice creation. Microservices in a microservices architecture can be deployed, updated, and scaled according to the demand for their specific functions. The different microservices run independently of each other making deployment and updating less complex. SUMMARY According to one illustrative embodiment, a computer implemented method creates microservices for an application. A number of processor units clusters programs and data structures for the application using runtime metadata to form groups of the programs and data structures. The runtime metadata is obtained from running the application. The number of processor units
Cited By — Indexed Forward Citations (1 of 1 total)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 12,710,940 B2 | Automated profiling and partitioning of functions | 2026 | 0 |
References Cited — Backward Prior Art (8)
Non-Patent Literature (10)
- Desai et al.,
- “
- Graph Neural Network to Dilute Outliers for Refactoring Monolith Application,
- ”
- 35th AAAI Conference on Artificial Intelligence (AAAI 2021), Feb. 2-9, 2021, 13 pages. https://arxiv.org/pdf/2102.03827.pdf.
- Mathai et al.,
- “
- Monolith to Microservices: Representing Application Software through Heterogeneous Graph Neural Network,
- ”
- 2022 International Joint Conference on Artificial Intelligence (IJCAI-22), Jul. 23-29, 2022, Vienna, Austria, 15 pages.