Computer-Implemented Method, Computer Program, and System (Constraint-Based Refactoring of Monolith Applications via Attribution Graph Embedding)

The constraint-based graph convolutional network approach addresses challenges in refactoring monolith applications to microservices by clustering nodes and identifying outlier classes, enabling efficient migration to a cloud-enabled architecture.

JP7798443B2Active Publication Date: 2026-01-14INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2022119230
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-09-07
Filing Date
2022-07-27
Publication Date
2026-01-14
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

Refactoring monolith applications to microservices architectures is challenging due to difficulties in understanding domain model boundaries, ranking application classes for refactoring, injecting core application artifacts for clustering, and determining metrics for clustering decisions, especially when developers lack access to the application's runtime or code.

Method used

A constraint-based approach using graph convolutional networks for node representation, outlier detection, and clustering, which includes generating a graph structure from monolith application source code, identifying constraints, and clustering nodes into microservices based on these constraints, using techniques like static analysis and convolutional neural networks.

Benefits of technology

Effectively refactors monolith applications into microservices by identifying cohesive clusters and outlier classes, providing recommendations for modifying the application to facilitate migration to a cloud-enabled architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007798443000018
    Figure 0007798443000018
  • Figure 0007798443000019
    Figure 0007798443000019
  • Figure 0007798443000020
    Figure 0007798443000020
Patent Text Reader

Abstract

To provide a method, system. and computer program product for constraints-based refactoring of monolith applications through attributed graph embeddings.SOLUTION: The method includes: performing an analysis of source code of a monolith application to identify structural features and behavioral features; and generating a graph structure representing the monolith application based on the identified structural features and the identified behavioral features. The graph structure comprises a plurality of nodes, and each of the nodes corresponds to one of a plurality of software modules of the monolith application, and each of edges represents a relationship of the corresponding nodes. The method further includes: automatically identifying constraints associated with the plurality of nodes in the graph structure based on the analysis of the source code; clustering the nodes using a convolutional neural network based the constraints; and outputting candidate microservices corresponding to respective ones of the clusters for refactoring the monolith application.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application relates generally to information technology, and more particularly to application modernization. [Background technology]

[0002] With the move to the cloud, organizations are increasingly trying to refactor their monolith application architectures into microservices architectures. Generally, refactoring to a microservices architecture involves breaking down software components into smaller modules that can be developed independently. A microservices architecture has a natural advantage when deploying on the cloud, as it can dynamically allocate resources to the required components based on demand. Summary of the Invention [Problem to be solved by the invention]

[0003] A method, system, and computer program product are provided for constraint-based refactoring of monolith applications via attribution graph embedding. [Means for solving the problem]

[0004] In one embodiment of the present disclosure, a technique for refactoring a monolith application through attribution graph embedding is provided. An exemplary computer-implemented method includes: performing an analysis of source code of the monolith application to identify one or more structural features and one or more behavioral features; generating a graph structure representing the monolith application based at least in part on the identified structural features and the identified behavioral features, the graph structure comprising a plurality of nodes, each node corresponding to one of a plurality of software modules of the monolith application, and a plurality of edges between the plurality of nodes, each edge representing a relationship between the corresponding nodes; automatically identifying one or more constraints associated with the plurality of nodes in the graph structure based at least in part on the analysis of the source code; clustering the plurality of nodes into one or more clusters using a convolutional neural network based at least in part on the one or more identified constraints; and outputting one or more candidate microservices for refactoring the monolith application to a user, each of the one or more candidate microservices corresponding to a respective one of the one or more clusters.

[0005] Another embodiment of the present disclosure, or elements thereof, may be implemented in the form of a computer program product tangibly embodying computer-readable instructions that, when implemented, cause a computer to perform a plurality of method steps as described herein. Furthermore, another embodiment of the present disclosure, or elements thereof, may be implemented in the form of a system including a memory and at least one processor coupled to the memory and configured to perform the described method steps. Furthermore, another embodiment of the present disclosure, or elements thereof, may be implemented in the form of a means, or elements thereof, for performing the method steps described herein. The means may include hardware modules or a combination of hardware and software modules, with the software modules being stored on a tangible computer-readable storage medium (or multiple such media).

[0006] These and other objects, features and advantages of the present disclosure will become apparent from the following detailed description of illustrative embodiments thereof, which is to be read in connection with the accompanying drawings. [Brief explanation of the drawings]

[0007] [Figure 1] FIG. 1 illustrates a system architecture according to an exemplary embodiment of the present disclosure. [Figure 2] FIG. 10 illustrates an example of cross-class usage information, according to an exemplary embodiment of the present disclosure. [Figure 3] FIG. 1 illustrates an example of a graph of classes for a monolith application, according to an exemplary embodiment of the present disclosure. [Figure 4] FIG. 2 illustrates an example of a portion of a call graph according to an exemplary embodiment of the present disclosure. [Figure 5] FIG. 10 illustrates another example of a graph of classes for a monolith application, according to an exemplary embodiment of the present disclosure. [Figure 6A] FIG. 1 illustrates different clusters of a monolith application, according to an exemplary embodiment of the present disclosure. [Figure 6B] FIG. 6B illustrates a table of outliers for the clusters from FIG. 6A according to an exemplary embodiment of the present disclosure. [Figure 7] FIG. 1 is a flow diagram illustrating a technique according to an embodiment of the present disclosure. [Figure 8] FIG. 1 is a system diagram of an exemplary computer system in which at least one embodiment of the present disclosure may be implemented. [Figure 9] FIG. 1 illustrates a cloud computing environment, according to an embodiment of the present disclosure. [Figure 10] 1 illustrates an abstraction model layer according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0008] A monolith application generally refers to an application that is built as a single unit. For example, a monolith application might include a database, a client-side user interface, and a server-side application server, with all functionality managed and provided in a single location. Therefore, monolith applications often have a large and complex code base. Developers who make changes or updates to the application need access to the same code base.

[0009] A microservices architecture decomposes an application into multiple microservices, each running a process for the application. Microservices can communicate with each other through application programming interfaces (APIs). In contrast to monolith architectures, each microservice can be updated and deployed independently.

[0010] Application refactoring is the process of rewriting one or more components of an application, for example, to make it cloud-enabled or to convert an application from a monolith application to one based on microservices. However, developers may not be able to access the application's runtime or share code due to, for example, a lack of available resources. Generally, when designing microservices, it is easy to define interfaces and identify context boundaries, but when refactoring an application that has already been implemented, it becomes more difficult to understand the boundaries of the domain model. Other challenges associated with refactoring include ranking the application classes (or programs) that require refactoring to ease the migration, injecting multiple core application artifacts for clustering, and determining the metrics to drive the clustering decision and the corresponding objective function.

[0011] As described herein, embodiments of the present disclosure include techniques that apply graph convolutional network processes to unify node representation, outlier node detection and dilution, and node clustering into the same framework for refactoring monolith applications. One or more embodiments perform constraint-based representation learning and clustering, where constraints are required elements that are considered and observed during the refactoring process. Such constraints may include, for example, constraints on the number of microservices (K clusters), constraints on required nodes to be included in the K microservices, and one or more constraints specific to at least one programming language or framework. In some embodiments, constraints on the number of microservices and required nodes may be inferred automatically (e.g., through program analysis) or provided by a user, or both. Constraints specific to a programming language or framework, or a combination thereof, may be added manually by a developer, or may be predefined, or both. As a non-limiting example, a predefined constraint in Java may require that a superclass and its only subclasses be included in the same microservice.

[0012] As described in more detail herein, a monolith application may be divided into K clusters of classes, each cluster being a group of classes that perform a well-defined function. The clusters should exhibit high cohesion (e.g., strong interactions within a cluster) and low connectivity (e.g., little interaction between clusters). Furthermore, at least one embodiment includes identifying the following outlier classes: (i) a structural outlier class and (ii) an attribute outlier class. In general, a structural outlier class has high interactions with classes from different clusters, and an attribute outlier class contains attributes (e.g., usage patterns) that are similar to attributes from other clusters.

[0013] Additionally, some embodiments use static analysis to inject structural, semantic, and behavioral characteristics of the monolith application. An attribute network is generated to perform constraint-based refactoring of the monolith application through automated and / or manual constraint-based attribute graph embedding. Constraints may include, for example, the number of microservices, the core membership of such microservices, and program / resource membership requirements (e.g., whether two classes must be in the same microservice or whether two classes must be in different microservices) learned from user input and program analysis. The attribute network, in some embodiments, is used to recommend refactorable programs.

[0014] Figure 1 illustrates a system architecture according to an exemplary embodiment of the present disclosure. The example of Figure 1 includes a refactoring system 102 comprising a graph representation generator 104, a constraint determination module 106, and a constraint-based graph convolution network module 108. The refactoring system 102 receives as input source code 112 corresponding to a monolith application, entry point definitions 114, and, optionally, one or more constraints 116. Generally, the graph representation generator 104 generates a graph structure representation of the monolith application based on a static analysis of the source code 112. Furthermore, the constraint determination module 106 automatically determines one or more constraints based on the inputs 112 and 114, in addition to the constraints 116 provided by a user, for example. The constraint-based graph convolution network module 108 performs constraint-based representation learning and clustering while adhering to the constraints determined by the module 108. The refactoring system 102 generates a user-directed output 118 related to the refactoring of the monolith application. As described in more detail elsewhere herein, the output 118 may include at least one of a set of candidate microservices determined by the constraint-based graph convolutional network module 108, recommendations to modify one or more portions of the monolith application to refactor the monolith application, or a set of outlier nodes corresponding to refactorable programs.

[0015] At least one embodiment includes generating a graph representation of the monolith application, where the generated graph includes nodes that represent program elements (e.g., classes in the monolith application) and edges that represent structural dependencies between the nodes. For example, if a function from class A calls class B, an edge is created between the node corresponding to class A and the node corresponding to class B. Optionally, the graph may include node attributes of one or more nodes that represent additional information about the program element of the corresponding node. By way of example, the attributes may include the Uniform Resource Identifier (URI) of the class, a call graph that includes the class, and CRUD (Create, Read, Update, and Delete) operations associated with the class.

[0016] Note that a graph representation is a natural choice for capturing the detailed structure of a monolith application. For example, each software entity can be represented as a node, and its dependencies on other entities as links (or edges). Furthermore, many insights gained from application artifacts make them natural candidates for a graph representation.

[0017] For example, for inter-class dependency (ICU), the graph contains nodes representing classes, tables, or user interface elements, and edges can represent direct dependencies (e.g., method or table calls). For path-class co-occurrence (PCC), the graph's nodes can represent classes, tables, or user interface elements, and call flows (e.g., method or table calls) are represented as edges, but abstracted at the class level. For affinity (AF), nodes can represent classes or tables, and semantic affinities (e.g., method or table calls) between nodes and other classes or tables are represented using a distance measure as edges, but abstracted at the class level. For transaction (TR), nodes can represent classes or tables, and data access pattern-type links (e.g., method or table calls) based on call flows with other classes or tables can be identified as edges. Again, information is abstracted at the class level. These insights can be divided into four graphs for four different CRUD operations. This is a subset of PCC, but we call it separately because in microservices, update operations are relatively less important than other CRUD operations.

[0018] In at least one embodiment, a graph representation is first generated using ICU, and other features are superimposed as properties on the nodes of the graph. In this way, the refactoring problem can be viewed as a graph-based clustering task.

[0019] One or more embodiments include constructing an objective function associated with a graph convolutional network (GCN) decoder-encoder based on an adjacency matrix, A, and a node attribute matrix, X, of a graph representation, G, of a monolith application. The graph representation may be represented by a set of nodes, V, a set of edges, E, and an attribute matrix, X.

[0020] TIFF0007798443000001.tif27167

[0021] TIFF0007798443000002.tif25167

[0022] TIFF0007798443000003.tif22167

[0023] TIFF0007798443000004.tif26167

[0024] The loss component that needs to be minimized for structural outliers of the GCN parameters and nodes is: TIFF0007798443000005.tif14151

[0025] TIFF0007798443000006.tif13167

[0026] The following formula reduces the contribution of node attributes of attribute outliers in the attribute reconstruction loss: TIFF0007798443000007.tif13151

[0027] TIFF0007798443000008.tif25167

[0028] To cluster nodes in a graph, we use the following loss (assuming the embedding is already given): TIFF0007798443000009.tif16150

[0029] TIFF0007798443000010.tif19167

[0030] Furthermore, as described in more detail elsewhere herein, the following loss is used to take into account one or more constraints when performing the clustering: TIFF0007798443000011.tif14151

[0031] The joint loss function is: TIFF0007798443000012.tif32151

[0032] Note that in a composite objective function, both node embedding and clustering influence each other. Therefore, in one or more embodiments, the algorithm is an integrated solution rather than a separate one. Furthermore, one or more embodiments use a gradient-based surrogate minimization in conjunction with the k-means algorithm to solve the integrated objective function. Instead of the exact number of clusters, K, a rough estimate, K o , if only K is known, o can be varied around K o To punish deviations from o ) 2 It is possible to add an additional loss component as

[0033] TIFF0007798443000013.tif53143

[0034] The total loss also includes the clustering parameters M and C. With other variables fixed, the cluster assignment matrix, M, is calculated as follows: TIFF0007798443000014.tif18152

[0035] In the next step, the k-th row of the cluster center matrix C can be found as follows: TIFF0007798443000015.tif14152

[0036] TIFF0007798443000016.tif13167

[0037] Therefore, the constraint-based clustering and outlier-aware graph convolutional network (CO-GCN) can be based on the following algorithm in some embodiments: TIFF0007798443000017.tif69165

[0038] Step 7 of the above algorithm can be performed using an optimization technique such as ADAM to minimize equation (7). As mentioned above, in some situations, only a rough estimate, K, is known. In such situations, K can be obtained in different ways. For example, in some embodiments, obtaining K involves automatically detecting the number of service entries (e.g., web APIs exposed by the application), which can also be the starting point for call graph information extracted based on static code analysis. As a non-limiting example, K can be obtained based on input from a user in a refactoring application regarding the approximate number of desired microservices, or it can be inferred from other project artifacts such as a project description or UML diagram, or both. For example, a product description might include something like, "This application allows users to log in, view their portfolios, research stock prices, and buy and sell stocks." Based on this, a user can infer that the application requires five candidate microservices.

[0039] Thus, K (trained or user-provided) is an example of one constraint that affects both clustering and graph representation through the loss function. Additional constraints may include constraints specific to a programming language or framework (e.g., in Java), constraints requiring specific core member microservices, or constraints for inclusion or exclusion of nodes in specific clusters, or a combination thereof. Thus, one or more embodiments provide a generic framework that allows users to input such constraints as needed.

[0040] Referring now to FIG. 2, this figure shows an example of cross-class usage information, according to an exemplary embodiment of the present disclosure. In this example, cross-class usage information 200 is determined for an online stock trading monolith application called DayTrader. This application allows users to set up a trading platform by, for example, configuring databases, user accounts, and trading volumes. Once set up, the platform allows users to view market overviews, check stock prices, and buy and sell stocks. More specifically, cross-class usage information 200 corresponds to an OrderDataBean entity in the DayTrader application, and shows cross-class usage information 202 for classes that use the OrderDataBean entity, and shows cross-class usage information 204 for classes used by the OrderDataBean.

[0041] FIG. 3 illustrates an example graph showing structural relationships of a monolith application, according to an exemplary embodiment of the present disclosure. Each node in the graph corresponds to a different one of the classes included in the inter-class usage information 200 of FIG. 2 . The graph illustrates the structural relationships of OrderDataBean to other classes. More specifically, the example graph in FIG. 3 illustrates different clusters or communities (using dashed ellipses 302-314) with respect to the technology group associated with the OrderDataBean node. As indicated by the inter-class usage information 200, the URI path of the OrderDataBean class is "com.ibmwebsphere.samples.daytrader.entities.OrderDataBean." Therefore, OrderDataBean may be considered part of the bean technology group 302, as indicated by arrow 316. However, the inter-class usage information 200 indicates that OrderDataBean also has links to other communities, including, for example, the JSF community 306. Therefore, OrderDataBean may be assigned a structural outlier score based on its interactions with other communities. Nodes with high outlier scores often correspond to controllers / servlets, which are large files that tend to process UI data or execute business logic, for example, with the help of various utilities. One or more embodiments can help identify the most influential outliers, which can then be used to identify various communities. For example, one or more embodiments can seed the community size based on unique URI paths, which tend to be a rough approximation of the number of domains typically involved in the application.

[0042] 4 is a diagram illustrating an example portion of a call graph 400, according to an exemplary embodiment of the present disclosure. Similar to FIGS. 2-3, call graph 400 also corresponds to the DayTrader application.

[0043] 5, which illustrates another example of a graph according to an exemplary embodiment of the present disclosure. The graph of FIG. 5 includes nodes corresponding to call graph 400.

[0044] The monolith graph also shows clusters or communities (using dashed ellipses 502-514) corresponding to different technology groups for the QuoteDataBean node. Arrows from the QuoteDataBean node represent connections from the call graph 400. According to some embodiments, the QuoteDataBean is considered an attribute outlier because the call graph information indicates that its usage patterns are similar to, for example, the usage patterns for one or more nodes in the other groups 504-514.

[0045] In accordance with an exemplary embodiment of the present disclosure, Figure 6A illustrates different clusters of a monolith application, and Figure 6B illustrates an outlier table for the clusters from Figure 6A. More specifically, chart 600 in Figure 6A illustrates 12 clusters corresponding to the DayTrader application determined based on outlier-aware graph embedding, as described in more detail elsewhere herein. Figure 6B illustrates a table 610 of the top structural, attribute, and composite outliers within the 12 clusters. The outliers are based on outlier scores calculated according to the constraint-based CO-GCN algorithm described above.

[0046] FIG. 7 is a flow diagram illustrating a technique for constraint-based refactoring of monolith applications, according to one embodiment of the present disclosure.

[0047] Step 702 includes performing an analysis of the source code of the monolith application to identify one or more structural features and one or more behavioral features.

[0048] Step 704 includes generating a graph structure representing the monolith application based at least in part on the identified one or more structural features and the identified one or more operational features, the graph structure comprising a plurality of nodes, each node corresponding to one of a plurality of software modules of the monolith application, and a plurality of edges between the plurality of nodes, each edge representing a relationship between the corresponding nodes.

[0049] Step 706 includes automatically identifying, based at least in part on the analysis of the source code, one or more constraints associated with the plurality of nodes in the graph structure.

[0050] Step 708 includes clustering the plurality of nodes into one or more clusters using a convolutional neural network based at least in part on the one or more identified constraints.

[0051] Step 710 includes outputting to the user one or more candidate microservices for refactoring the monolith application, each of the one or more candidate microservices corresponding to a respective one of the one or more clusters.

[0052] The one or more structural features may include one or more inter-class dependencies associated with the plurality of software modules. The one or more behavioral features may include at least one of a call graph of the monolith application and inter-class usage information associated with the plurality of software modules. The analysis may include identifying one or more entry points of the software application and extracting a call graph based on the identified set of entry points. The one or more constraints may include at least one of a constraint on the number of clusters resulting from the clustering, one or more cluster inclusion constraints, each of which requires at least two of the plurality of software modules to be included in the same one of the one or more clusters, and one or more cluster exclusion constraints, each of which requires at least two of the plurality of software modules to be included in different ones of the one or more clusters, and a constraint requiring a core set of software modules of the monolith application to be included in one or more clusters. The technique depicted in FIG. 7 may include the following steps. One or more of the plurality of nodes in the graph structure are determined to be outliers based on at least one of the identified one or more structural features and the identified one or more behavioral features, and the convolutional neural network considers the one or more outlier nodes in the clustering. Further, the steps may include generating recommendations for modifying at least a portion of the one or more outlier nodes to refactor the monolith application and outputting the recommendations to a user. In some embodiments, the steps may include obtaining at least one additional constraint from the user, the at least one additional constraint being specific to at least one of the one or more software frameworks and one or more computer programming languages. The analysis may include static source code analysis.

[0053] The technology depicted in FIG. 7 may also include providing a system, as described herein. The system includes separate software modules, each of which is embodied on a tangible computer-readable recordable medium. All of the modules (or any subset thereof) may be on the same medium, for example, or each may be on different mediums. The modules may include any or all of the components shown in the figure and / or described herein. In one embodiment of the present invention, the modules may be executed, for example, on a hardware processor. Method steps may then be performed using separate software modules of a system such as those described above, executed on the hardware processor. Additionally, a computer program product may include a tangible computer-readable medium having code adapted to perform at least one method step described herein, including providing a system with separate software modules.

[0054] 7 may be implemented via a computer program product that may include computer usable program code stored on a computer-readable storage medium at a data processing system, the computer usable program code being downloaded over a network from a remote data processing system. Also, in embodiments of the present invention, the computer program product may include computer usable program code stored on a computer-readable storage medium at a server data processing system, the computer usable program code being downloaded over a network to the remote data processing system for use on the computer-readable storage medium with the remote system.

[0055] Embodiments of the present invention or elements thereof may be implemented in the form of an apparatus including a memory and at least one processor, coupled to the memory, configured to perform the exemplary method steps.

[0056] Furthermore, embodiments of the present invention may utilize software executed on a computer or workstation. Referring to FIG. 8 , such embodiments may utilize, for example, a processor 802, memory 804, and an input / output interface formed, for example, by a display 806 and a keyboard 808. As used herein, the term “processor” is intended to include any processing device, such as one that includes a CPU (Central Processing Unit) or other form of processing circuitry or a combination thereof. Furthermore, the term “processor” may refer to multiple individual processors. The term “memory” is intended to include memory associated with a processor or CPU, such as, for example, RAM (Random Access Memory), ROM (Read-Only Memory), fixed storage (e.g., a hard disk), removable storage (e.g., a diskette), flash memory, and the like. Furthermore, as used herein, the phrase “input / output interface” is intended to include, for example, mechanisms for inputting data into the processing device (e.g., a mouse) and mechanisms for providing results related to the processing device (e.g., a printer). The processor 802, memory 804, and input / output interfaces such as a display 806 and a keyboard 808 may be interconnected, for example, via a bus 810, as part of a data processing unit 812. Suitable interconnections, for example, via the bus 810, may also be provided to a network interface 814, such as a network card, which may be provided to interface with a computer network, and a media interface 816, such as a diskette or CD-ROM drive, which may be provided to interface with media 818.

[0057] Thus, computer software containing instructions or code for carrying out the methodologies of the present invention as described herein may be stored in an associated memory device (e.g., ROM, fixed or removable memory) and loaded in part or in whole (e.g., into RAM) and executed by a CPU when ready for use. Such software may include, but is not limited to, firmware, resident software, microcode, etc.

[0058] A data processing system suitable for storing and / or executing program code will include at least one processor 802 coupled directly or indirectly to memory elements 804 via a system bus 810. The memory elements may include local memory utilized during the actual implementation of the program code, bulk storage, and cache memory that provides temporary storage of at least some of the program code to reduce the number of times the code must be retrieved from bulk storage during implementation.

[0059] Input / output or I / O devices (including but not limited to keyboard 808, display 806, pointing device, etc.) can be coupled to the system directly (e.g., via bus 810) or through intervening I / O controllers (omitted for clarity).

[0060] Network adapters, such as network interface 814, may also be coupled to the data processing system to enable it to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modems, and Ethernet cards are just a few of the currently available types of network adapters.

[0061] As used herein, including the claims, a "server" includes a physical data processing system (e.g., system 812 as shown in FIG. 8) that executes a server program. It will be understood that such a physical server may or may not include a display and keyboard.

[0062] The present invention may be a system, method, or computer program product, or combination thereof, integrated at any possible level of technical detail. The computer program product may include a computer-readable storage medium having stored thereon computer-readable program instructions for causing a processor to carry out aspects of the present invention.

[0063] A computer-readable storage medium may be a tangible device capable of retaining and storing instructions for use by an instruction execution device. The computer-readable storage medium may be, by way of example, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or a suitable combination thereof. More specific examples of computer-readable storage media include portable computer diskettes, hard disks, RAM, ROM, EPROM (or flash memory), SRAM, CD-ROMs, DVDs, memory sticks, floppy disks, mechanically encoded devices having instructions recorded on punch cards or ridge-in-groove structures, or the like, and suitable combinations thereof. Computer-readable storage devices, as used herein, should not be construed as ephemeral signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted over wires.

[0064] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computer / processing device. Alternatively, they can be downloaded to an external computer or external storage device via a network (e.g., the Internet, a LAN, a WAN, or a wireless network, or a combination thereof). The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface within each computer / processing device receives the computer-readable program instructions from the network and transfers the computer-readable program instructions to a computer-readable storage medium in the respective computer / processing device for storage.

[0065] The computer-readable program instructions for carrying out the operations of the present invention can be either assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for integrated circuits, or source or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk and C++, and procedural programming languages ​​such as the "C" programming language and similar programming languages. The computer-readable program instructions can execute entirely on the user's computer as a stand-alone software package, partially on the user's computer, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a LAN or WAN, or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry, including, for example, programmable logic circuits, field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), can execute computer-readable program instructions by utilizing state information of the computer-readable program instructions to customize the electronic circuitry for carrying out aspects of the present invention.

[0066] Embodiments of the present invention are described herein with reference to flowchart and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. Each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer-readable program instructions.

[0067] The computer-readable program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus to produce a machine, whereby the instructions, executed by the processor of such computer or other programmable data processing apparatus, create means for performing the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. The computer-readable program instructions may also be stored on a computer-readable storage medium that can instruct a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner. The computer-readable storage medium having the instructions stored thereon thereby constitutes an article of manufacture including instructions for performing aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0068] Computer-readable program instructions may also be loaded into a computer, other programmable device, or other device and a series of operational steps executed on the computer, other programmable device, or other device to create a computer-implemented process, whereby the instructions executing on the computer, other programmable device, or other device perform the functions / operations identified in one or more blocks in the flowcharts and / or block diagrams.

[0069] The flowcharts and block diagrams in the figures of this disclosure illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of instructions, including one or more executable instructions for performing specific logical functions. In some implementations, the functions shown in the blocks may be executed in a different order than shown in the figures. For example, two blocks shown in succession may actually be executed concurrently or nearly concurrently, or may even be executed in reverse order, depending on the functionality involved. Note that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs specific functions or operations or executes a combination of dedicated hardware and computer instructions.

[0070] It should be noted that any of the methods described herein may include the additional step of providing a system including separate software modules embodied on a computer-readable storage medium. The modules may include, for example, any or all of the components detailed herein. The method steps may then be performed using the separate software modules and / or sub-modules of such a system executed on the hardware processor 802. Furthermore, a computer program product may include a computer-readable storage medium having code adapted to perform at least one method step described herein, including providing a system with separate software modules.

[0071] In any event, it should be understood that the components illustrated herein may be implemented in various forms of hardware, software, or combinations thereof, such as, for example, application specific integrated circuits (ASICS), functional circuits, a suitably programmed digital computer with associated memory, etc. Given the teachings of the present invention provided herein, those of ordinary skill in the relevant art will be able to contemplate other implementations of the components of the present invention.

[0072] Additionally, although this disclosure includes detailed descriptions related to cloud computing, it should be understood that implementation of the teachings described herein is not limited to a cloud computing environment. Rather, embodiments of the present invention may be practiced in conjunction with any other type of computing environment now known or later developed.

[0073] Cloud computing is a service delivery model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal management effort or interaction with the service provider. This cloud model may include at least five characteristics, at least three service models, and at least four implementation models.

[0074] The characteristics are as follows:

[0075] On-Demand Self-Service: Cloud consumers can unilaterally provision computing capacity, such as server time or network storage, automatically as needed, without the need for human interaction with the service provider.

[0076] Broad network access: Computing power is available over the network and can be accessed through standard mechanisms, facilitating use by heterogeneous thin or thick client platforms (e.g., cell phones, laptops, PDAs).

[0077] Resource Pooling: Computing resources from a provider are pooled and offered to multiple consumers using a multi-tenant model. Various physical and virtual resources are dynamically allocated and reallocated based on demand. Consumers generally have no control or knowledge of the exact location of the resources they are provided with, resulting in a sense of location independence. However, consumers may be able to determine location at a higher level of abstraction (e.g., country, state, data center).

[0078] Rapid Elasticity: Computing capacity can be provisioned quickly and elastically, sometimes automatically, to instantly scale out and quickly release to instantly scale in. To the consumer, the computing power available for provisioning often appears unlimited, and can be purchased at any time and in any quantity.

[0079] Metered Services: Cloud systems leverage measurement capabilities at a level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, active user accounts) to automatically control and optimize resource usage. Resource usage can be monitored, controlled, and reported to provide transparency to both providers and consumers of utilized services.

[0080] The service model is as follows:

[0081] Software as a Service (SaaS): The functionality offered to the consumer is the availability of a provider's applications running on a cloud infrastructure that can be accessed from a variety of client devices through a thin client interface such as a web browser (e.g., webmail). The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, storage, or even individual application functionality, except for limited user-specific application configuration settings.

[0082] Platform as a Service (PaaS): The capability offered to consumers is to deploy applications they create or acquire using programming languages ​​and tools supported by the provider onto a cloud infrastructure. The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, or storage, but does have control over the deployed applications and, in some cases, the configuration of their hosting environment.

[0083] Infrastructure as a Service (IaaS): The functionality offered to consumers is the provisioning of processors, storage, networking, and other basic computing resources on which they can deploy and run any software, including operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure, but has control over the operating system, storage, and deployed applications, and in some cases partial control over some network components (e.g., host firewalls).

[0084] The deployment model is as follows:

[0085] Private Cloud: This cloud infrastructure is dedicated to a specific organization and can be managed by that organization or a third party, and can exist on-premise or off-premise.

[0086] Community Cloud: This cloud infrastructure is shared by multiple organizations to support a specific community with common concerns (e.g., mission, security requirements, policies, and compliance). This cloud infrastructure can be managed by those organizations or a third party and can exist on-premises or off-premises.

[0087] Public cloud: This cloud infrastructure is available to the general public or large industry organizations and is owned by an organization that sells cloud services.

[0088] Hybrid cloud: This cloud infrastructure combines two or more cloud models (private, community, or public), each of which retains its inherent nuances but is bound by standards or specific technologies that enable data and application portability (e.g., cloud bursting for load balancing between clouds).

[0089] A cloud computing environment is a service-oriented environment that emphasizes statelessness, low coupling, modularity, and semantic interoperability. At the core of cloud computing is an infrastructure that includes a network of interconnected nodes.

[0090] FIG. 9 illustrates an exemplary cloud computing environment 50. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 10, with which local computing devices used by cloud consumers (e.g., PDAs or cell phones 54A, desktop computers 54B, laptop computers 54C, or automobile computer systems 54N, or combinations thereof) can communicate. The nodes 10 can communicate with each other. The nodes 10 can be physically or virtually grouped (not shown) in one or more networks, such as the private, community, public, or hybrid clouds described above, or combinations thereof. This enables the cloud computing environment 50 to provide infrastructure, platform, or software as a service, or combinations thereof, for which cloud consumers are not required to maintain resources on their local computing devices. It should be understood that the types of computing devices 54A-N illustrated in FIG. 9 are merely exemplary, and that the computing nodes 10 and the cloud computing environment 50 can communicate with any type of electronic device via any type of network or network-addressable connection (e.g., using a web browser), or both.

[0091] A set of functional abstraction layers provided by the cloud computing environment 50 (FIG. 9) is now shown in FIG. 10. It should be understood in advance that the components, layers, and functions shown in FIG. 10 are merely exemplary, and embodiments of the present invention are not limited thereto. As shown, the following layers and corresponding functions are provided:

[0092] Hardware and software layer 60 includes hardware and software components. Examples of hardware components include mainframe 61, reduced instruction set computer (RISC) architecture-based server 62, server 63, blade server 64, storage device 65, and network and network components 66. In some embodiments, software components include network application server software 67 and database software 68.

[0093] The virtualization layer 70 provides an abstraction layer from which, for example, the following virtual entities may be provided: virtual servers 71, virtual storage 72, virtual networks including virtual private networks 73, virtual applications and operating systems 74, and virtual clients 75. By way of example, the management layer 80 may provide the following functions: Resource provisioning 81 enables dynamic procurement of computing and other resources utilized to perform tasks within the cloud computing environment. Metering and pricing 82 enables cost tracking as resources are utilized within the cloud computing environment and billing or invoicing for the consumption of these resources.

[0094] As an example, these resources may include application software licenses. Security allows for the identification and verification of cloud consumers and tasks, as well as protection for data and other resources. A user portal 83 provides consumers and system administrators with access to the cloud computing environment. Service level management 84 allows for the allocation and management of cloud computing resources so that requested service levels are met. Service level agreement (SLA) planning and fulfillment 85 allows for the advance arrangement and procurement of cloud computing resources expected to be needed in the future according to SLAs.

[0095] The workload layer 90 provides examples of functionality available to a cloud computing environment. Examples of workloads and functionality that can be provided from this layer include mapping and navigation 91, software development and lifecycle management 92, virtual classroom instruction delivery 93, data analytics processing 94, transaction processing 95, and refactoring applications 96, in accordance with one or more embodiments of the present invention.

[0096] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. As used herein, the terms "comprises" and / or "comprising" specify the presence of stated features, steps, operations, elements, or components, or combinations thereof, but do not exclude the presence or addition of other features, steps, operations, elements, components, or groups or combinations thereof.

[0097] At least one embodiment of the present invention may provide beneficial effects including, for example, one or more of application modernization using constraint-based refactoring and generating recommendations for modifying one or more portions of a monolith application to transform the application into a microservices architecture.

[0098] The description of various embodiments of the present invention has been presented for purposes of illustration and is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used herein have been selected to best explain the principles of the embodiments, practical applications or technical improvements over commercially available technology, or to enable those skilled in the art to understand the embodiments disclosed herein.

Claims

1. performing an analysis of the source code of the monolith application to identify one or more structural features and one or more operational features; generating a graph structure representing the monolith application based at least in part on the identified one or more structural features and the identified one or more operational features, the graph structure comprising a plurality of nodes, each node corresponding to one of a plurality of software modules of the monolith application, and a plurality of edges between the plurality of nodes, each edge representing a relationship between the corresponding nodes; automatically identifying one or more constraints associated with the plurality of nodes in the graph structure based at least in part on the analysis of the source code; training the graph convolutional neural network at least in part by updating a set of trainable parameters of the graph convolutional neural network over one or more iterations by jointly reducing a plurality of loss values, at least one of the plurality of loss values ​​being associated with the identified one or more constraints; clustering the plurality of nodes into one or more clusters using the graph convolutional neural network; outputting to a user one or more candidate microservices for refactoring the monolith application, each of the one or more candidate microservices corresponding to a respective one of the one or more clusters; A computer-implemented method performed by at least one computing device.

2. The computer-implemented method of claim 1 , wherein the one or more structural features include one or more inter-class dependencies associated with the plurality of software modules.

3. The one or more operational characteristics include: a call graph of the monolith application; and cross-class usage information relating to the plurality of software modules; The computer-implemented method of claim 1 , comprising at least one of:

4. The analysis Identifying one or more entry points of the monolith application; and extracting the call graph based on the identified set of entry points.

5. The one or more constraints are: a constraint on the number of clusters resulting from said clustering; one or more cluster inclusion constraints, each of which requires that at least two of the plurality of software modules be included in the same of the one or more clusters; one or more cluster exclusion constraints, each of the cluster exclusion constraints requiring that at least two of the plurality of software modules be included in different ones of the one or more clusters; a constraint requiring a core set of software modules of the monolith application to be included in the one or more clusters; The computer-implemented method of claim 1 , comprising at least one of:

6. 2. The computer-implemented method of claim 1, comprising determining that one or more of the plurality of nodes in the graph structure are outliers based on at least one of the identified one or more structural features and the identified one or more behavioral features, wherein the graph convolutional neural network considers the one or more determined outlier nodes in the clustering.

7. generating recommendations for modifying at least a portion of the one or more determined outlier nodes to refactor the monolith application; and outputting the recommendation to a user.

8. 10. The computer-implemented method of claim 1, further comprising obtaining at least one additional constraint from the user, the at least one additional constraint being specific to at least one of one or more software frameworks and one or more computer programming languages.

9. The computer-implemented method of claim 1 , wherein the analysis comprises a static source code analysis.

10. The computer-implemented method of claim 1 , wherein the software is provided as a service in a cloud environment.

11. 1. A computer program comprising program instructions executable by a computing device, the program instructions causing the computing device to: performing an analysis of the source code of the monolith application to identify one or more structural features and one or more operational features; generating a graph structure representing the monolith application based at least in part on the identified one or more structural features and the identified one or more operational features, the graph structure comprising a plurality of nodes, each node corresponding to one of a plurality of software modules of the monolith application, and a plurality of edges between the plurality of nodes, each edge representing a relationship between the corresponding nodes; automatically identifying one or more constraints associated with the plurality of nodes in the graph structure based at least in part on the analysis of the source code; training the graph convolutional neural network at least in part by updating a set of trainable parameters of the graph convolutional neural network over one or more iterations by jointly reducing a plurality of loss values, at least one of the plurality of loss values ​​being associated with the identified one or more constraints; clustering the plurality of nodes into one or more clusters using the graph convolutional neural network; and outputting to a user one or more candidate microservices for refactoring the monolith application, each of the one or more candidate microservices corresponding to a respective one of the one or more clusters.

12. The computer program product of claim 11 , wherein the one or more structural features include one or more inter-class dependencies associated with the plurality of software modules.

13. The one or more operational characteristics include: a call graph of the monolith application; and cross-class usage information relating to the plurality of software modules; 12. The computer program of claim 11, comprising at least one of:

14. The analysis Identifying one or more entry points of the monolith application; and extracting the call graph based on the identified set of entry points.

15. The one or more constraints are: a constraint on the number of clusters resulting from said clustering; one or more cluster inclusion constraints, each of which requires that at least two of the plurality of software modules be included in the same of the one or more clusters; one or more cluster exclusion constraints, each of the cluster exclusion constraints requiring that at least two of the plurality of software modules be included in different ones of the one or more clusters; a constraint requiring a core set of software modules of the monolith application to be included in the one or more clusters; 12. The computer program of claim 11, comprising at least one of:

16. The program instructions executable by a computing device may cause the computing device to:

12. The computer program product of claim 11, further comprising: determining that one or more of the plurality of nodes in the graph structure are outliers based on at least one of the identified one or more structural features and the identified one or more behavioral features, wherein the graph convolutional neural network considers the one or more determined outlier nodes in the clustering.

17. The program instructions executable by a computing device may cause the computing device to: generating recommendations for modifying at least a portion of the one or more determined outlier nodes to refactor the monolith application; and outputting the recommendation to a user.

18. The program instructions executable by a computing device may cause the computing device to:

12. The computer program product of claim 11, further comprising: obtaining at least one additional constraint from the user, the at least one additional constraint being specific to at least one of one or more software frameworks and one or more computer programming languages.

19. The computer program product of claim 11 , wherein the analysis comprises a static source code analysis.

20. a memory configured to store program instructions; a processor operatively coupled to the memory, the processor executing the program instructions; performing an analysis of the source code of the monolith application to identify one or more structural features and one or more operational features; generating a graph structure representing the monolith application based at least in part on the identified one or more structural features and the identified one or more operational features, the graph structure comprising a plurality of nodes, each node corresponding to one of a plurality of software modules of the monolith application, and a plurality of edges between the plurality of nodes, each edge representing a relationship between the corresponding nodes; automatically identifying one or more constraints associated with the plurality of nodes in the graph structure based at least in part on the analysis of the source code; training the graph convolutional neural network at least in part by updating a set of trainable parameters of the graph convolutional neural network over one or more iterations by jointly reducing a plurality of loss values, at least one of the plurality of loss values ​​being associated with the identified one or more constraints; clustering the plurality of nodes into one or more clusters using the graph convolutional neural network; and outputting to a user one or more candidate microservices for refactoring the monolith application, each of the one or more candidate microservices corresponding to a respective one of the one or more clusters.

Citation Information

Patent Citations

  • Method, program, and device for generating class structure

    JP2009251769A

  • Data clustering method, information processor, and data clustering program

    JP2016224915A

  • Generating api callgraph from static disassembly

    JP2017504910A

  • Cluster evaluation device, cluster number calculation device, cluster device, cluster evaluation method, and program

    JP2018010438A

  • Function estimation method, function estimation device, and function estimation program

    JP2021089722A