Micro service splitting device and method
The microservice splitting device improves maintainability by generating and selecting optimal plans to address system complexity, facilitating flexible responses to changes in microservice architectures.
Patent Information
- Application Number
- JP2021187802
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2041-11-18
AI Technical Summary
Existing microservice splitting methods fail to address the complexity of aging systems, leading to poor maintainability and hinder quick, flexible responses to changes, even when migrating to a microservice architecture.
A microservice splitting device that generates multiple plans, identifies violations, applies correction methods, and selects the most effective plan to improve maintainability by minimizing configurations that hinder maintainability.
Enhances maintainability in microservice architectures by addressing system complexity, enabling quicker and more flexible responses to changes.
Smart Images

Figure 0007710966000001 
Figure 0007710966000002 
Figure 0007710966000003
Abstract
Description
Technical Field
[0001] The present invention generally relates to microservice splitting, which is to split programs and data in the architecture of the current system into a plurality of microservices.
Background Art
[0002] In order to enhance competitiveness in the market, it is required to have an IT (Information Technology) system that can respond quickly and flexibly to changes in customers and society.
[0003] However, many companies have aging technologies due to repeated modifications and possess large-scale and complex current systems (typically monolithic systems). The scale and complexity of the current system (current IT system) make it difficult to respond flexibly to changes in customers and society.
[0004] As a method to eliminate the scale and complexity of the current system and enable quick and flexible response to changes, the migration of the current system to a microservice architecture has attracted attention. In the migration to a microservice architecture, microservice splitting is required to split programs and data in the architecture of the current system into a plurality of microservices.
[0005] Patent Document 1 discloses a microservice splitting device capable of reducing the operation cost of a system.
Prior Art Documents
Patent Documents
[0006]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0007] In microservice splitting, generally, the basic policy is to split the existing system into microservices based on business functions such as transfers and balance inquiries. On the other hand, simply splitting the existing system, which has become bloated and complex due to years of modifications, based on business functions does not eliminate the complexity of the existing system, making it difficult to improve maintainability (for example, it may prevent quick and flexible responses to changes).
[0008] Patent Document 1 does not disclose or suggest any technology for reducing the complexity that may exist in the existing system. Therefore, even if the existing system is split into multiple microservices by the microservice splitting device disclosed in Patent Document 1, maintainability is not necessarily improved. This problem may similarly exist even if the architecture of the existing system is a microservice architecture.
Means for Solving the Problem
[0009] For each microservice splitting plan for the architecture of the existing system, if there is one or more violations in the microservice architecture according to the microservice splitting plan, one or more microservice splitting plans are generated, in which one or more correction methods applicable to each of the one or more violations are applied to each of the one or more violations. The microservice splitting device selects the microservice splitting plan that is most expected to improve maintainability among the generated microservice splitting plans, and performs an output based on the selected microservice splitting plan. The violation is a configuration that corresponds to a configuration defined as a configuration that hinders the improvement of maintainability.
Effects of the Invention
[0010] According to the present invention, it is possible to perform microservice splitting for migrating to a microservice architecture with improved maintainability compared to the existing system.
Brief Description of the Drawings
[0011]
Figure 1
Figure 2
Figure 3
Figure 4A
Figure 4B
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Figure 26
Figure 27
Figure 28
Figure 29
Figure 30
Figure 31
Figure 32
Figure 33
Mode for Carrying Out the Invention
[0012] In the following description, the "interface device" may be one or more interface devices. The one or more interface devices may be at least one of the following. · One or more I / O (Input / Output) interface devices. The I / O (Input / Output) interface device is an interface device for at least one of an I / O device and a remote display computer. The I / O interface device for the display computer may be a communication interface device. At least one I / O device may be either an input device such as a user interface device, for example, a keyboard and a pointing device, or an output device such as a display device. · One or more communication interface devices. The one or more communication interface devices may be one or more homogeneous communication interface devices (for example, one or more Network Interface Cards (NICs)) or two or more heterogeneous communication interface devices (for example, a NIC and a Host Bus Adapter (HBA)).
[0013] Also, in the following description, "memory" is one or more memory devices, and may typically be a main memory device. At least one memory device in the memory may be a volatile memory device or a non-volatile memory device.
[0014] Also, in the following description, "memory" is one or more memory devices which are an example of one or more storage devices, and may typically be a main memory device. At least one memory device in the memory may be a volatile memory device or a non-volatile memory device.
[0015] Also, in the following description, the "persistent storage device" may be one or more persistent storage devices, which are examples of one or more storage devices. The persistent storage device may typically be a non-volatile storage device (e.g., an auxiliary storage device), specifically, for example, an HDD (Hard Disk Drive), an SSD (Solid State Drive), an NVME (Non-Volatile Memory Express) drive, or an SCM (Storage Class Memory).
[0016] Also, in the following description, the "storage device" may be at least the memory among the memory and the persistent storage device.
[0017] Also, in the following description, the "processor" may be one or more processor devices. At least one processor device may typically be a microprocessor device such as a CPU (Central Processing Unit), but may also be other types of processor devices such as a GPU (Graphics Processing Unit). At least one processor device may be single-core or multi-core. At least one processor device may be a processor core. At least one processor device may also be a circuit that is an aggregate of gate arrays (e.g., an FPGA (Field-Programmable Gate Array), a CPLD (Complex Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit)) represented by a hardware description language that performs part or all of the processing, which is a processor device in a broad sense.
[0018] Also, in the following description, the data is represented in tabular form, but the data may be information of any structure (e.g., structured data or unstructured data), or may be a learning model such as a neural network that generates an output for an input. The data may be managed separately or integratedly.
[0019] In the following description, the function may be described in terms of a "yyy section", but the function may be realized by one or more computer programs being executed by a processor, or by one or more hardware circuits (e.g., FPGA or ASIC), or by a combination thereof. When the function is realized by a program being executed by a processor, since the defined processing is performed while appropriately using a storage device and / or an interface device, etc., the function may be part of at least the processor. The processing described with the function as the subject may be the processing performed by the processor or a device having the processor. The program may be installed from a program source. The program source may be, for example, a program distribution computer or a computer-readable recording medium (e.g., a non-transitory recording medium). The description of each function is an example, and a plurality of functions may be combined into one function, or one function may be divided into a plurality of functions.
[0020] In the following description, as information for identifying an element, any information (e.g., at least one of "ID", "name", and "number") may be adopted.
[0021] Hereinafter, an embodiment of the present invention will be described.
[0022] In the present embodiment, the current system as a monolithic system has the following elements as illustrated in FIG. 31. · There is an API gateway. The API gateway is composed of one or more APIs (Application Programming Interfaces). The API calls a method. · There is a program. The program includes one or more classes. The class includes one or more methods. The method may perform access to a column (e.g., CRUD (Create, Read, Update, or Delete)) or call another method. · There is data. The data is, for example, data as a database and includes one or more tables. A table includes one or more columns. There may be a dependency between columns.
[0023] In this embodiment, the system of the microservice architecture has the following elements as illustrated in FIG. 32. · There is an API gateway. The API gateway is composed of one or more APIs. An API calls a method. · There are a plurality of microservices. A microservice includes one or more classes and one or more tables. A class includes one or more methods. A table includes one or more columns.
[0024] FIG. 1 is a diagram showing an example of the configuration of the microservice division system 10 of this embodiment. The arrows in the figure indicate the flow of data between components.
[0025] The microservice division system 10 includes a microservice division device 100, an input device 101 and an output device 102 connected to the microservice division device 100. In this embodiment, the microservice division device 100 is a physical computer system (a system composed of one or more physical computers), but may also be a logical computer system (for example, cloud computing service) based on a physical computer system (for example, cloud infrastructure). The input device 101 and the output device 102 may be input / output consoles of the microservice division device 100. The input / output console may be, for example, a client of the microservice division device 100.
[0026] The microservice splitting device 100 creates a microservice design document 3000 (see FIG. 30), which is data representing the design document of each of a plurality of microservices that constitute a microservice architecture in which factors that impede improvement of maintainability are removed as much as possible. Instead of the microservice design document 3000 for each microservice, data representing a microservice architecture design document including the design documents of a plurality of microservices may be created.
[0027] The input device 101 inputs the following data (1) to (10) to the microservice splitting device 100. The data (1) to (10) may be data input by a user operating the input device 101, or may be data read from a data source such as a portable storage medium or a remote storage system. (1) Business requirements 200 (see FIG. 2), which are data representing the business requirements of the current system. (2) Splitting constraints 300 (see FIG. 3), which are data representing the splitting constraints of the current system. (3) Program structure definition 400a (see FIG. 4A), which is data representing the program structure of the current system. (4) API gateway structure definition 400b (see FIG. 4B), which is data representing the API gateway structure of the current system. (5) Data structure definition 500 (see FIG. 5), which is data representing the data structure of the current system. (6) API - method definition 600 (see FIG. 6), which is data representing the API - methods of the current system. "API - method" is the dependency between an API and a method. (7) Method - method definition 700 (see FIG. 7), which is data representing the method - methods of the current system. "Method - method" is the dependency between a method and a method. (8) Method - column definition 800 (see FIG. 8), which is data representing the method - columns of the current system. "Method - column" is the dependency between a method and a column. (9) The column-column definition 900 (see FIG. 9), which is data representing the column-column of the current system. "Column-column" is the dependency between columns.
[0028] The output device 102 is typically a display device and outputs (typically displays) the microservice design document 3000 from the microservice division device 100.
[0029] The microservice division device 100 includes an interface device 51, a storage device 52, and a processor 53 connected thereto.
[0030] The input device 101 and the output device 102 are connected to the interface device 51.
[0031] The storage device 52 stores data and programs. The storage device 52 has, for example, the following storage areas (1) to (5). (1) The element definition storage area 108 that stores data as microservice element definitions. The data as microservice element definitions includes the division API-method definition 1500 (see FIG. 15), the division method-method definition 1600 (see FIG. 16), the division method-column definition 1700 (see FIG. 17), and the division column-column definition 1800 (see FIG. 18). (2) The violation rule storage area 109 that stores the violation rule list 2000 (see FIG. 20), which is data representing a list of violation location detection rules. The "violation location detection rule" is a rule for detecting violation locations. The "violation location" is a configuration (typically an element or a dependency) that hinders the improvement of maintainability. (3) The correction method storage area 110 that stores the correction method list 2300 (see FIG. 23), which is data representing a list of correction methods for violation locations. (4) The evaluation method storage area 111 that stores the evaluation point calculation method 2800 (see FIG. 28), which is data representing the calculation method of evaluation points. A division plan storage area 112 that stores a division plan 2700 (see FIG. 27), which is data representing a division plan for microservices. In this embodiment, the division plan 2700 exists for each microservice division plan, but may represent a plurality of microservice division plans.
[0032] When the processor 53 executes the program, an initial division execution unit 103, a non-target registration unit 104, a violation detection unit 105, a division trial unit 106, and a result output unit 107 are realized.
[0033] The initial division execution unit 103 divides the program structure described in the program structure definition 400a of the current system and the data structure described in the data structure definition 500 into units of business functions described in the business requirements 200. The initial division execution unit 103 represents the data representing the microservices resulting from the division as a division program structure definition 1200 and a division data structure definition 1300. The initial division execution unit 103 registers a division plan 2700, which is data including the division program structure definition 1200 and the division data structure definition 1300, in the division plan storage area 112.
[0034] The non-target registration unit 104 identifies dependencies or elements that do not need to be detected as violations based on the division constraints 300 (see FIG. 3) for the API - method definition 600, method - method definition 700, method - column definition 800, and column - column definition 900 of the current system. In this embodiment, such dependencies or elements are referred to as "outside the detection target". The non-target registration unit 104 registers a division API - method definition 1500, a division method - method definition 1600, a division method - column definition 1700, and a division column - column definition 1800 in the element definition storage area 108. It is noted in these definitions 1500, 1600, 1700, and 1800 that the said dependencies or elements are outside the detection target.
[0035] For the split plan 2700, the violation location detection unit 105 detects violation locations based on the list of violation rules 2000 recorded in the violation rule storage area 109 (and the information registered in the element definition storage area 108), and registers the information representing the detected violation locations in the list of violation locations 2100 (see Fig. 21). The list of violation locations 2100 is data representing a list of violation locations.
[0036] The split trial unit 106 retrieves all the split plans 2700 recorded in the split plan storage area 112. For each split plan 2700, the split trial unit 106 performs the following. Taking one split plan 2700 as an example, the split trial unit 106 inputs the split plan 2700 to the violation location detection unit 105 to obtain the list of violation locations 2100 from the violation location detection unit 105. For each violation location in the list of violation locations 2100, the split trial unit 106 retrieves all applicable correction methods from the list of correction methods 2300 stored in the correction method storage area 110. For each correction method, the split trial unit 106 applies the correction method to the violation location and calculates an evaluation score using the evaluation score calculation method 2800 registered in the evaluation method storage area 111. The data representing the application of the correction method corresponds to a new split plan 2700. That is, for each violation location, a new split plan 2700 is created for each correction method specified for the violation location. The split trial unit 106 registers the new split plan 2700 in the split plan storage area 112. If the number of split plans 2700 recorded in the split plan storage area 112 exceeds the threshold number determined in advance by the user of the microservice splitting device 100, the split trial unit 106 preferentially retains the split plans 2700 with high evaluation scores by the threshold amount, and removes the other split plans 2700 from the split plan storage area 112. Also, among the removed split plans 2700, the split trial unit 106 regenerates the split plans 2700 by the probability determined in advance by the user, and records the regenerated split plans 2700 again in the split plan storage area 112.
[0037] The result output unit 107 selects the partitioning plan 2700 with the highest evaluation score from the partitioning plan storage area 112, and creates a microservice design document 3000 based on the selected partitioning plan 2700. The result output unit 107 outputs the created microservice design document 3000 to the output device 102.
[0038] Hereinafter, this embodiment will be described in detail.
[0039] FIG. 2 is a diagram showing an example of the business requirement 200.
[0040] The business requirement 200 has records for each business function. Each record has information such as ID 201 (information representing the ID of the business function), business function name 202 (information representing the name of the business function), class naming rule 203 (information representing the naming rule of the class), and table naming rule 204 (information representing the naming rule of the table). The record 205 indicates that the class name of the class belonging to the business function "balance introduction" starts with "C", and the table name of the table belonging to the business function "balance introduction" starts with "BALN".
[0041] FIG. 3 is a diagram showing an example of the partitioning constraint 300 which is data describing the dependency relationships to be excluded from detection targets.
[0042] The partitioning constraint 300 has records for each dependency relationship to be excluded from the detection target of the violation location. Each record has ID 301 (information representing the ID to be excluded from the detection target) and information representing the name of the element belonging to the dependency relationship to be excluded from the detection target (specifically, information such as calling source API 302, calling source method name 303, class name 304 of the class to which the calling source method belongs, calling destination method name 305, class name 306 of the class to which the calling destination method belongs, related source column name 307, table name 308 of the table to which the related source column belongs, related destination column name 309, and table name 310 of the table to which the related destination column belongs).
[0043] Record 311 is a record that states that dependencies such as the call relationship between the "operate" method of the "C1" class and the "get" class of the "B1" class are excluded from the detection target. Record 312 is a record that states that the access of the "get" method of the "C1" class to the "NAME" column of the "BALN1" table is excluded from the detection target. Record 313 is a record that states that the dependency between the "ID" column of the "BALN1" table and the "UID" column of the "BALN2" table is excluded from the detection target. Record 314 is a record that states that the call relationship between API "A" and the "get" method of the "D1" class is excluded from the detection target.
[0044] Figure 4A is a diagram showing an example of a program structure definition 400a representing the program structure of the current system. Figure 4B is a diagram showing an example of an API gateway structure definition 400b representing the API gateway structure of the current system.
[0045] The program structure definition 400a has records for each pair of class and method. Each record has information such as ID401 (information representing the ID of the pair), method name 402 (information representing the name of the method in the pair), and class name 403 (information representing the name of the class in the pair). Record 404 indicates that there is a "B1" class in the current system and the "get" method belongs to the "B1" class.
[0046] The API gateway structure definition 400b has records for each API in the API gateway. Each record has information such as ID411 (information representing the ID of the API) and API name 412 (information representing the name of the API). Record 413 indicates that there is an API "A" as an API of the API gateway in the current system.
[0047] Figure 5 is a diagram showing an example of a data structure definition 500 representing the data structure of the current system.
[0048] The data structure definition 500 has records for each column. Each record has information such as ID501 (information representing the ID of the column), column name 502 (information representing the name of the column), table name 503 (the name of the table to which the column belongs), and primary key 504 (information indicating whether the column is a primary key). Record 505 indicates that the "ID" column belongs to the "BALN1" table in the current system and that the "ID" column is the primary key.
[0049] Figure 6 is a diagram showing an example of the API - method definition 600 that describes the API - method (call relationship between the API and the method) of the current system.
[0050] The API - method definition 600 has records for each API - method. The record has information such as ID601 (information representing the ID of the API - method), calling - source API name 602 (information representing the name of the API in the API - method), called - destination method name 603 (information representing the name of the method in the API - method), and class name 604 (information representing the name of the class to which the method in the API - method belongs). Record 605 indicates that API "A" calls the "get" method belonging to class "B1".
[0051] Figure 7 is a diagram showing an example of the method - method definition 700 that describes the method - method (call relationship between a method and another method) of the current system.
[0052] The method - method definition 700 has records for each method - method. The records have information such as ID 701 (information representing the ID of the method - method), calling - source method name 702 (information representing the name of the calling - source method in the method - method), class name 703 (information representing the name of the class to which the calling - source method in the method - method belongs), called - destination method name 704 (information representing the name of the called - destination method in the method - method), and class name 705 (information representing the name of the class to which the called - destination method in the method - method belongs). Record 706 indicates that the "operate" method of the "C1" class calls the "get" method of the "B1" class.
[0053] Figure 8 is a diagram showing an example of a method - column definition 800 that describes the method - column (access relationship between a method and a column in a certain database) of the current system.
[0054] The method - column definition 800 has records for each method - column. The records have information such as ID 801 (information representing the ID of the method - column), calling - source method name 802 (information representing the name of the calling - source method in the method - column), class name 803 (information representing the name of the class to which the calling - source method in the method - column belongs), related - destination column name 804 (information representing the name of the column in the method - column), table name 805 (information representing the name of the table to which the column in the method - column belongs), and operation 806 (information representing the corresponding operation among CRUD on the column in the method - column). Record 807 indicates that the "get" method of the "C1" class performs a reference (Read) process on the "NAME" column of the "BALN1" table.
[0055] Figure 9 is a diagram showing an example of a column - column definition 900 that describes the column - column (dependency relationships such as foreign - key constraints between columns) of the current system.
[0056] The column-column definition 900 has records for each column-column. The record has information such as ID 901 (information representing the ID of the column-column), related source column name 902 (information representing the name of the source column among the column-columns), table name 903 (information representing the name of the table to which the source column among the column-columns belongs), related target column name 904 (information representing the name of the target column among the column-columns), and table name 905 (information representing the name of the table to which the target column among the column-columns belongs). Record 906 indicates that there is a dependency between the "ID" column of the "BALN1" table and the "UID" column of the "BALN2" table.
[0057] Next, an example of the process performed by the microservice splitting device 100 will be described.
[0058] FIG. 10 is a diagram showing an example of the processing flow of the microservice splitting process performed by the microservice splitting device 100.
[0059] First, the initial splitting execution unit 103 acquires, from the input device 101, the business requirements 200, the program structure definition 400a, the API gateway structure definition 400b, and the data structure definition 500 for the current system. The initial splitting execution unit 103 records the API gateway structure definition 400b in the element definition storage area 108. The initial splitting execution unit 103 splits the program structure definition 400a and the data structure definition 500 in units of the business functions described in the business requirements 200, and represents the resulting microservices in the form of a split program structure definition 1200 and a split data structure definition 1300. The initial splitting execution unit 103 creates a splitting plan 2700 based on the split program structure definition 1200 and the split data structure definition 1300, and records the splitting plan 2700 in the splitting plan storage area 112 (s1001).
[0060] Next, the non-target registration unit 104 acquires, from the input device 101, the API - method definition 600, the method - method definition 700, the method - column definition 800, and the column - column definition 900 for the current system. For each of the acquired definitions 600, 700, 800, and 900, the non - target registration unit 104 determines whether the dependency represented by the definition is excluded from the detection targets in the partitioning constraint 200. Based on the result of the determination and the acquired definitions 600, 700, 800, and 900, the non - target registration unit 104 creates a partitioning API - method definition 1500, a partitioning method - method definition 1600, a partitioning method - column definition 1700, and a partitioning column - column definition 1800, and records these definitions 1500, 1600, 1700, and 1800 in the element definition storage area 108 (s1002).
[0061] For the partitioning plan 2700 recorded in the partitioning plan storage area 112, the violation location detection unit 105 detects, from the definitions 600, 700, 800, and 900 registered in the element definition storage area 108, the violation locations corresponding to the violation states described in the violation rule list 2000 recorded in the violation rule storage area 109, and registers the information representing the detected violation locations in the violation location list 2100 (s1004).
[0062] The division trial unit 106 retrieves all the division plans 2700 recorded in the division plan storage area 112, and for each division plan 2700, it performs the following operations. The division trial unit 106 inputs the division plan 2700 to the violation location detection unit 105 to obtain the list of violation locations 2100 from the violation location detection unit 105. For each violation status in the obtained list of violation locations 2100, the division trial unit 106 retrieves all applicable correction methods from the correction method list 2300. For each correction method, the division trial unit 106 applies the correction method to create a new division plan 2700, and calculates the evaluation score of the new division plan 2700 using the evaluation score calculation method 2800 registered in the evaluation method storage area 111. The division trial unit 106 registers the new division plan 2700 in the division plan storage area 112. Then, when the number of division plans 2700 recorded in the division plan storage area 112 exceeds the threshold number determined in advance by the user, the division trial unit 106 sequentially retains only the threshold number of division plans 2700 starting from the division plan 2700 with the highest evaluation score, and removes the other division plans 2700. However, among the removed division plans 2700, the division trial unit 106 reproduces the division plans 2700 corresponding to the probability determined in advance by the user, and records the reproduced division plans 2700 again in the division plan storage area 112. The division trial unit 106 repeatedly performs the above processing a number of times determined in advance by the user (s1003).
[0063] Finally, the result output unit 107 selects the division plan 2700 with the highest evaluation score from the division plan storage area 112, processes it into the form of the microservice design document 3000 based on the division plan 2700 and the microservice element definition, and outputs the microservice design document 3000 (s1005). Thus, the microservice division process ends.
[0064] The following specifically describes the processing of s1001 to s1005.
[0065] FIG. 11 is a diagram showing an example of the processing flow of the initial division implementation (s1001).
[0066] First, the initial splitting execution unit 103 acquires the program structure definition 400a from the input device 101 and processes the program structure definition 400a into the form of the splitting program structure definition 1200 shown in FIG. 12 (s1101). The program structure definition 400a and the splitting program structure definition 1200 have corresponding ID401 and ID1201, method name 402 and method name 1202, and class name 403 and class name 1203.
[0067] Next, the initial splitting execution unit 103 performs s1103 to s1105 for each record of the splitting program structure definition 1200 (s1102). Take one record as an example (the target record in the description of s1103 to s1105).
[0068] Specifically, first, the initial splitting execution unit 103 acquires the class name 1203 of the target record (s1103).
[0069] Next, the initial splitting execution unit 103 collates the acquired class name 1203 with the class naming rule 203 of the business requirement 200 and acquires the business function name 202 of the matching class naming rule (s1104).
[0070] Next, the initial splitting execution unit 103 sets the acquired business function name 202 to the business function name 1204 and the microservice name 1205 (s1105).
[0071] After the process of s1102 is completed, the initial splitting execution unit 103 processes the data structure definition 500 into the form of the splitting data structure definition 1300 shown in FIG. 13 (s1106). The data structure definition 500 and the splitting data structure definition 1300 have corresponding ID501 and ID1301, column name 502 and column name 1302, table name 503 and table name 1303, and primary key 504 and primary key 1304.
[0072] Next, the initial splitting execution unit 103 performs s1108 to s1110 for each record of the splitting data structure definition (s1107). Take one record as an example (the target record in the description of s1108 to s1110).
[0073] Specifically, first, the initial segmentation execution unit 103 acquires the table name 1303 of the target record (s1108).
[0074] Next, the initial segmentation execution unit 103 collates the acquired table name 1303 with the table naming rule 204 of the business requirement 200, and acquires the business function name 202 of the matching class naming rule (s1109).
[0075] Next, the initial segmentation execution unit 103 sets the acquired business function name 202 to the business function name 1305 and the microservice name 1306 (s1110).
[0076] After the processing of s1107 is completed, the initial segmentation execution unit 103 sets the program structure definition 1200 for segmentation and the data structure definition 1300 for segmentation to the segmentation plan 2700. The initial segmentation execution unit 103 sets the segmentation plan ID 2701 of the segmentation plan 2700 to an arbitrary value, and the evaluation point 2702 is left blank (s1111).
[0077] Next, the initial segmentation execution unit 103 records the created segmentation plan 2700 in the segmentation plan storage area 112 (s1112).
[0078] Finally, the initial segmentation execution unit 103 acquires the API gateway structure definition 400b from the input device 101 and records the API gateway structure definition 400b in the element definition storage area 108 (s1113).
[0079] FIG. 12 is a diagram showing an example of the program structure definition 1200 for segmentation created in the initial segmentation execution (s1001).
[0080] The split program structure definition 1200 is composed of one or more records each having information such as ID 1201, method name 1202, class name 1203, business function name 1204, and microservice name 1205. According to record 1206, the "get" method of the "B1 class" conforms to the class naming rule of the "balance inquiry" business function in business requirement 200, so the business function name 1204 is "balance inquiry" and the microservice name 1205 is "balance inquiry".
[0081] Figure 13 is a diagram showing an example of the split data structure definition 1300 created in the initial split execution (s1001).
[0082] The split data structure definition 1300 is composed of one or more records each having information such as ID 1301, column name 1302, table name 1303, primary key 1304, business function name 1305, and microservice name 1306. According to record 1307, the "ID" column of the "BALN" table conforms to the table naming rule of the "balance inquiry" business function in business requirement 200, so the business function name 1305 is "balance inquiry" and the microservice name 1306 is "balance inquiry".
[0083] Figure 14 is a diagram showing an example of the processing flow of non - violation target registration (s1002).
[0084] First, the non - target registration unit 104 acquires the API - method definition 600 from the input device 101 and processes the API - method definition 600 into the form of the split API - method definition 1500 shown in Figure 15 (s1401). The API - method definition 600 and the split API - method definition 1500 have corresponding ID 601 and ID 1501, calling source API name 602 and calling source API name 1502, called destination method name 603 and called destination method name 1503, class name 604 and class name 1504.
[0085] Next, the non-target registration unit 104 performs s1403 to s1404 for each record of the split API - method definition 1500 in the list of violation locations 2100 (s1402). Take one record as an example (the target record in the explanation of s1403 to s1404).
[0086] Specifically, first, the non-target registration unit 104 checks whether the split constraint 300 contains the same dependency as the target record (s1403).
[0087] If there is a record in the split constraint 300 where the calling source API name 302 matches the calling source API name 1502 of the target record, the called method name 305 matches the called method name 1503 of the target record, and the class name 306 matches the class name 1504 of the target record, then the non-target registration unit 104 records "〇" (a value indicating an external detection obstacle) as the non-detection target 1505 of the target record to make it a non-detection target of the violation location (s1404).
[0088] After the processing of s1402 is completed, the non-target registration unit 104 records the split API - method definition 1500 in the element definition storage area 108 (s1405).
[0089] Next, the non-target registration unit 104 acquires the method - method definition 700 from the input device 101 and processes the method - method definition 700 into the form of the split method - method definition 1600 shown in FIG. 16 (s1406). The method - method definition 700 and the split method - method definition 1600 correspond in terms of ID701 and ID1601, calling source method name 702 and calling source method name 1602, class name 703 and class name 1603, called method name 704 and called method name 1604, and class name 705 and class name 1605.
[0090] Next, the non-target registration unit 104 performs s1408 to s1409 for each record of the split method - method definition 1600 (s1407). Take one record as an example (the target record in the explanation of s1408 to s1409).
[0091] Specifically, first, the non-target registration unit 104 checks whether the split constraint 300 includes the same dependency as the target record (s1408).
[0092] If there is a record in the split constraint 300 where the calling source method name 303 matches the calling source method name 1602 of the target record, the class name 304 matches the class name 1603 of the target record, the called method name 305 matches the called method name 1604 of the target record, and the class name 306 matches the class name 1605 of the target record, the non-target registration unit 104 records "〇" as the non-detection target 1606 of the target record to make it a non-detection target for the violation location (s1409).
[0093] After the process of s1407 is completed, the non-target registration unit 104 records the split method - method definition 1600 in the element definition storage area 108 (s1410).
[0094] Next, the non-target registration unit 104 acquires the method - column definition 800 from the input device 101 and processes the method - column definition 800 into the form of the split method - column definition 1700 shown in FIG. 17 (s1411). The method - column definition 800 and the split method - column definition 1700 correspond in terms of ID801 and ID1701, calling source method name 802 and calling source method name 1702, class name 803 and class name 1703, related destination column name 804 and related destination column name 1604, table name 805 and table name 1605, and operation 806 and operation 1706.
[0095] Next, the non-target registration unit 104 performs s1413 to s1414 for each record of the split method - column definition 1700 (s1412). Take one record as an example (the target record in the description of s1413 to s1414).
[0096] Specifically, first, the non-target registration unit 104 checks whether the split constraint 300 includes the same dependency as the target record (s1413).
[0097] If a record in the split constraint 300 has the same calling source method name 303 as the calling source method name 1702 of the target record, the same class name 304 as the class name 1703 of the target record, the same related destination column name 309 as the related destination column name 1704 of the target record, and the same table name 310 as the table name 1705 of the target record, the non-target registration unit 104 shall record "〇" as the non-detection target 1707 of the target record so as to be excluded from the detection of violation points (s1414).
[0098] After the process of s1412 is completed, the non-target registration unit 104 records the split method-column definition 1700 in the element definition storage area 108 (s1415).
[0099] Next, the non-target registration unit 104 acquires the column-column definition 900 from the input device 101 and processes the column-column definition 900 into the form of the split column-column definition 1800 shown in FIG. 18 (s1416). The column-column definition 900 and the split column-column definition 1800 correspond in terms of ID901 and ID1801, related source column name 902 and related source column name 1802, table name 903 and table name 1803, related destination column name 904 and related destination column name 1804, and table name 905 and table name 1805.
[0100] Next, the non-target registration unit 104 performs s1418 to s1419 for each record of the split column-column definition 1800 (s1417). Take one record as an example (the target record in the description of s1418 to s1419).
[0101] Specifically, first, the non-target registration unit 104 checks whether the split constraint 300 includes the same dependency relationship as the target record (s1418).
[0102] If a record that meets all of the following conditions exists in the split constraint 300: the source column name 307 matches the source column name 1802 of the target record, the table name 308 matches the table name 1803 of the target record, the destination column name 309 matches the destination column name 1804 of the target record, and the table name 310 matches the table name 1805 of the target record, the non-target registration unit 104 shall record "〇" as the non-detection target 1806 of the target record in order to exclude the target from the detection of violation points (s1419).
[0103] After the process of s1417 is completed, the non-target registration unit 104 records the split column-column definition 1800 in the element definition storage area 108 (s1420).
[0104] FIG. 15 is a diagram showing an example of the split API - method definition 1500 created by the process of s1002.
[0105] The split API - method definition 1500 is composed of one or more records each having an ID1501, a calling source API1502, a calling source method name 1503, a class name 1504, and a non-detection target 1505. According to the record 1506, since the dependency relationship indicated by the record 1506 corresponds to the record 314 of the split constraint 300, the non-detection target 1505 is "○".
[0106] FIG. 16 is a diagram showing an example of the split method - method definition 1600 created by the process of s1002.
[0107] The split method - method definition 1600 is composed of one or more records each having an ID1601, a calling source method name 1602, a class name 1603, a calling source method name 1604, a class name 1605, and a non-detection target 1606. According to the record 1607, since the dependency relationship indicated by the record 1607 corresponds to the record 311 of the split constraint 300, the non-detection target 1606 is "○".
[0108] FIG. 17 is a diagram showing an example of a split method-column definition 1700 created by the process of s1002.
[0109] The split method-column definition 1700 is composed of one or more records each having an ID 1701, a calling source method name 1702, a class name 1703, a related destination column name 1704, a table name 1705, an operation 1706, and an out-of-detection target 1707. According to record 1708, since the dependency shown by record 1708 corresponds to record 312 of the split constraint 300, the out-of-detection target 1707 is "◯".
[0110] FIG. 18 is a diagram showing an example of a split column-column definition 1800 created by the process of s1002.
[0111] The split column-column definition 1800 is composed of one or more records each having an ID 1801, a related source column name 1802, a table name 1803, a related destination column name 1804, a table name 1805, and an out-of-detection target 1806. According to record 1807, since the dependency shown by record 1807 corresponds to record 313 of the split constraint 300, the out-of-detection target 1806 is "◯".
[0112] FIG. 19 is a diagram showing an example of the processing flow of violation location detection (s1003).
[0113] First, the violation location detection unit 105 acquires the split plan 2700 from the split trial unit 106 and then initializes the records in the violation location list 2100 (s1901).
[0114] Next, for each API described in the API gateway structure definition 400b registered in the element definition storage area 108, the violation location detection unit 105 performs s1903 to s1904 (s1902). Take one API as an example (the target API in the description of s1903 to s1904).
[0115] Specifically, first, the violation location detection unit 105 checks whether the target API corresponds to the violation status in the violation rule list 2000 as shown in FIG. 20 (s1903). For example, the target API may correspond to violation status 5 (record 2015) in the violation rule list 2000. However, when checking whether it corresponds to the violation status, the check is performed after removing all API - method, method - method, and method - column that are not subject to detection.
[0116] If there is a violation status corresponding to the violation rule list 2000, the violation location detection unit 105 adds a record to the violation location list 2100 in which the violation status is entered in the violation status 2102 (see FIG. 21), the definition file 2103 is "API gateway structure definition", and the ID list 2104 includes the ID411 of the target API (s1904).
[0117] After the process of s1902 is completed, the violation location detection unit 105 performs s1906 - s1907 for each record of the split method - method definition 1600 registered in the element definition storage area 108 (s1905). Take one record as an example (the target record in the description of s1906 - s1907).
[0118] Specifically, first, the violation location detection unit 105 checks whether the target record has a dependency relationship that is not outside the detection target and corresponds to the violation rule list 2000 as shown in FIG. 20 (s1906). For example, for method - method, it may correspond to "violation status 2" (record 2012) in the violation rule list 2000.
[0119] If there is a violation status corresponding to the violation rule list 2000, the violation location detection unit 105 adds a record to the violation location list 2100 in which the violation status is entered in the violation status 2102, the definition file 2103 is "split method - method definition", and the ID list 2104 includes the ID1601 of the target record (s1907).
[0120] After the processing of s1905 is completed, the violation detection unit 105 performs s1909 to s1910 for each table name 1303 in the split data structure definition 1300 of the split plan 2700 (s1908). Take one table as an example (the target table in the description of s1909 to s1910).
[0121] Specifically, first, the violation detection unit 105 checks whether each method-column in the split method-column definition 1700 related to the target table corresponds to the violation rule list 2000 as shown in FIG. 20 (s1909). For example, regarding the dependency relationship related to the target table, it may correspond to the violation state 3 (record 2013) in the violation rule list 2000.
[0122] If there is a violation state corresponding to the violation rule list 2000, the violation detection unit 105 adds a record in which the violation state is entered in the violation state 2102, the definition file 2103 is "split method-column definition", and the ID list 2104 is a set of the IDs 1701 of the corresponding dependencies to the violation list 2100 (s1910). However, if the dependency relationship is outside the detection target, the ID of the dependency relationship is not added to the ID list 2104.
[0123] After the processing of s1908 is completed, the violation detection unit 105 performs s1912 to s1913 for each record in the split column-column definition 1800 registered in the element definition storage area 108 (s1911). Take one record as an example (the target record in the description of s1912 to s1913).
[0124] Specifically, first, the violation detection unit 105 checks whether there is a violation state that is not outside the detection target and corresponds to the violation rule list 2000 as shown in FIG. 20 for the target record (s1912). For example, for the column-column, it may correspond to the violation state 4 (record 2014) in the violation rule list 2000.
[0125] If there is a violation state corresponding to the violation rule list 2000, the violation location detection unit 105 adds a record to the violation location list 2100 where the violation state is entered in the violation state 2102, the definition file 2103 is "split method - column definition", and the ID list 2104 includes the ID 1801 of the target record (s1913).
[0126] After the process of s1911 is completed, the violation location detection unit 105 performs s1915 - s1916 for each microservice name 1205 in the split program structure definition 1200 of the split plan 2700 (s1914). Take one microservice as an example (the target microservice in the description of s1915 - s1916).
[0127] Specifically, first, the violation location detection unit 105 checks whether there is a target microservice corresponding to the violation rule list 2000 as shown in FIG. 20 for the target microservice (s1915). For example, for the target microservice, it may correspond to the violation state 1 (record 2011) in the violation rule list 2000.
[0128] If there is a violation state corresponding to the violation rule list 2000, the violation location detection unit 105 adds a record to the violation location list 2100 where the violation state is entered in the violation state 2102, the definition file 2103 is "split program structure definition", and the ID list 2104 is a set of the IDs 1201 of the methods belonging to the target microservice (s1916).
[0129] After the process of s1914 is completed, the violation location detection unit 105 returns the violation location list 2100 (s1917).
[0130] FIG. 20 is a diagram showing an example of the violation rule list 2000.
[0131] The violation rule list 2000 is composed of one or more records each having an ID 2001, a violation status 2002, and a content 2003 (information representing the content (dependency or element) as the violation location). Records 2011 to 2015 represent specific examples of the violation location detection rules. The user of the microservice splitting device 100 can freely determine in advance which violation location detection rule of the violation rule list 2000 to use or whether to add a new violation location detection rule.
[0132] Figure 21 is a diagram showing an example of the violation location list 2100.
[0133] The violation location list 2100 is composed of one or more records each having an ID 2101, a violation status 2102, a definition file name 2103, and an ID list 2104. According to record 2105, the record with the ID "2" of the splitting method - method definition 1600 is included in different microservices for the calling source method and the calling destination method in a certain splitting plan 2700, corresponding to the "violation status 2".
[0134] Figure 22 is a diagram showing an example of the processing flow of the microservice splitting trial (s1004).
[0135] First, the splitting trial unit 106 repeatedly executes the processing of s2202 to s2217 for the number of generations G (s2201). The number of generations G can be freely determined in advance by the user of the microservice splitting device.
[0136] The splitting trial unit 106 acquires all the splitting plans 2700 included in the splitting plan storage area 112 (s2202).
[0137] Next, the splitting trial unit 106 executes s2204 to s2213 for each splitting plan 2700 (s2203). Taking one record as an example (the target splitting plan 2700 in the description of s2204 to s2213).
[0138] The division trial unit 106 obtains a list of violation locations 2100 from the target division plan 2700 by inputting the target division plan 2700 to the violation location detection unit 105 (s2204).
[0139] Next, for each violation location in the obtained list of violation locations 2100, the division trial unit 106 performs s2206 to s2213 (s2205). Take one violation location as an example (the target violation location in the description of s2206 to s2213).
[0140] The division trial unit 106 checks the violation status 2102 for the target violation location, and obtains a correction method targeting the violation status 2102 from the list of correction methods 2300 recorded in the correction method storage area 110 (s2206). For example, when the violation status 2102 of the target violation location is "violation status 2", the division trial unit 106 obtains "correction 2_1" (record 2306), "correction 2_2" (record 2307), and "correction 2_3" (record 2308) from the list of correction methods 2300.
[0141] For each correction method obtained by the division trial unit 106 in s2206, the division trial unit 106 performs s2208 to s2213 (s2207). Take one violation location as an example (the target correction method in the description of s2208 to s2213).
[0142] The division trial unit 106 checks whether the target correction method is applicable to the target violation location (s2208). For example, according to "correction 3_2" (record 2310) in the list of correction methods 2300, when columns other than the primary key for writing for each microservice overlap, the table division as shown in FIG. 25 cannot be performed, so "correction 3_2" (record 2310) cannot be applied. If the correction method can be applied, the division trial unit 106 performs s2209 to 2213.
[0143] The division trial unit 106 sets a copy of the target division plan 2700 as a new division plan (new division plan) 2700. At this time, the division trial unit 106 sets the division plan ID 2701 of the new division plan 2700 so that it does not overlap with the division plan IDs 2701 of other division plans 2700 (s2209).
[0144] Next, the division trial unit 106 applies the target correction method to the target violation points of the new division plan 2700 (s2210).
[0145] Next, the division trial unit 106 calculates evaluation points for the new division plan 2700 based on the metrics represented by the metrics list 2600 shown in FIG. 26 (for example, data representing a list of metrics based on at least one of program structure, data structure, and dependency) and the evaluation point calculation method represented by the evaluation point calculation method 2800 shown in FIG. 28 (data representing the evaluation point calculation method) (s2211).
[0146] Next, the division trial unit 106 registers the calculated evaluation points in the evaluation points 2702 of the new division plan 2700 (s2212).
[0147] Then, the division trial unit 106 stores the new division plan 2700 in the division plan storage area 112 (s2213).
[0148] After the process of s2203 is completed, the division trial unit 106 checks whether the number of division plans 2700 stored in the division plan storage area 112 for that generation is greater than the threshold N (s2214). The threshold N can be freely determined by the user in advance. If the number of division plans is greater than the threshold N, the division trial unit 106 executes s2215 to s2217.
[0149] The division trial unit 106 arranges the division plans 2700 stored in the division plan storage area 112 in descending order of the evaluation points 2702. If there is a division plan 2700 with an empty evaluation point 2702, the division trial unit 106 calculates the evaluation points of that division plan 2700, registers the evaluation points in the evaluation points 2702, and then arranges the division plans 2700 in descending order of the evaluation points 2702.
[0150] Next, the division trial unit 106 leaves the Nth to the first division plans 2700 (that is, the top N division plans 2700) from the head of the division plan storage area 112, and removes the rest from the division plan storage area 112 (s2216).
[0151] Finally, the division trial unit 106 determines whether to re-store each of the division plans 2700 removed from the division plan storage area 112 in the division plan storage area 112 with a probability P (s2217). For example, when there are three division plans 2700 other than the top N division plans 2700 (the removed division 2700), each of the three division plans 2700 is reproduced with a probability P. Any of all three division plans 2700 being reproduced, some division plans 2700 being reproduced, and all division plans 2700 not being reproduced may occur. The probability P can be freely determined by the user in advance.
[0152] FIG. 23 is a diagram showing an example of a correction method list 2300 that describes a correction method for a violation location.
[0153] The correction method list 2300 has records for each correction method. Each record has information such as an ID 2301 (information representing the ID of the correction method), a correction method name 2302 (information representing the name of the correction method), a violation state 2303 (information representing the violation state targeted by the correction method), and a correction content 2304 (information representing the content (details) of the correction method). Examples of correction methods include, for example, a method of dividing a microservice corresponding to a violation state by business function (for example, record 2305), a method of combining all microservices corresponding to a violation location into one microservice (for example, records 2306, 2309, 2312, and 2313), a method of cutting out a program or data corresponding to a violation location to another microservice (for example, records 2307, 2308, and 2311), and a method of dividing data corresponding to a violation location (for example, record 2310). The user can freely determine in advance which correction method in the correction method list 2300 to use, or whether to add a new correction method to the correction method list 2300.
[0154] FIG. 24 is a diagram showing an application example of "Correction 2_2" (Record 2307).
[0155] According to "Correction 2_2", methods that are in a violation state, i.e., the calling source method and the called destination method of the method-method call, and methods that have a transitive dependency are split out into another microservice. When "Correction 2_2" is applied, in s2210, for the split program structure definition 1200 of the new split plan 2700, the microservice name 1205 of the record where the method names 1202 are "Method 1-1-1", "Method 1-2-1", "Method 2-1-1", and "Method 2-2-1" may be rewritten to "Microservice 3".
[0156] FIG. 25 is a diagram showing an application example of "Correction 3_2" (Record 2310).
[0157] According to "Revision 3_2", tables are divided for each microservice based on the set of method-columns corresponding to the violation points. When "Revision 3_2" is applied, in s2210, first, for the split data structure definition 1300 of the new split plan 2700, the table name 1303 of the record whose column name 1302 is "Column 1-1-1" may be rewritten to "Table 1-1(1)", the business function name 1305 to "Microservice 1", and the microservice name 1306 to "Microservice 1". Next, a record having an ID 1301 that does not overlap with other records, a column name 1302 of "Column 1-1-1", a table name 1303 of "Table 1-1(2)", a primary key 1304 of "○", a business function name 1305 of "Microservice 2", and a microservice name 1306 of "Microservice 2" may be added to the split data structure definition 1300 of the new split plan 2700. Next, in the split data structure definition 1300 of the new split plan 2700, the table name 1303 of the record whose column name 1302 is "Column 1-1-2" may be rewritten to "Table 1-1(1)", the business function name 1305 to "Microservice 1", and the microservice name 1306 to "Microservice 1". Then, in the split data structure definition 1300 of the new split plan 2700, the table name 1303 of the record whose column name 1302 is "Column 1-1-3" may be rewritten to "Table 1-1(2)", the business function name 1305 to "Microservice 2", and the microservice name 1306 to "Microservice 2".
[0158] FIG. 26 is a diagram showing an example of a metrics list 2600 used for evaluation point calculation in s2211.
[0159] The metrics list 2600 has records for each metric. Each record has information such as ID 2601 (information representing the ID of the metric), metric name 2602 (information representing the name of the metric), and metric calculation formula 2603 (information representing the calculation formula of the metric). According to records 2604 to 2608, for the program structure, data structure, and dependencies to be detected as violation locations, the ratio of the objects that do not correspond to the violation locations is quantified. Therefore, the metric value "0" means that all of the program structure, data structure, and dependencies correspond to the violation locations. The metric value "1" means that all of the program structure, data structure, and dependencies do not correspond to the violation locations. The user can freely determine in advance which metrics in the metrics list 2600 to use or whether to add new metrics to the metrics list 2600.
[0160] Figure 27 is a diagram showing an example of the division plan 2700.
[0161] The division plan 2700 is composed of a division plan ID 2701, an evaluation score 2702, a program structure definition 1200 for division, and a data structure definition 1300 for division.
[0162] Figure 28 is a diagram showing an example of the evaluation score calculation method 2800.
[0163] The evaluation score calculation method 2800 records one or more evaluation score calculation methods (for example, calculation formulas). For example, according to record 2801, the evaluation score is calculated by adding up the metrics. According to record 2802, each metric is regarded as the scalar quantity of a vector that is orthogonal to each other, and the norm when the vectors are added together is calculated. The evaluation score calculation method can be freely set by the user in advance. The evaluation score is a score based on the smallness of the ratio of the violation locations, that is, the smaller the ratio of the violation locations (for example, the number of violation locations or the weight as a violation location), the higher the score.
[0164] Figure 29 is a diagram showing an example of the processing flow of the microservice division result output s1005.
[0165] First, the result output unit 107 acquires the partitioning plan 2700 with the highest evaluation score from the partitioning plan storage area 112 (s2901).
[0166] Next, the result output unit 107 inputs the acquired partitioning plan 2700 to the violation location detection unit 105, and acquires a list of violation locations 2100 from the violation location detection unit 105 (s2902).
[0167] Next, the result output unit 107 executes s2904 to s2907 for each microservice described in the partitioning plan 2700 (s2903). Take one microservice as an example (the target microservice in the description of s2904 to s2907).
[0168] The result output unit 107 acquires the violation locations in the list of violation locations 2100 related to the target microservice, and enters them in the remarks 3005 of the microservice design document 3000 (s2904).
[0169] Next, the result output unit 107 acquires the program structure definition and data structure definition constituting the target microservice from the program structure definition 1200 for partitioning and the data structure definition 1300 for partitioning in the partitioning plan 2700, and enters the acquired program structure definition and data structure definition as the program structure 3001 and data structure 3002 of the microservice design document 3000 (s2905).
[0170] Next, the result output unit 107 acquires the other microservices, their classes, and their methods that have a dependency relationship with the target microservice from the list of violation locations 2100 and the partitioning plan 2700, and enters the acquired information in the microservices with dependency relationships 3003 of the microservice design document 3000 (s2906).
[0171] Finally, the result output unit 107 outputs the microservice design document 3000 to the output device 102 (s2907). As a result, the microservice design document 3000 is output from the output device 102.
[0172] Figure 30 is a diagram showing an example of the microservice design document 3000.
[0173] The microservice design document 3000 is composed of a microservice name 3004, a program structure 3001, a data structure 3002, a microservice 3003 that has a dependency relationship with the microservice represented by this microservice design document 3000, and a remarks section 3005.
[0174] Figures 31 and 32 are diagrams showing an example of the image of microservice splitting. Specifically, Figure 31 is a diagram showing an example of the current system as a monolithic system. Figure 32 is a diagram showing an example of the system of the microservice architecture when the current system is split into microservices.
[0175] Regarding the current system composed of an API gateway 3101, a program 3102, and data 3103, by splitting the program and data, it migrates to a microservice architecture. The API gateway 3101 corresponds to the API gateway structure definition 400b, the program 3102 corresponds to the program structure definition 400a, and the data 3103 corresponds to the data structure definition 500.
[0176] The above description can be summarized, for example, as follows. The following summary may include supplements to the above description and explanations of modified examples.
[0177] The microservice splitting device 100 includes a violation detection unit 105 that detects one or more violations if there are one or more violations in the microservice architecture according to the microservice splitting plan for the architecture of the current system, a splitting trial unit 106 that performs a microservice splitting trial, and a result output unit 107 that performs result output which is an output according to the result of the microservice splitting trial. The microservice splitting plan is a plan for microservice splitting by splitting the program 3102 and data 3103 in the architecture of the current system into a plurality of microservices. In the program 3102, the plurality of methods illustrated in FIG. 31 may be an example of a plurality of program modules constituting the program (there may be a dependency relationship between at least some of the program modules). Similarly, in the data 3103, the plurality of columns illustrated in FIG. 31 may be an example of a plurality of data sets constituting the data. A "data set" is a lump of one logical electronic data viewed from a program module, and may be any of, for example, records, columns, files, key-value pairs, and tuples. A violation is a configuration corresponding to a configuration defined as a configuration that hinders the improvement of maintainability. There may be a dependency relationship between a program module and a data set (for example, the data set is accessed from the program module), or there may be a dependency relationship between data sets (for example, when one data set is updated, the other data set is also updated).
[0178] The microservice splitting trial includes the following (A) and (B). (A) For each microservice splitting plan, if one or more violations are detected for the microservice plan, generate one or more microservice splitting plans in which one or more correction methods applicable to each of the one or more violations are applied to each of the one or more violations. (B) Select the microservice splitting plan expected to have the smallest ratio of violations among the microservice splitting plans generated in (A).
[0179] This enables the microservice splitting for migrating to a microservice architecture with improved maintainability compared to the current system.
[0180] In (A), the microservice splitting plan in "for each microservice splitting plan" may correspond to the microservice splitting plan generated in (A), but at least the initial microservice splitting plan may correspond. The "initial microservice splitting plan" is typically the microservice splitting plan generated by the initial splitting execution unit 103, but the initial microservice splitting plan may also be the microservice splitting plan input from the input device 101.
[0181] Also, the above result output is an output based on the selected microservice splitting plan. This result output may be the display to the user of the design document data representing the design documents of each microservice according to the microservice splitting plan. Thereby, the user can judge whether to adopt the design document to perform the microservice splitting of the current system architecture, etc. Note that the result output may be, instead of or in addition to the display to the user, the deployment of the design document data to a predetermined system (thereby, the microservice splitting may be performed for the current system architecture).
[0182] In the microservice splitting trial, (A) may be performed G or more times (G is a natural number) for the following (a1) to (a3). (a1) For each of one or more microservice splitting plans of the immediately previous time, perform the following (a11). (a11) If one or more violation points are detected for the microservice plan, for each of the one or more violation points, perform the following (a111) and (a112). (a111) Identify one or more correction methods applicable to the violation point. (a112) For each correction method specified in (a111), generate a microservice splitting plan in which the correction method is applied to the violation point of the microservice splitting plan. For each microservice partitioning plan generated by (a2)(a1), calculate an evaluation score, which is a score based on the proportion of violation points. When the number X of microservice partitioning plans generated by (a3)(a1) exceeds N, narrow down the microservice partitioning plans generated by (a1) to N microservice partitioning plans reproduced with probability P as the current microservice partitioning plan based on the evaluation scores of each of the microservice partitioning plans generated by (a1).
[0183] As a result, it is expected to generate an appropriate microservice partitioning plan from the perspective of improving maintainability while appropriately suppressing the computational complexity (consumption of computational resources) of microservice partitioning trials. Note that when the number X of microservice partitioning plans generated by (a1) exceeds N (X > N), (a3) may be the following (a31) and (a32). As a result, it is expected to generate a more appropriate microservice partitioning plan from the perspective of improving maintainability. (a31) Select the top N microservice partitioning plans with the highest evaluation scores from the X microservice partitioning plans. (a32) For each of the Y (Y = X - N) microservice partitioning plans, which are the microservice partitioning plans obtained by removing N microservice partitioning plans from the X microservice partitioning plans, select a microservice partitioning plan with probability P (P is a value greater than 0 and less than or equal to 1).
[0184] An example of the microservice division trial in which the above (a1) to (a3) are performed G times is schematically shown as in FIG. 33. That is, the g-th time (1 ≦ g ≦ G) can be called the g-th generation. The division trial unit 106 selects one violation point from the list 2100 of violation points of the division plan 2700 of the immediately previous generation (the division plan 2700 obtained by the initial division). The division trial unit 106 specifies one or more correction methods corresponding to the violation state of the violation point from the correction method list 2300, generates one or more new division plans 2700 in which the one or more correction methods are respectively applied to the division plan 2700 of the immediately previous generation, and calculates evaluation points for each of the one or more division plans 2700. Such processing is performed for each of the division plans 2700 of the immediately previous generation, and as a result, X division plans are obtained for the current generation. When X exceeds N, the division trial unit 106 narrows down to a maximum of N division plans, specifically, selects the top N division plans, and for each of the division plans not included in the top N, selects whether to reproduce it with probability P.
[0185] The microservice division trial is based on a genetic algorithm. Generally, in a genetic algorithm, new individuals are generated through crossover and mutation of individuals. In the microservice division trial, the division plan 2700 corresponds to an individual, but crossover and mutation of the division plan 2700 cannot be performed. Therefore, in the above-described embodiment, for each of the division plans 2700 other than the top N division plans 2700, it is reproduced with probability P. This reproduction corresponds to a pseudo mutation, and the probability P corresponds to the probability of mutation occurring. Thereby, the possibility that a new division plan 2700 is generated only from the division plans 2700 with higher evaluation points and thus falls into a local optimum solution is reduced, and thus, the generation of an optimal division plan 2700 is expected.
[0186] At least one of N, P, and G described above may be an arbitrarily set value by the user. Thereby, it can be expected to suppress the calculation amount of the microservice division trial to an arbitrarily set amount by the user.
[0187] The non-compliant part is a configuration that corresponds to a rule defined as a configuration that hinders the improvement of maintainability, and may be a configuration that does not correspond to a configuration defined as not being a detection target among a plurality of configurations in the architecture of the current system. The non-detection target may be a configuration excluded from configurations that can be detected as non-compliant parts based on the constraints of microservice division. Thereby, more appropriate detection of non-compliant parts can be expected.
[0188] As described above, several embodiments have been described, but these are examples for explaining the present invention, and are not intended to limit the scope of the present invention only to these embodiments.
Explanation of Reference Numerals
[0189] 100: Microservice Division Device
Claims
A violation detection unit that detects one or more violations if there are one or more violations in the microservice architecture according to the microservice splitting plan for the architecture of the current system, A splitting trial unit that conducts a microservice splitting trial, A result output unit that outputs a result which is an output according to the result of the microservice splitting trial comprising: The microservice splitting plan is a microservice splitting plan that splits programs and data in the architecture of the current system into a plurality of microservices, The violation is a configuration that corresponds to a configuration defined as a configuration that hinders the improvement of maintainability, The microservice splitting trial includes the following (A) and (B), (A) For each microservice splitting plan, if one or more violations are detected for the microservice splitting plan, for each of the one or more violations, one or more microservice splitting plans are generated in which one or more correction methods applicable to the violation are respectively applied, (B) Selecting a microservice splitting plan that is expected to have the smallest ratio of violations among the microservice splitting plans generated in (A), The result output is an output based on the selected microservice splitting plan, In the microservice splitting trial, (A) is to perform the following (a1) to (a3) G times (G is a natural number), (a1) For each of the one or more microservice splitting plans in the immediately previous round, perform the following (a11), (a11) If one or more violations are detected for the microservice splitting plan, for each of the one or more violations, perform the following (a111) and (a112), (a111) Specify one or more correction methods applicable to the violation, (a112) For each correction method specified in (a111), generate a microservice splitting plan in which the correction method is applied to the violation of the microservice splitting plan, (a2) For each microservice splitting plan generated in (a1), calculate an evaluation score which is a score based on the smallness of the ratio of violations, When the number X of microservice partitioning plans generated in (a3)(a1) exceeds N, the microservice partitioning plans generated in (a1) are narrowed down to N microservice partitioning plans reproduced with probability P as the current microservice partitioning plans based on the evaluation points of each of the microservice partitioning plans generated in (a1). Microservice partitioning device. **Claim 2** When the number X of microservice partitioning plans generated in (a1) exceeds N, (a3) is the following (a31) and (a32): (a31) Select N microservice partitioning plans with the highest evaluation points from the X microservice partitioning plans. (a32) For each of the Y (Y = X - N) microservice partitioning plans that are the microservice partitioning plans obtained by removing the N microservice partitioning plans from the X microservice partitioning plans, select a microservice partitioning plan with probability P (P is a value greater than 0 and less than or equal to 1). The microservice partitioning device according to claim 1. **Claim 3** At least one of N, P, and G is a value arbitrarily set by the user. The microservice partitioning device according to claim 2. **Claim 4** A violation detection unit that detects one or more violations if there are one or more violations in the microservice architecture according to the microservice partitioning plan for the architecture of the current system, A partitioning trial unit that performs a microservice partitioning trial, A result output unit that performs a result output that is an output according to the result of the microservice partitioning trial, comprising: The microservice partitioning plan is a microservice partitioning plan for partitioning the programs and data in the architecture of the current system into a plurality of microservices. The violation is a configuration corresponding to a configuration defined as a configuration that hinders the improvement of maintainability. The microservice partitioning trial includes the following (A) and (B): (A) For each microservice partitioning plan, if one or more violations are detected for the microservice partitioning plan, generate one or more microservice partitioning plans to which one or more correction methods applicable to each of the one or more violations are applied. (B) Select the microservice partitioning plan expected to have the smallest ratio of violations among the microservice partitioning plans generated in (A). The result output is an output based on the selected microservice partitioning plan, A violation part is a configuration that corresponds to a rule defined as a configuration that hinders improvement of maintainability, and does not correspond to a configuration defined as out of detection targets among a plurality of configurations in the architecture of the current system, The out-of-detection target is a configuration excluded from configurations that can be detected as violation parts based on the constraints of microservice partitioning, Microservice partitioning device.
5. The output based on the selected microservice partitioning plan is a display to the user of design document data that is data representing design documents of each microservice according to the microservice partitioning plan, The microservice partitioning device according to claim 1 or 4.
6. For each microservice partitioning plan for the architecture of the current system, which is data stored in a storage device of a computer, (X) a step of detecting, by the processor of the computer, one or more violation parts in the microservice architecture according to the microservice partitioning plan if there are one or more violation parts; (Y) a step of generating, by the processor, one or more microservice partitioning plans in which one or more correction methods applicable to each of the one or more detected violation parts are respectively applied for each of the one or more detected violation parts for the microservice partitioning plan; a step of selecting, by the processor, a microservice partitioning plan expected to have the smallest ratio of violation parts among the generated microservice partitioning plans; a step of outputting, by the processor, an output based on the selected microservice partitioning plan and having A violation part is a configuration that corresponds to a configuration defined as a configuration that hinders improvement of maintainability, (X) is to perform the following (x1) to (x3) G times (G is a natural number), (x1) For each of the one or more microservice partitioning plans in the immediately previous time, perform the following (x11), (x11) If one or more violation parts are detected for the microservice partitioning plan, perform the following (x111) and (x112) for each of the one or more detected violation parts, (x111) Specify one or more correction methods applicable to the violation part, For each correction method specified by (x112)(x111), generate a microservice partitioning plan in which the correction method is applied to the violation location of the microservice partitioning plan. For each microservice partitioning plan generated by (x2)(x1), calculate an evaluation score, which is a score based on the proportion of violation locations. If the number X of microservice partitioning plans generated by (x3)(x1) exceeds N, narrow down the microservice partitioning plan generated by (a1) to N microservice partitioning plans reproduced with probability P as the current microservice partitioning plan based on the evaluation scores of each of the microservice partitioning plans generated by (x1). Microservice partitioning method.
7. If the number X of microservice partitioning plans generated by (x1) exceeds N, (x3) is as follows (x31) and (x32). (x31) Select N microservice partitioning plans with the highest evaluation scores from the X microservice partitioning plans. For each of the Y (Y = X - N) microservice partitioning plans that are the microservice partitioning plans obtained by removing the N microservice partitioning plans from the X microservice partitioning plans, select a microservice partitioning plan with probability P (P is a value greater than 0 and less than or equal to 1). The microservice partitioning method according to claim 6.
8. At least one of N, P, and G is a value arbitrarily set by the user. The microservice partitioning method according to claim 7.
9. For each microservice partitioning plan of the data stored in the computer storage device and regarding the architecture of the current system, (X) A step of detecting one or more violation locations in the microservice architecture according to the microservice partitioning plan by the processor of the computer, if any; (Y) A step of generating one or more microservice partitioning plans in which one or more correction methods applicable to each of the one or more detected violation locations are respectively applied to each of the one or more detected violation locations for the microservice partitioning plan, if any; A step of selecting, by the processor, a microservice partitioning plan expected to have the smallest proportion of violation locations among the generated microservice partitioning plans. a step of outputting, by the processor, an output based on the selected microservice splitting plan having a violation part is a configuration corresponding to a rule defined as a configuration that hinders improvement of maintainability, and does not correspond to a configuration defined as a non-detection target among a plurality of configurations in the architecture of the current system a non-detection target is a configuration excluded from configurations that can be detected as violation parts based on the constraints of microservice splitting A microservice splitting method
10. The output based on the selected microservice splitting plan is a display to a user of design document data, which is data representing design documents of each microservice according to the microservice splitting plan The microservice splitting method according to claim 6 or 9
Citation Information
Patent Citations
Program correction device, program correction method and program
JP2020004003A
Microservice splitting device and microservice splitting program
JP2021009589A