Application management method and related system

By performing unitary modeling and code generation of business objects, the problem of long waiting time caused by cross-data center calls in distributed architecture is solved, and the unitary application and development efficiency are improved.

WO2025077171A1PCT designated stage expired Publication Date: 2025-04-17HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/091824
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-13
Filing Date
2024-05-09
Publication Date
2025-04-17

AI Technical Summary

Technical Problem

In a distributed architecture, business request calls across data centers cause users to wait for a long time, affecting user experience, and it is difficult for the prior art to effectively avoid cross-data center calls.

Method used

By unit-based modeling of business objects, codes for unit-based root services and unit-based partition services are generated, the unitization of applications is realized, and cross-center calls of business requests are reduced.

Benefits of technology

It realizes the unitization of applications, lowers the development threshold, improves development efficiency, reduces cross-data center calls, and improves user experience and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024091824_17042025_PF_FP_ABST
    Figure CN2024091824_17042025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application is an application management method, which is executed by an application management system. The system is used for generating a code of an application that supports unitized deployment. The method comprises: receiving a unitized model created by a user for an application, wherein the unitized model comprises a model of a unitized root object and a model of a unitized partition object in a unitized root service, and a model of a unitized partition object in a unitized partition service, the unitized root service and the unitized partition service are services in the application that are deployed at the same data center, and a primary key of the unitized root object is added to the unitized partition object to serve as an associated foreign key, such that data is split by means of the same splitting dimension, the splitting dimension being determined on the basis of the primary key of the unitized root object; and then calling an end-to-end code generation model on the basis of the unitized model, generating a code of the unitized root service and a code of the unitized partition service, and outputting the codes of the services. Therefore, the unitization of an application can be realized, thereby reducing cross-center calling of a service request.
Need to check novelty before this filing date? Find Prior Art

Description

Application management method and related system

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on October 9, 2023, with application number 202311306392.X, and with the invention name “A method for application management and related equipment”, as well as priority to the Chinese patent application filed with the State Intellectual Property Office on December 13, 2023, with application number 202311713736.9, and with the invention name “A method for application management and related systems”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to an application management method, system, computing device cluster, computer-readable storage medium, and computer program product. Background Art

[0003] With the continuous development of the internet, business usage (also known as business volume) in various business systems has grown rapidly. When business scale reaches a certain volume, to improve the stability and high availability of business systems, it is often necessary to establish disaster recovery architectures such as multi-site active-active or two-site three-center. Because remote data centers are located far apart, communication times are long. In a distributed architecture, a single business request often involves multiple microservice calls. If calls occur across data centers, users often have to wait for a long time (e.g., up to several minutes) to receive request results, which significantly affects the user experience.

[0004] How to limit business request calls to one data center and avoid cross-data center calls as much as possible has gradually become a core issue in distributed architecture.

[0005] Summary of the Invention

[0006] The present application provides an application management method, which obtains a unitized model by modeling business objects according to unitized root objects and unitized partition objects. Based on the unitized model, an end-to-end code generation model (such as a development framework) is called to generate the code for the corresponding unitized root service and the code for the unitized partition service. In this way, the unitization of applications can be achieved and cross-center calls of business requests can be reduced. Developers are unaware of the details of the unitization implementation, which greatly reduces the threshold for unitized application development and improves development efficiency. The present application also provides an application management system, a computing device cluster, a computer-readable storage medium, and a computer program product corresponding to the above-mentioned application management method.

[0007] In the first aspect, the present application provides an application management method. The method can be executed by an application management system. The application management system is used to generate code for applications that support unitized deployment. Among them, the application management system can be a software system, and the software system can be deployed in a computing device cluster, and the computing device cluster executes the program code of the software system, thereby executing the application management method of the present application. It should be noted that the application management system can be provided to users in the form of cloud services. For example, the application management system can be deployed in a cloud computing cluster on a cloud platform and provided to users by providing interface calls. The application management system can also be provided to users in the form of an independent software package, which can be deployed by the user himself. In some examples, the application management system can also be a hardware system, such as a computing device cluster with application management (such as unitized development and deployment) functions. When the computing device cluster is running, it executes the application management method of the present application.

[0008] Specifically, the application management system can receive a unitized model created by a user for an application. The unitized model includes a model of a unitized root object in a unitized root service, a model of a unitized partition object, and a model of a unitized partition object in a unitized partition service. The unitized root service and the unitized partition service are services deployed in the same data center in the application. The unitized partition object is added with the primary key of the unitized root object as an associated foreign key. The unitized root service and the unitized partition service split data through the same splitting dimension, where the splitting dimension is determined according to the primary key of the unitized root object. Then, the application management system can call the end-to-end code generation model according to the unitized model, generate the code for the unitized root service and the code for the unitized partition service in the application, and output the code for the unitized root service and the code for the unitized partition service.

[0009] This method obtains a unitized model by modeling business objects according to unitized root objects and unitized partition objects. Based on the unitized model, an end-to-end code generation model (such as a development framework) is called to generate the code for the corresponding unitized root service and the unitized partition service. This can achieve the unitization of applications and reduce cross-center calls for business requests. Developers are unaware of the details of the unitization implementation, which greatly reduces the threshold for unitized application development and improves development efficiency. Moreover, in applications developed by this method, the business logic can be decoupled from the forwarding logic, with clear boundaries and improved overall robustness.

[0010] In some possible implementations, the unitized root service and the unitized partition service split data using the primary key of the unitized root object. The unitized partition object adds the primary key of the unitized root object as a foreign key. Therefore, the unitized partition service's data table includes the primary key of the unitized root object, such as the user ID. This simplifies the process of determining the routing path when subsequently routing service requests, improving routing efficiency and, consequently, service response efficiency.

[0011] In some possible implementations, the unitized model also includes a unitized partition key, which is an attribute field in the unitized root object other than the primary key. For example, the unitized partition key can be city, age (age range), or occupation. Accordingly, the unitized root service and the unitized partition service split data based on the unitized partition key.

[0012] This allows for flexible definition of data splitting dimensions, without being limited to data splitting by user ID (unitized sharding), and provides higher availability.

[0013] In some possible implementations, the application management system can also receive service-level agreements (SLAs) between multiple services in a user-configured application and then recommend regions for deploying the application based on these SLAs. This provides a reference for users deploying modular applications and helps them meet the SLA requirements of different services within the modular application.

[0014] In some possible implementations, a service level agreement (SLA) is a formal commitment defined between a service provider and a service consumer. The service indicators specifically committed to between a service provider and a service consumer (service user) may include, but are not limited to, quality, availability, or responsibility. When a service indicator is higher than a set value, indicating that the SLA requirement is high, the application management system may recommend an area based on a proximity deployment strategy, such as recommending an area with a short distance (e.g., the shortest distance or a distance less than a set distance) for deploying applications to achieve proximity access. When a service indicator is lower than a set value, indicating that the SLA requirement is low, the application management system may recommend an area based on a cost priority strategy, such as recommending a low-cost area (e.g., a remote region) for deploying applications to reduce deployment costs.

[0015] In some possible implementations, the application management system can deploy the unitized root services and unitized partition services associated with the unitized model to the target region. This allows multiple services associated with the unitized model to be deployed to the corresponding region, reducing cross-center calls and improving service response efficiency.

[0016] In some possible implementations, the application management system supports multiple configuration methods for deployment. In one implementation, the application management system may receive a user-configured target zone, which may include one or more zones. In another implementation, the application management system may receive service information for a service hosted by at least one zone configured by the user. This service information may be, for example, a service identifier, where the at least one zone includes the target zone.

[0017] In this way, deployment and configuration can be achieved in different ways to meet the needs of different businesses and have high availability.

[0018] In some possible implementations, the application management system is further used to deploy a routing module in each area of ​​the target area. Accordingly, the application management system can receive business requests through the routing module, and then obtain the value of the splitting dimension based on the business request. The value of the splitting dimension includes the value of the primary key of the unitized root object, or the value of the unitized partition key obtained based on the value of the primary key of the unitized root object. Then, the application management system can route the business request to the service of the corresponding area based on the value of the splitting dimension.

[0019] This method introduces a routing module in each area to route business requests, minimize cross-data center calls, and achieve a closed-loop traffic flow within the unit.

[0020] In some possible implementations, the request header or path parameter of the service request includes the value of the primary key of the unitized root object. Accordingly, the application management system can extract the value of the primary key of the unitized root object from the request header or path parameter of the service request, and the value of the split dimension is the value of the primary key of the unitized root object.

[0021] In this way, the value of the split dimension can be obtained from the request header or path parameter, thereby realizing fast path query, improving the routing efficiency of business requests, and thus improving service response efficiency.

[0022] In some possible implementations, the application management system can obtain the value of the primary key of the unitized root object based on the business request, and then obtain the value of the unitized partition key based on the value of the primary key of the unitized root object and the unitized partition key defined by the unitized model, wherein the value of the splitting dimension is the value of the unitized partition key.

[0023] When other attribute fields are used as splitting dimensions, by first extracting the primary key value and then obtaining the unitized partition key value, the routing path can be accurately determined and business requests can be precisely dispatched to the services in the corresponding area.

[0024] In some possible implementations, the interface code of the unitized partition object in the code of the unitized root service or the code of the unitized partition service includes a path parameter, and the path parameter includes the primary key of the unitized root object.

[0025] By introducing the primary key of the unitized root object into the path parameter, this method can quickly locate the primary key, and then perform routing query in combination with the primary key, thereby improving routing efficiency.

[0026] In a second aspect, the present application provides an application management system. The application management system is used to generate code for applications that support unitized deployment, and the application management system includes:

[0027] a modeling module, configured to receive a unitized model created by a user for an application, the unitized model including a model of a unitized root object in a unitized root service, a model of a unitized partition object, and a model of a unitized partition object in a unitized partition service, the unitized root service and the unitized partition service being services deployed in the same data center in the application, the unitized partition object having a primary key of the unitized root object added as an associated foreign key, the unitized root service and the unitized partition service splitting data using the same splitting dimension, the splitting dimension being determined based on the primary key of the unitized root object;

[0028] A code generation module, configured to call an end-to-end code generation model according to the unitized model to generate code for the unitized root service and the unitized partition service in the application;

[0029] The code generation module is further configured to output the code of the unitized root service and the code of the unitized partition service.

[0030] In some possible implementations, the unitized root service and the unitized partition service split data according to the primary key of the unitized root object.

[0031] In some possible implementations, the unitized model further includes a unitized partition key, where the unitized partition key is an attribute field other than a primary key in an attribute field of the unitized root object;

[0032] Accordingly, the unitized root service and the unitized partition service split data by the unitized partition key.

[0033] In some possible implementations, the modeling module is further configured to:

[0034] Receive a service level agreement (SLA) configured by the user for calling multiple services in the application;

[0035] The system further comprises:

[0036] The recommendation module is used to recommend a region for deploying the application based on the SLAs of calls between the multiple services.

[0037] In some possible implementations, the system further includes:

[0038] A deployment module is used to uniformly deploy the unitized root service and the unitized partition service associated with the unitized model to a target area.

[0039] In some possible implementations, the deployment module is further configured to:

[0040] receiving the target area configured by the user, where the target area includes one or more areas; or

[0041] Service information of a service carried by at least one area configured by the user is received, where the at least one area includes the target area.

[0042] In some possible implementations, the application management system is further configured to deploy a routing module in each of the target areas, and the system further includes:

[0043] An interaction module, configured to receive a service request through the routing module;

[0044] The routing module is used to obtain the value of the splitting dimension according to the business request, where the value of the splitting dimension includes the value of the primary key of the unitized root object, or the value of the unitized partition key obtained according to the value of the primary key of the unitized root object, and route the business request to the service of the corresponding area according to the value of the splitting dimension.

[0045] In some possible implementations, the request header or path parameter of the service request includes the value of the primary key of the unitized root object;

[0046] The routing module is specifically used for:

[0047] The value of the primary key of the unitized root object is extracted from the request header or path parameter of the business request, and the value of the split dimension is the value of the primary key of the unitized root object.

[0048] In some possible implementations, the routing module is specifically configured to:

[0049] According to the business request, obtaining the value of the primary key of the unitized root object;

[0050] According to the value of the primary key of the unitized root object and the unitized partition key defined by the unitized model, the value of the unitized partition key is obtained, and the value of the split dimension is the value of the unitized partition key.

[0051] In some possible implementations, the code of the unitized root service or the interface code of the unitized partition object in the code of the unitized partition service includes a path parameter, and the path parameter includes the primary key of the unitized root object.

[0052] In a third aspect, the present application provides a computing device cluster. The computing device cluster includes at least one computing device, wherein the at least one computing device includes at least one processor and at least one memory. The at least one processor and the at least one memory communicate with each other. The at least one processor is configured to execute instructions stored in the at least one memory, so that the computing device or computing device cluster performs the application management method described in the first aspect or any implementation of the first aspect.

[0053] In a fourth aspect, the present application provides a computer-readable storage medium storing instructions, wherein the instructions instruct a computing device or a computing device cluster to execute the application management method described in the first aspect or any implementation of the first aspect.

[0054] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device or a computing device cluster, enables the computing device or computing device cluster to execute the application management method described in the first aspect or any one of the implementations of the first aspect.

[0055] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical methods of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments.

[0057] FIG1A is a schematic diagram of a unitized application development process provided by this application;

[0058] FIG1B is a schematic diagram of traffic forwarding of a unitized application provided by the present application;

[0059] FIG2 is a schematic diagram of the architecture of an application management system provided by this application;

[0060] FIG3 is a schematic diagram of the relationship between unit-related concepts provided by this application;

[0061] FIG4 is a flow chart of an application management method provided by the present application;

[0062] FIG5 is a schematic diagram of a process for creating a unitized model provided by the present application;

[0063] FIG6 is a schematic diagram of a transaction unit subdomain provided by the present application;

[0064] FIG7 is a schematic diagram of a sample database table of a microservice code provided in this application;

[0065] FIG8 is a schematic diagram of the interfaces of some business objects of a generated microservice provided by this application;

[0066] FIG9 is a schematic diagram of a multi-region deployment unitized application provided by the present application;

[0067] FIG10 is a schematic diagram of the structure of a computing device provided by the present application;

[0068] FIG11 is a schematic diagram of the structure of a computing device cluster provided by this application;

[0069] FIG12 is a schematic diagram of the structure of another computing device cluster provided by the present application;

[0070] FIG13 is a schematic diagram of the structure of another computing device cluster provided in this application. DETAILED DESCRIPTION

[0071] The terms "first" and "second" in the embodiments of this application are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include one or more of the features.

[0072] First, some technical terms involved in the embodiments of this application are introduced.

[0073] An application program, also known as an application or app, is a major category of software. It usually refers to a program written for a specific user purpose, such as a text processor, spreadsheet, accounting application, browser, media player, flight simulator, command-line game, image editor, etc.

[0074] A distributed architecture is one in which applications are deployed across different devices, such as servers and other computing devices. A typical example of a distributed architecture is the microservices architecture. Microservices is a software architecture that uses a modular approach to combine complex, large-scale applications, based on small building blocks (Small Building Blocks) that focus on a single responsibility and function. These small building blocks are also called microservices, and microservices expose interfaces for easy access.

[0075] A unit is a self-contained collection of functions that can complete specific business operations. This collection includes the key services required for that business, as well as the data assigned to that unit. Accordingly, unitization technology involves breaking applications into multiple units, confining logic calls and data access within the unit. Only a few specific scenarios require cross-unit access. This allows most business requests (also referred to as requests) to be returned within a single data center, significantly reducing access time and the frequency of cross-region access, thereby improving overall link stability. Unitization also provides improved isolation, including request isolation and resource isolation (such as data resource isolation or container resource isolation), enabling unit-level, full-link grayscale releases and application scaling. For application disaster recovery, unitization technology also enables fault isolation at the unit level. For example, a service or database failure in a unit typically only affects the business requests of that unit.

[0076] Related technologies provide the ability to unitize applications. Referring to the schematic diagram of the unitized application development process shown in FIG1A , as shown in FIG1A , the architect first plans the architecture of the application and then initializes the environment. The developer develops the unitized application based on the architect's modeling results and then builds the application. The effect of the above application can be verified. When the verification is passed, the application can be deployed for traffic allocation. Referring to the traffic forwarding diagram of the unitized application shown in FIG1B , for the user's first request (without region cookies), the forwarding process is as follows:

[0077] a1. The request is sent to the nearest routing gateway (referred to as gateway) in region 1 (denoted as region1);

[0078] a2. The gateway finds that there is no unit tag in the cookie and sends the request to the local service;

[0079] a3. The local service's zone client (denoted as ZoneClient) discovers that the requested data is in zone 2 (denoted as region2).

[0080] a4. The local service's routing client (denoted as RouteClient) returns the region2 cookie and uses the HyperText Transfer Protocol (HTTP) to return a redirect instruction.

[0081] a5. The caller redirects the request to the business application in region 2.

[0082] However, this solution lacks end-to-end tool support, requiring developers to handle numerous unitized details when working with business logic. This places high demands on developers and hinders development efficiency. Furthermore, the business application of this solution includes unitized forwarding logic, which creates a strong coupling between business logic and forwarding (routing) logic, resulting in unclear boundaries and significant robustness challenges.

[0083] In view of this, the present application provides an application management method. The method can be executed by an application management system (or application management platform). The application management system is used to generate code for applications that support unitized deployment. Among them, the application management system can be a software system, and the software system can be deployed in a computing device cluster. The computing device cluster executes the program code of the software system, thereby executing the application management method of the present application. It should be noted that the application management system can be provided to users in the form of cloud services. For example, the application management system can be deployed in a cloud computing cluster of a cloud platform and provided to users by providing interface calls. The application management system can also be provided to users in the form of an independent software package, which can be deployed by the user himself. In some examples, the application management system can also be a hardware system, such as a computing device cluster with application management (such as unitized development and deployment) functions. When the computing device cluster is running, it executes the application management method of the present application.

[0084] Specifically, the application management system can receive a unitized model created by a user for an application, which includes a model of a unitized root object in a unitized root service, a model of a unitized partition object, and a model of a unitized partition object in a unitized partition service, wherein the unitized root service and the unitized partition service are services deployed in the same data center in the application, and the unitized partition object is added with the primary key of the unitized root object as an associated foreign key. The unitized root service and the unitized partition service split data through the same splitting dimension, which can be determined based on the primary key of the unitized root object. Then, the application management system can call the end-to-end code generation model based on the unitized model to generate the code for the unitized root service and the code for the unitized partition service in the application, and then the application management system outputs the code for the unitized root service and the code for the unitized partition service.

[0085] This method obtains a unitized model by modeling business objects according to unitized root objects and unitized partition objects. Based on the unitized model, an end-to-end code generation model (such as a development framework) is called to generate the code for the corresponding unitized root service and the unitized partition service. This can achieve the unitization of applications and reduce cross-center calls for business requests. Developers are unaware of the details of the unitization implementation, which greatly reduces the threshold for unitized application development and improves development efficiency. Moreover, in applications developed by this method, the business logic can be decoupled from the forwarding logic, with clear boundaries and improved overall robustness.

[0086] In order to make the technical solution of the present application clearer and easier to understand, the system architecture of the present application is introduced below with reference to the accompanying drawings.

[0087] Referring to the schematic diagram of the architecture of an application management system shown in FIG2 , the application management system 20 is used to generate code for applications that support unitized deployment. The application management system 20 includes a modeling module 202 (e.g., a modeling tool) and a code generation module 204 (e.g., a code generation tool). In the design state, the present application provides a modeling tool for unitized applications, enabling architects to quickly build a unitized model of the unitized application. In the design state, the present application provides a code generation tool, thereby providing the ability to generate end-to-end code from the unitized model.

[0088] In order to adapt to the unitization transformation, this application also introduces unitization-related concepts, which are explained below in conjunction with the relationship diagram of the related concepts in Figure 3.

[0089] Unitized subdomain: When all application services within a subdomain are designed using the same unitized rules, this subdomain is considered a unitized subdomain. In Domain-Driven Design (DDD) practice, subdomains are formed by dividing domains to reduce the complexity of business understanding and to analyze problems using a divide-and-conquer approach. A domain describes a specific business scope and represents the business problems and demands that the software needs to address. In other words, a domain can be a business requirement. For example, a domain might include finance, which can be divided into the following subdomains: trading and credit. Each unitized subdomain can include a unitized root service and several unitized partitioned services.

[0090] Unitized root service: Each unitized subdomain has only one unitized root service. The unitized root service's database includes a root table, which provides the dimension for unit partitioning. This dimension can be the root table's primary key or other attribute fields. Other tables in the unitized root service include a special field that references the root table's primary key, enabling unitized splitting along the same dimension. Each unitized root service consists of a unitized root object and several unitized partition objects.

[0091] Unitized partitioning services: Each unitized subdomain includes several unitized partitioning services. All data tables of the partitioning services include a special field that references the root table primary key, enabling unitized splitting along the same dimension. Each unitized partitioning service includes several unitized partition objects.

[0092] Unitized root object: There is only one unitized root object in the unitized root service. The unitized root object can provide the root table. The unitized subdomain uses the primary key or other attribute fields of the root table as the dimension for dividing the unitized subdomain into units.

[0093] Unitized partition object: Each service (unitized root service, unitized partition service) has several unitized partition objects. The unitized partition objects are associated with the unitized root object. The primary key of the unitized root object is usually added as a foreign key to the unitized partition object, thereby achieving unitized splitting of all services within the unitized subdomain according to the same dimension.

[0094] Unitized root key: The primary key of a unitized root table is the unitized root key. Unitized partition key: The field that provides the split dimension in a unitized root table is the unitized partition key, also known as the unitized shard key. The unitized partition key can be the same as or different from the unitized root key.

[0095] The functions of modeling tools such as the modeling module 202 and code generation tools such as the code generation module 204 are introduced below.

[0096] The modeling module 202 is used to receive the unitized model created by the user for the application. The unitized model includes the model of the unitized root object in the unitized root service, the model of the unitized partition object, and the model of the unitized partition object in the unitized partition service. The unitized root service and the unitized partition service are services deployed in the same data center (such as the same region) in the application. The unitized partition object is added with the primary key of the unitized root object as an associated foreign key. The unitized root service and the unitized partition service split the data through the same splitting dimension. The splitting dimension can be determined according to the primary key of the unitized root object. For example, the splitting dimension can be the primary key of the unitized root object, or it can be an attribute field other than the primary key in the attribute field of the unitized root object. Among them, the unitized modeling tools such as the modeling module 202 support modeling of business objects, applications, and unitized subdomains through visual drag and drop.

[0097] The code generation module 204 is used to call the end-to-end code generation model based on the unitized model to generate the code of the unitized root service and the unitized partition service in the application. The code generation module 204 is also used to output the code of the unitized root service and the unitized partition service.

[0098] Based on the aforementioned application management system 20, the present application further provides an application management method. The application management method of the present application is described below in conjunction with an embodiment.

[0099] 4 shows a flow chart of an application management method. The method may be executed by an application management system 20. The application management system 20 includes a modeling module 202 and a code generation module 204. The method includes:

[0100] S402 : The modeling module 202 receives a unitized model created by a user for an application.

[0101] The unitized model includes the model of the unitized root object in the unitized root service, the model of the unitized partition object, and the model of the unitized partition object in the unitized partition service. The unitized root service and the unitized partition service are services deployed in the same data center within the application. The unitized partition object has the primary key of the unitized root object added as an associated foreign key. The unitized root service and the unitized partition service split data using the same splitting dimension. The splitting dimension is described in detail below.

[0102] In some possible implementations, the splitting dimension can be the primary key of the unitized root object, also known as the root table primary key. A primary key, also known as a primary code, is a key that uniquely and completely identifies a data column or attribute in a database table (also referred to as a data table). The data table of the unitized partition object includes an associated foreign key, which can be the primary key of the unitized root object. Accordingly, the unitized root service and the unitized partition service can split data based on the primary key of the unitized root object.

[0103] In some other possible implementations, the splitting dimension can be an attribute field other than the primary key of the unitized root object. Specifically, the unitized model can also include a unitized partition key, which is an attribute field in the attribute fields of the unitized root object other than the primary key. Accordingly, the unitized root service and the unitized partition service can split data using the unitized partition key.

[0104] For example, a data table includes the following fields: user identifier (ID), city, and transaction amount. Among them, the user ID is the primary key of the data table. This application supports data splitting by the primary key of the data table, namely "user ID". When the unitized model defines a unitized partition key, such as a city, the unitized root service and the unitized partition service can split the data according to "city". In some possible implementations, it is also possible to support partitioning of data tables by heat. For example, the data table can be partitioned (sharded) according to different gears of cold, warm, and hot.

[0105] Among them, the unitized modeling tool, such as the modeling module 202, supports modeling of business objects (such as unitized root objects, unitized partition objects), application services (such as unitized root services, unitized partition services), and unitized subdomains through visual drag and drop. In specific implementation, referring to the flowchart of a unitized model creation shown in Figure 5, the modeling module 202 can first create a unitized subdomain in response to the drag and drop operation of the user (such as an architect), and then add a unitized root service in the unitized subdomain in response to the user's drag and drop operation. Among them, the modeling module 202 can add a unitized root object and a unitized partition object in the unitized root service in response to the user's drag and drop operation after adding the unitized root service. It should be noted that the unitized root service can include one or more unitized partition objects. When the unitized root service includes multiple unitized partition objects, the modeling module 202 can repeatedly perform the operation of creating the unitized partition object. The modeling module 202 can also add a unitized partition service in the unitized subdomain in response to the user's drag and drop operation. Similar to the unitized root service, after adding the unitized root service, the modeling module 202 can respond to the user's drag-and-drop operation to add a unitized partition object to the unitized partition service. The unitized partition service can include one or more unitized partition objects. When the unitized partition service includes multiple unitized partition objects, the modeling module 202 can repeatedly perform the operation of creating the unitized partition object.

[0106] It should be noted that when the application includes multiple unitized partition services, the modeling module 202 may repeat the operation of creating the unitized partition services, including repeatedly adding the unitized partition services in the unitized subdomains and repeatedly adding the unitized partition objects in the unitized partition services.

[0107] Specifically, the modeling module 202 may provide a unitized subdomain creation control (such as a graphic control) or a unitized subdomain creation instruction. The user triggers the unitized subdomain creation control or inputs the unitized subdomain creation instruction, thereby triggering the operation of creating a unitized subdomain. The modeling module 202 creates the unitized subdomain in response to the triggering operation. The modeling module 202 also provides a service creation control or a service creation instruction. The user triggers the service creation control or inputs the service creation instruction, thereby triggering the operation of creating a unitized root service. The modeling module 202 creates the unitized root service in response to the triggering operation. Furthermore, the modeling module 202 also provides an object creation control or an object creation instruction. The user triggers the object creation control or inputs the object creation instruction, thereby triggering the operation of creating a unitized root object. The modeling module 202 creates the unitized root object in response to the triggering operation. Similarly, the user may also trigger the object creation control or inputs the object creation instruction, thereby triggering the operation of creating a unitized partition object. The modeling module 202 creates the unitized partition object in response to the triggering operation. When creating a unitized root object and a unitized partition object, the same object creation control or the same object creation instruction may be used, but different parameters may be used. For example, the parameter may include an object type, and the parameter value of the object type may be a unitized root object or a unitized partition object.

[0108] Similar to creating a unitized root service, the user triggers the operation of creating a unitized partition service by triggering a service creation control or inputting a service creation instruction. The modeling module 202 creates a unitized partition service in response to the triggering operation. The same service creation control or the same service creation instruction can be used when creating a unitized root service and a unitized partition service, and different parameters can be used. For example, the parameters may include a service type, and the parameter value of the service type can be a unitized root service or a unitized partition service. Furthermore, the modeling module 202 also provides an object creation control or an object creation instruction. The user triggers the operation of creating a unitized partition object by triggering an object creation control or inputting an object creation instruction. The modeling module 202 creates a unitized partition object in response to the triggering operation.

[0109] S404 , the code generation module 204 calls the end-to-end code generation model according to the unitized model to generate the code of the unitized root service and the code of the unitized partition service in the application.

[0110] The code generation module 204 provides the ability to generate end-to-end code from a unitized model. For each service (e.g., a unitized root service, a unitized partition service) in the unitized model created in the design phase, the code generation module 204 can generate end-to-end service code (e.g., code for the unitized root service, code for the unitized partition service) by calling the end-to-end code generation model.

[0111] Among them, the service code may include at least one of the database data definition language (DDL) file, interface document or backend microservice code. The backend microservice code only requires simple configuration to run directly. Through the generated DDL and interface documents, you can see the effect of the automatically generated microservice in the unitized scenario: the primary key of the unitized root object (also called the unitized root key) is added to the data table of the unitized partition object as an associated foreign key, and all business objects can achieve unified unit division through the unitized root key. Among them, the code of the unitized root service or the interface code of the unitized partition object in the code of the unitized partition service includes a path parameter, and the path parameter includes the primary key of the unitized root object. In other words, the generated API can also add the unitized root key as a path parameter to quickly locate the unitized root key through the path parameter.

[0112] S406 : The code generation module 204 outputs the code of the unitized root service and the code of the unitized partition service.

[0113] Specifically, the code generation module 204 can output the code of the unitized root service and the code of the unitized partition service through a graphical user interface, a command line interface, or an API. For example, the code generation module 204 can present the code of the unitized root service and the code of the unitized partition service to the user through a GUI.

[0114] The code generation module 204 can also receive user feedback on the generated code, such as feedback on the unitized root service code or unitized partition service code generated by the code generation model. This feedback may include user modifications, acceptances, or deletions to the generated code. Based on the user feedback on the generated code, the code generation module 204 can adaptively adjust the code generation model to improve the accuracy of the code generation model.

[0115] Furthermore, in the deployment state, the application management system 20 can uniformly deploy the services within the unitized subdomain. Among them, the services within the unitized subdomain include the unitized root services and unitized partition services associated with the unitized model. The application management system 20 can uniformly deploy the unitized root services and unitized partition services associated with the unitized model to the target area (region). The target area can be an area configured by the user. The number of target areas can be one or more, and each area can deploy one or more sets of services. In other words, the user can choose to use a single region deployment or multiple region deployment for the services within the unitized subdomain in the deployment state. Furthermore, the user can also choose the number of services deployed in each region (one set of services or multiple sets of services). When performing service scaling (expansion or reduction, referred to as expansion and reduction), the application management system 20 also supports unified expansion and reduction of application services based on the granularity of the unitized subdomain.

[0116] When performing deployment configuration, the application management system 20 can support different configuration methods. In some possible implementations, the application management system 20 can receive the target area configured by the user, where the target area can include one or more areas. In other possible implementations, the application management system 20 can also receive service information for services hosted by at least one area configured by the user, where the at least one area includes the target area.

[0117] This approach eliminates the need to predefine a deployment architecture when developing modular applications. In other words, the application's business logic (or modular model) and deployment architecture are decoupled, enabling flexible definition of the deployment architecture or plan during deployment. This approach supports adapting the deployment architecture to disaster recovery architectures such as active-active in the same city, active-active in different locations, and multi-center deployments based on business needs.

[0118] It should be noted that the application management system 20 also supports configuring service-level agreements (SLAs) for calls between services during the modeling process. SLA, also known as service-level agreement, is a formal commitment defined between a service provider and a service consumer. The service indicators specifically promised between the service provider and the service consumer (the user being served) may include but are not limited to quality, availability or responsibility. The most common component of an SLA is the service provided to the customer in a contractual agreement. Specifically, the application management system 20 can receive a service-level agreement SLA for calls between multiple services in an application configured by the user. Accordingly, in the deployment state, the application management system 20 can also recommend areas for deploying applications based on the SLAs for calls between multiple services.

[0119] For example, for services with high SLA requirements, the application management system 20 can recommend deploying applications in a region that is close (e.g., the shortest distance or a distance less than a set distance) to achieve local access. For another example, for services with low SLA requirements, the application management system 20 can recommend deploying applications in a low-cost region (perhaps a remote region) to reduce deployment costs.

[0120] In the running state, the application management system 20 is also used to deploy a routing module in each area of ​​the target area. The routing module can be a routing plug-in of the application gateway, which is used to process unitized routing. Among them, the application gateway is deployed in each Region as a unified entrance for services within the unitized subdomain. The business request is connected to the nearest application gateway. The routing plug-in of the application gateway extracts the value of the unitized root key in the business request. If the unitized partition key is consistent with the unitized root key, the value of the unitized root key is used as the value of the unitized partition key; if the unitized partition key is inconsistent with the unitized root key, the value of the unitized partition key corresponding to the unitized root key is first obtained from the cache or call service. According to the value of the unitized partition key and the pre-set routing algorithm, it is determined whether the business request is a business request of this unit. If it is a business request of this unit, it is routed to the corresponding service of this unit. If it is not a business request of this unit, it can be routed to the application gateway of the corresponding unit.

[0121] Specifically, the application management system 20 can receive a service request through the routing module and obtain the value of the splitting dimension based on the service request. The value of the splitting dimension includes the value of the primary key of the unitized root object, or the value of the unitized partition key obtained based on the value of the primary key of the unitized root object. The application management system 20 then routes the service request to the service in the corresponding area based on the value of the splitting dimension.

[0122] Among them, the request header or path parameter of the business request includes the value of the primary key of the unitized root object. Accordingly, the application management system 20 can extract the value of the primary key of the unitized root object from the request header or path parameter of the business request. When the splitting dimension is the primary key of the unitized root object, the application management system 20 can determine that the value of the splitting dimension can be the value of the primary key of the unitized root object, and the application management system 20 can route the business request based on the value of the splitting dimension combined with the routing algorithm. When the business request is a business request of this unit, the application management system 20 routes the business request to the corresponding service of this unit through the routing module; when the business request is not a business request of this unit, the application management system 20 routes the business request to the application gateway of the corresponding unit, and the application gateway routes it to the corresponding service of the corresponding unit.

[0123] When the splitting dimension is an attribute field other than the primary key of the unitized root object, the application management system 20 can first obtain the value of the primary key of the unitized root object based on the service request. For example, the value of the primary key of the unitized root object can be extracted from the request header or path parameters of the service request. Then, the value of the unitized partition key can be obtained based on the value of the primary key of the unitized root object and the unitized partition key defined in the unitized model. The value of the splitting dimension is the value of the unitized partition key.

[0124] Based on the above description, it can be seen that the application management method of this application forms a unitized model through business modeling, and then generates end-to-end code through an end-to-end code generation model based on the unitized model. Developers do not need to perceive the concept and details of unitization, which greatly reduces the threshold for unitized application development and improves development efficiency. Among them, the method introduces unitized subdomains, and the services within the unitized subdomains shard the data according to the same splitting dimension. The services within a unitized subdomain are uniformly deployed, reducing calls across data centers, reducing access time, and at the same time reducing the frequency of cross-regional access, thereby improving the overall stability of the link.

[0125] Figure 4 introduces the application management method of the present application. The application management method of the present application is described below in conjunction with specific application scenarios.

[0126] Let’s take a transaction scenario as an example.

[0127] In the design phase, the modeler designs a Trading unitized subdomain. As shown in Figure 6, the Trading unitized subdomain includes the following services (e.g., microservices): Customer service, Ordering service, and Paying service. The Customer service is the unitized root service, while the Ordering service and Paying service are unitized partitioned services. The Customer service includes the unitized root object, the Account object. All services within the Trading unitized subdomain (e.g., Customer service, Ordering service, and Paying service) use the Account object's ID as the basis for unitization. The ShoppingCart object in the Customer service, the Order object and OrderingItem object in the Ordering service, and the PayOrder object in the Paying service are unitized partitioned objects.

[0128] In the development state, the application management system 20 provides a service code generation tool (such as the code generation module 204) to directly generate a service code that can be run directly from the constructed unitized model. In this embodiment, the application management system 20 can generate corresponding microservice codes for multiple microservices in the Trading unitized subdomain. Among them, the application management system 20 generates a partial database table sample of the microservice code generated by the service code generation tool as shown in Figure 7. The data table generated by the unitized root object Account has a primary key, specifically the ID field, which is used as the basis for dividing the unitized subdomain into units. The field Account_id exists in the data table of the unitized partition object ShoppingCart and the Order object as a foreign key, which is used to associate with the Account object. At the same time, the Account_id field is also used as the basis for dividing the two objects into units.

[0129] The API interfaces for some of the business objects of the microservices generated by the application management system 20 are shown in Figure 8. For the unitized root object Account, the application management system 20 generates basic add, delete, modify, and query APIs, where the operation objects are all Account objects or their IDs (denoted as Account_id). The application management system 20 can determine the unit and route of the Account object based on its ID (which is included in the Account object). For the unitized partitioned objects ShoppingCart and Order, the application management system 20 generates add, delete, modify, and query APIs, where the API paths include the path parameter Account_id, and the unit and route of the ShoppingCart and Order objects can be determined based on the value of Account_id.

[0130] In the deployment state, services within the Trading unitized subdomain can be deployed uniformly. Users can decide whether to deploy services within the unitized subdomain in a single or multiple regions, and can also determine the service information for each region during deployment, allowing for flexible definition of the deployment architecture.

[0131] In the running state, before accessing services within the unitized subdomain, it is necessary to first access the unified application gateway. The application gateway has a built-in routing plug-in for reading metadata generated during business modeling, such as the unitized root object and unitized partition object included in the unitized root service, the unitized partition object included in the unitized partition service, and the attribute fields of the above-mentioned unitized root object and unitized partition object. When the business request arrives at the application gateway, the routing plug-in extracts the Account_id in the request, and determines whether the business request is a business request of this unit based on the value of Account_id and the routing rules (routing algorithm) defined in the metadata. If so, it is forwarded to the service corresponding to this unit. If not, it is forwarded to the application gateway of other units. During the entire running period, the routing of business requests is completely handled by the application gateway, and the services within the unitized subdomain are unaware of the unitization details.

[0132] Figure 9 provides a schematic diagram of a multi-region deployment of a unitized application. The unitized application includes a Trading unitized subdomain, and the Trading unitized subdomain includes the following microservices: Customer service, Ordering service, and Paying service. Among them, the Customer service is the unitized root service, which provides a unitized root object, namely the Account object. The primary key "ID" of the Account object is used for unitized splitting. Based on this, the data tables of the Customer service, Ordering service, and Paying service can all be unitized and split according to the account number (Account_id) provided by the unitized root service. When the user selects multi-region deployment and configures deployment in region A and region B, the application management system 20 can instantiate the deployment template and uniformly deploy multiple microservices in the unitized subdomain in region A and region B respectively, specifically the Customer service, Ordering service, and Paying service. Among them, the microservice instances in different regions can store the split data in their respective databases (DB). Unitized applications can also include microservices that cannot be split according to accounts, such as the commodity information (referred to as commodity) microservice. Users can configure the commodity microservice to be deployed separately in region B.

[0133] Among them, region A and region B are respectively deployed with application gateways, and the application gateways include routing plug-ins. The routing plug-in can access the routing cache. Business requests (traffic) can access region A or region B nearby or according to the domain name. Taking the example of business requests accessing region A nearby, the business request first reaches the application gateway of region A. The routing plug-in in the application gateway can extract the value of the primary key of the unitized root object from the Uniform Resource Locator (URL) path of the business request, or the request header. Among them, the routing plug-in in the application gateway can also cache the extracted value of the primary key of the unitized root object, for example, in a cookie. Accordingly, when the application gateway receives the business request again, it can extract the value of the primary key of the unitized root object from the cookie in the routing cache according to the business request. In this example, the value of the primary key of the unitized root object can be the value of the ID of the Account object. In some examples, the routing plug-in can also automatically identify and extract the value of the ID of the Account object by parsing the unitized model.

[0134] The application management system 20 can calculate the unit corresponding to the value of the ID of the Account object through routing rules according to the global unitization strategy. When the unit corresponding to the value of the ID of the Account object is the current unit (the unit in region A), the business request can be routed to the corresponding service in region A, such as the Ordering service, to achieve a unitized closed loop of traffic. When the unit corresponding to the value of the ID of the Account object is another unit (such as the unit in region B), the business request can be routed to the application gateway in region B, and the application gateway in region B routes it to the corresponding service to achieve a unitized closed loop of traffic in region B.

[0135] In some possible implementations, when a business request is routed to the Ordering service, if the Customer service or the Paying service needs to be called, it can be implemented by calling it within the unit. If the commodity service needs to be called, it can be implemented through a cross-unit call.

[0136] Figures 6 to 9 illustrate the example of the primary key of the unitized root object with the split dimension as the unitized partition key. In addition to using the primary key of the unitized root object as the unitized partition key, the present application also provides the ability to use other attribute fields of the unitized root object as unitized partition keys. Taking the example of the embodiment of Figures 6 to 9 as an example, the city field of the Account object can be used as a unitized partition key. In this scenario, data in the same city or the same region can be divided into the same unit. At this time, it is only necessary to define the unitized partition key during business modeling, and no adjustments are made in the development and deployment states. In the running state, the application gateway is responsible for executing the conversion between account_id and city. After identifying the account_id, the application gateway confirms the corresponding city value by caching or calling other requests, and then forwards the business request to the corresponding service or application gateway based on the value of city.

[0137] Based on the aforementioned application management method, the present application further provides an application management system 20. As shown in FIG2 , the application management system 20 is used to generate code for applications that support unitized deployment. The application management system 20 includes:

[0138] A modeling module 202 is configured to receive a unitized model created by a user for an application, the unitized model including a model of a unitized root object in a unitized root service, a model of a unitized partition object, and a model of a unitized partition object in a unitized partition service. The unitized root service and the unitized partition service are services deployed in the same data center in the application. The unitized partition object has the primary key of the unitized root object added as an associated foreign key. The unitized root service and the unitized partition service split data using the same splitting dimension, which is determined based on the primary key of the unitized root object.

[0139] A code generation module 204 is configured to call an end-to-end code generation model according to the unitized model to generate the code of the unitized root service and the code of the unitized partition service in the application;

[0140] The code generation module 204 is further configured to output the code of the unitized root service and the code of the unitized partition service.

[0141] For example, the modeling module 202 and the code generation module 204 can be implemented by hardware or software. For ease of description, the modeling module is used as an example for explanation below.

[0142] When implemented by software, the modeling module 202 can be an application running on a computing device, such as a computing engine. The application can be provided in the form of a virtualization service. Virtualization services can include virtual machine (VM) services, bare metal server (BMS) services, and container services. Among them, the VM service can be a service that uses virtualization technology to virtualize a virtual machine resource pool on multiple physical hosts to provide VMs for users to use on demand. The BMS service is a service that virtualizes a BMS resource pool on multiple physical hosts to provide BMSs for users to use on demand. The container service is a service that virtualizes a container resource pool on multiple physical hosts to provide containers for users to use on demand. VM is a simulated virtual computer, that is, a logical computer. BMS is a high-performance computing service that can be elastically scalable. Its computing performance is no different from that of a traditional physical machine and has the characteristics of secure physical isolation. Containers are a kernel virtualization technology that can provide lightweight virtualization to achieve the purpose of isolating user space, processes, and resources. It should be understood that the VM service, BMS service and container service in the above-mentioned virtualization services are only specific examples. In actual applications, virtualization services can also be other lightweight or heavyweight virtualization services, which are not specifically limited here.

[0143] When implemented through hardware, the modeling module 202 may include at least one computing device, such as a server. Alternatively, the modeling module 202 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0144] In some possible implementations, the unitized root service and the unitized partition service split data according to the primary key of the unitized root object.

[0145] In some possible implementations, the unitized model further includes a unitized partition key, where the unitized partition key is an attribute field other than a primary key in an attribute field of the unitized root object;

[0146] Accordingly, the unitized root service and the unitized partition service split data by the unitized partition key.

[0147] In some possible implementations, the modeling module 202 is further configured to:

[0148] Receive a service level agreement (SLA) configured by the user for calling multiple services in the application;

[0149] The system 20 further includes:

[0150] A recommendation module (not shown in FIG2 ) is configured to recommend a region for deploying the application based on the SLAs of calls between the multiple services.

[0151] In some possible implementations, the system 20 further includes:

[0152] A deployment module (not shown in FIG2 ) is configured to uniformly deploy the unitized root service and the unitized partition service associated with the unitized model to a target area.

[0153] In some possible implementations, the deployment module is further configured to:

[0154] receiving the target area configured by the user, where the target area includes one or more areas; or

[0155] Service information of a service carried by at least one area configured by the user is received, where the at least one area includes the target area.

[0156] In some possible implementations, the application management system is further configured to deploy a routing module in each of the target areas, and the system 20 further includes:

[0157] An interaction module (not shown in FIG2 ), configured to receive a service request through the routing module;

[0158] The routing module (not shown in Figure 2) is used to obtain the value of the splitting dimension according to the business request. The value of the splitting dimension includes the value of the primary key of the unitized root object, or the value of the unitized partition key obtained according to the value of the primary key of the unitized root object, and route the business request to the service of the corresponding area according to the value of the splitting dimension.

[0159] In some possible implementations, the request header or path parameter of the service request includes the value of the primary key of the unitized root object;

[0160] The routing module is specifically used for:

[0161] The value of the primary key of the unitized root object is extracted from the request header or path parameter of the business request, and the value of the split dimension is the value of the primary key of the unitized root object.

[0162] In some possible implementations, the routing module is specifically configured to:

[0163] According to the business request, obtaining the value of the primary key of the unitized root object;

[0164] According to the value of the primary key of the unitized root object and the unitized partition key defined by the unitized model, the value of the unitized partition key is obtained, and the value of the split dimension is the value of the unitized partition key.

[0165] In some possible implementations, the code of the unitized root service or the interface code of the unitized partition object in the code of the unitized partition service includes a path parameter, and the path parameter includes the primary key of the unitized root object.

[0166] This application also provides a computing device 1000. As shown in Figure 10, computing device 1000 includes a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008. Processor 1004, memory 1006, and communication interface 1008 communicate with each other via bus 1002. Computing device 1000 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 1000.

[0167] Bus 1002 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG10 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 1002 may include a path for transmitting information between various components of computing device 1000 (e.g., memory 1006, processor 1004, and communication interface 1008).

[0168] The processor 1004 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0169] The memory 1006 may include volatile memory, such as random access memory (RAM). The memory 1006 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD) or solid state drive (SSD). The memory 1006 stores executable program code, and the processor 1004 executes the executable program code to implement the aforementioned application management method. Specifically, the memory 1006 stores instructions for the application management system 20 to execute the application management method.

[0170] The communication interface 1008 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1000 and other devices or a communication network.

[0171] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0172] As shown in Figure 11, the computing device cluster includes at least one computing device 1000. The memory 1006 of one or more computing devices 1000 in the computing device cluster may store the same application management system 20 for executing instructions of the application management method.

[0173] In some possible implementations, one or more computing devices 1000 in the computing device cluster may also be used to execute some of the instructions of the application management system 20 for executing the application management method. In other words, the combination of one or more computing devices 1000 may jointly execute the instructions of the application management system 20 for executing the application management method.

[0174] It should be noted that the memory 1006 in different computing devices 1000 in the computing device cluster may store different instructions for executing part of the functions of the application management system 20 .

[0175] Figure 12 illustrates a possible implementation. As shown in Figure 12, two computing devices 1000A and 1000B are connected via a communication interface 1008. The memory of computing device 1000A stores instructions for executing the functions of modeling module 202. The memory of computing device 1000B stores instructions for executing the functions of code generation module 204. In other words, the memories 1006 of computing devices 1000A and 1000B jointly store instructions for application management system 20 to execute the application management method.

[0176] The connection mode between the computing device clusters shown in Figure 12 may be considered to be based on the fact that the application management method provided by this application needs to decouple modeling and code generation. Therefore, it is considered to delegate the functions implemented by the code generation module 204 to the computing device 1000B.

[0177] It should be understood that the functionality of the computing device 1000A shown in FIG12 may also be accomplished by multiple computing devices 1000. Similarly, the functionality of the computing device 1000B may also be accomplished by multiple computing devices 1000.

[0178] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network (WAN) or a local area network (LAN), etc. FIG13 shows a possible implementation. As shown in FIG13 , two computing devices 1000C and 1000D are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1006 in the computing device 1000C stores instructions for executing the functions of the modeling module 202. Simultaneously, the memory 1006 in the computing device 1000D stores instructions for executing the functions of the code generation module 204.

[0179] The connection method between the computing device clusters shown in Figure 13 can be considered to be that the application management method provided in this application needs to decouple modeling and code generation, so it is considered to hand over the functions implemented by the code generation module 204 to the computing device 1000D for execution.

[0180] It should be understood that the functions of the computing device 1000C shown in FIG13 may also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000D may also be completed by multiple computing devices 1000.

[0181] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned application management system 20 for executing the application management method.

[0182] Embodiments of the present application also provide a computer program product containing instructions. The computer program product may be software or a program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the aforementioned code management method.

[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.

Claims

1. An application management method, characterized in that: The method is executed by an application management system, the application management system is used to generate code for an application that supports unitized deployment, and the method includes: Receive a unitized model created by a user for an application, the unitized model including a model of a unitized root object in a unitized root service, a model of a unitized partition object, and a model of a unitized partition object in a unitized partition service, the unitized root service and the unitized partition service are services deployed in the same data center in the application, the unitized partition object is added with a primary key of the unitized root object as an associated foreign key, the unitized root service and the unitized partition service split data through the same splitting dimension, and the splitting dimension is determined according to the primary key of the unitized root object; According to the unitized model, calling an end-to-end code generation model to generate the code of the unitized root service and the code of the unitized partition service in the application; The code of the unitized root service and the code of the unitized partition service are output.

2. The method according to claim 1, characterized in that The unitized root service and the unitized partition service split data by a primary key of the unitized root object.

3. The method according to claim 1, characterized in that The unitized model also includes a unitized partition key, which is an attribute field other than the primary key in the attribute field of the unitized root object; Accordingly, the unitized root service and the unitized partition service split data by the unitized partition key.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Receive a service level agreement SLA configured by the user for calling multiple services in the application; Based on the SLAs invoked between the multiple services, a region for deploying the application is recommended.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The unitized root service and the unitized partition service associated with the unitized model are uniformly deployed to the target area.

6. The method according to claim 5, characterized in that The method further comprises: receiving the target area configured by the user, where the target area includes one or more areas; or, Service information of a service carried by at least one area configured by the user is received, where the at least one area includes the target area.

7. The method according to claim 5, characterized in that The application management system is further used to deploy a routing module in each area of ​​the target area. The method further includes: Receiving a service request through the routing module; According to the business request, a value of a split dimension is obtained, where the value of the split dimension includes a value of a primary key of a unitized root object, or a value of a unitized partition key obtained according to the value of the primary key of the unitized root object; According to the value of the split dimension, the business request is routed to the service in the corresponding area.

8. The method according to claim 7, characterized in that The request header or path parameter of the business request includes the value of the primary key of the unitized root object; The obtaining, according to the business request, a value of a split dimension includes: The value of the primary key of the unitized root object is extracted from the request header or path parameter of the business request, and the value of the split dimension is the value of the primary key of the unitized root object.

9. The method according to claim 7, characterized in that: The obtaining, according to the business request, a value of a split dimension includes: According to the business request, obtaining the value of the primary key of the unitized root object; According to the value of the primary key of the unitized root object and the unitized partition key defined by the unitized model, the value of the unitized partition key is obtained, and the value of the split dimension is the value of the unitized partition key.

10. The method according to any one of claims 1 to 9, characterized in that: The interface code of the unitized root service or the unitized partition service includes a path parameter in the interface code of the unitized partition object, and the path parameter includes the primary key of the unitized root object.

11. An application management system, characterized in that: The application management system is used to generate code for applications that support unitized deployment, and the application management system includes: The modeling module is used to receive a unitized model created by a user for an application, wherein the unitized model includes a unitized root service A model of a root object, a model of a unitized partition object, and a model of a unitized partition object in a unitized partition service, wherein the unitized root service and the unitized partition service are services deployed in the same data center in the application, the unitized partition object is added with a primary key of the unitized root object as an associated foreign key, the unitized root service and the unitized partition service split data through the same splitting dimension, and the splitting dimension is determined according to the primary key of the unitized root object; A code generation module, used to call an end-to-end code generation model according to the unitized model to generate the code of the unitized root service and the code of the unitized partition service in the application; The code generation module is further used to output the code of the unitized root service and the code of the unitized partition service.

12. The system according to claim 11, characterized in that The unitized root service and the unitized partition service split data by a primary key of the unitized root object.

13. The system according to claim 11, characterized in that The unitized model also includes a unitized partition key, which is an attribute field other than the primary key in the attribute field of the unitized root object; Accordingly, the unitized root service and the unitized partition service split data by the unitized partition key.

14. The system according to any one of claims 11 to 13, characterized in that: The modeling module is also used to: Receive a service level agreement SLA configured by the user for calling multiple services in the application; The system further comprises: The recommendation module is used to recommend a region for deploying the application according to the SLAs invoked between the multiple services.

15. The system according to any one of claims 11 to 14, characterized in that The system further comprises: A deployment module is used to uniformly deploy the unitized root service and the unitized partition service associated with the unitized model to a target area.

16. The system according to claim 15, characterized in that The deployment module is also used to: receiving the target area configured by the user, where the target area includes one or more areas; or, Service information of a service carried by at least one area configured by the user is received, where the at least one area includes the target area.

17. The system according to claim 15, characterized in that The application management system is further used to deploy a routing module in each area of ​​the target area, and the system further includes: An interaction module, used for receiving a service request through the routing module; The routing module is used to obtain the value of the splitting dimension according to the business request, and the value of the splitting dimension includes the value of the primary key of the unitized root object, or the value of the unitized partition key obtained according to the value of the primary key of the unitized root object, and route the business request to the service of the corresponding area according to the value of the splitting dimension.

18. The system according to claim 17, characterized in that The request header or path parameter of the business request includes the value of the primary key of the unitized root object; The routing module is specifically used for: The value of the primary key of the unitized root object is extracted from the request header or path parameter of the business request, and the value of the split dimension is the value of the primary key of the unitized root object.

19. The system according to claim 17, characterized in that The routing module is specifically used for: According to the business request, obtaining the value of the primary key of the unitized root object; According to the value of the primary key of the unitized root object and the unitized partition key defined by the unitized model, the value of the unitized partition key is obtained, and the value of the split dimension is the value of the unitized partition key.

20. The system according to any one of claims 11 to 19, characterized in that The interface code of the unitized root service or the unitized partition service includes a path parameter in the interface code of the unitized partition object, and the path parameter includes the primary key of the unitized root object.

21. A computing device cluster, characterized in that: The computing device cluster includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions; the at least one processor executes the computer-readable instructions so that the computing device cluster executes the application management method as described in any one of claims 1 to 10.

22. A computer-readable storage medium, characterized in that: Comprising computer-readable instructions; the computer-readable instructions are used to implement the application management method according to any one of claims 1 to 10.

23. A computer program product, characterized in that Comprising computer-readable instructions; the computer-readable instructions are used to implement the application management method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Code automatic generation device and method based on Springboot 2

    CN111488143A

  • Micro-service system creation method, device and equipment, medium and micro-service system

    CN112346717A

  • Metacode-based low-code development system and method

    CN115237380A

  • Developing a software product in a no-code development platform to address a problem related to a business domain

    US20230087993A1

  • Micro-service creation method and related device

    WO2023151239A1