Application management method and related system

By performing unitary modeling and code generation of business objects, the unitary application is realized, the problem of cross-data center calls is solved, and the development efficiency and service response efficiency are improved.

CN119806555APending Publication Date: 2025-04-11HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311713736.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-10-09
Filing Date
2023-12-13
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In a distributed architecture, cross-data center calls of business requests have affected the user experience, and how to effectively reduce cross-data center calls have become a core issue.

Method used

By modeling the business objects in unity root objects and unity partition objects, a unity model is generated, and the code generation model is used to generate codes for unity root services and unity partition services, thereby realizing unity of applications and reducing cross-center calls of business requests.

Benefits of technology

The unitization of applications is realized, which reduces developers' perception of unity details, lowers the threshold for unity application development, improves development efficiency, and improves service response efficiency and overall robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806555A_ABST
    Figure CN119806555A_ABST
Patent Text Reader

Abstract

The invention provides an application management method, which is executed by an application management system, the system is used for generating codes of an application supporting unitized deployment, and the method comprises the following steps: receiving a unitized model created by a user for the application, the unitized model comprises 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, and the unitized root service and the unitized partition service are services deployed in the same data center in the application; the primary key of the unitized root object is added to the unitized partition object to serve as an associated foreign key, so that data splitting is achieved through the same splitting dimension, the splitting dimension is determined according to the primary key of the unitized root object, and then an end-to-end code generation model is called according to the unitized model; and generating a code of the unitized root service and a code of the unitized partition service, and outputting the codes of the services. Therefore, unitization of the application can be realized, and cross-center calling of the service request is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on October 9, 2023, with application number 202311306392.X and invention name “An application management method and related equipment”, the entire contents of which are incorporated by reference in 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, the business usage (also known as business volume) in various business systems has grown rapidly. When the business scale reaches a certain volume, in order to improve the stability and high availability of the business system, it is usually necessary to establish a disaster recovery architecture such as multi-site active-active and two-site three-center. Since the remote data centers are far apart, the communication time is long, and under the distributed architecture, a business request often involves multiple microservice calls. If there are calls across data centers, users usually need to wait for a long time (for example, up to several minutes) to get the request results, which greatly 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 of distributed architecture. Summary of the invention

[0005] 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 of the corresponding unitized root service and the code of the unitized partition service, so that 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.

[0006] 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 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, the application management method of the present application is executed.

[0007] Specifically, the application management system can 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 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, wherein the splitting dimension is determined according to the primary key of the unitized root object, and 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.

[0008] 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 code for the unitized partition service. This can achieve unitization of applications and reduce cross-center calls of business requests. Developers are unaware of the details of unitization implementation, which greatly reduces the threshold for unitized application development and improves development efficiency. Moreover, in the application developed by this method, the business logic can be decoupled from the forwarding logic, with clear boundaries, improving overall robustness.

[0009] In some possible implementations, the unitized root service and the unitized partition service split data by the primary key of the unitized root object. The unitized partition object adds the primary key of the unitized root object as an associated foreign key. Therefore, the data table of the unitized partition service includes the primary key of the unitized root object, such as a user ID, so that the process of determining the routing path can be simplified when routing service requests later, thereby improving routing efficiency and further improving service response efficiency.

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

[0011] In this way, the data splitting dimensions can be flexibly defined, and data splitting is not limited to being performed according to user IDs (unitized sharding), which has high availability.

[0012] In some possible implementations, the application management system may also receive a service-level agreement (SLA) between multiple services in an application configured by the user, and then recommend a region for deploying the application based on the SLAs between the multiple services. In this way, a reference is provided for users to deploy unitized applications, and the service-level agreement requirements of different services in the unitized application are met.

[0013] 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 that are 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.

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

[0015] In some possible implementations, the application management system supports multiple configuration methods for deployment configuration. One method may be that the application management system receives the target area configured by the user, and the target area may include one or more areas. Another method may be that the application management system receives service information of a service carried by at least one area configured by the user, and the service information may be, for example, a service identifier, wherein at least one area includes the target area.

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

[0017] In some possible implementations, the application management system is also used to deploy a routing module in each area of ​​the target area. Accordingly, the application management system can receive the business request 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.

[0018] 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.

[0019] In some possible implementations, 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 can extract the value of the primary key of the unitized root object 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.

[0020] 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 further improving the service response efficiency.

[0021] 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.

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

[0023] 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.

[0024] This method can quickly locate the primary key by introducing the primary key of the unitized root object in the path parameter, and then perform routing query in combination with the primary key to improve routing efficiency.

[0025] 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:

[0026] A modeling module, configured to receive a unitized model created by a user for an application, wherein 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, wherein the unitized root service and the unitized partition service are services deployed in the same data center in the application, wherein the unitized partition object is added with a primary key of the unitized root object as an associated foreign key, and 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;

[0027] 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;

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

[0029] In some possible implementations, the unitized root service and the unitized partition service split data by a primary key of the unitized root object.

[0030] In some possible implementations, the unitized model further includes a unitized partition key, and the unitized partition key is an attribute field in the attribute field of the unitized root object except the primary key;

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

[0032] In some possible implementations, the modeling module is further used to:

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

[0034] The system further comprises:

[0035] The recommendation module is used to recommend a region for deploying the application according to the SLAs invoked between the multiple services.

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

[0037] 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.

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

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

[0040] 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.

[0041] In some possible implementations, the application management system is further used to deploy a routing module in each area of ​​the target area, and the system further includes:

[0042] An interaction module, used for receiving a service request through the routing module;

[0043] 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.

[0044] 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;

[0045] The routing module is specifically used for:

[0046] 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.

[0047] In some possible implementations, the routing module is specifically used to:

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

[0049] 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.

[0050] 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.

[0051] In a third aspect, the present application provides a computing device cluster. 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. The at least one processor and the at least one memory communicate with each other. The at least one processor is used to execute instructions stored in the at least one memory, so that the computing device or the computing device cluster executes the application management method as described in the first aspect or any implementation of the first aspect.

[0052] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores 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 one of the implementations of the first aspect.

[0053] 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 the computing device cluster to execute the application management method described in the first aspect or any one of the implementations of the first aspect.

[0054] Based on the implementations provided in the above aspects, the present application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings required for use in the embodiments are briefly introduced below.

[0056] Figure 1A A schematic diagram of a unitized application development process provided for this application;

[0057] Figure 1B A schematic diagram of traffic forwarding for a unitized application provided in this application;

[0058] Figure 2 A schematic diagram of the architecture of an application management system provided for this application;

[0059] Figure 3 A schematic diagram of the relationship between unit-related concepts provided for this application;

[0060] Figure 4 A flowchart of an application management method provided for this application;

[0061] Figure 5 A schematic diagram of the process flow for creating a unitized model provided for this application;

[0062] Figure 6 A schematic diagram of a transaction unitized subdomain provided for this application;

[0063] Figure 7 A schematic diagram of a sample database table of a microservice code provided for this application;

[0064] Figure 8 A schematic diagram of the interface of some business objects of a generated microservice provided by this application;

[0065] Fig. 9 A schematic diagram of a multi-region deployment unitized application provided by this application;

[0066] Fig.10 A schematic diagram of the structure of a computing device provided for this application;

[0067] Fig.11 A schematic diagram of the structure of a computing device cluster provided for this application;

[0068] Fig.12 A schematic diagram of the structure of another computing device cluster provided for this application;

[0069] Fig.13 A schematic diagram of the structure of another computing device cluster provided in this application. DETAILED DESCRIPTION

[0070] The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

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

[0072] Application program, abbreviated as application (application or app), is the main classification of software. It usually refers to a program written for a specific application purpose of the user, such as text processors, spreadsheets, accounting applications, browsers, media players, aviation flight simulators, command line games, image editors, etc.

[0073] Distributed architecture refers to an architecture in which applications are deployed on different devices (such as servers and other computing devices). A typical example of distributed architecture is microservices architecture. Microservices architecture is a software architecture that uses small building blocks that focus on a single responsibility and function to combine complex large applications in a modular way. The above small building blocks can also be called microservices, and microservices open interfaces for easy calling.

[0074] A unit refers to a self-closed loop set that can complete a specific business operation. This set contains the key services required for a specific business and the data assigned to this unit. Accordingly, unitization technology refers to splitting an application into multiple units through unitization technology, forming a closed loop between logic calls and data access within the unit, and only a few calls in specific scenarios will be accessed across units. In this way, most business requests (also referred to as requests) can be returned within a data center, greatly reducing the access time, while reducing the frequency of cross-regional access and improving the overall stability of the link. In addition, unitization technology can also provide better isolation, including request isolation and resource isolation (such as data resource isolation or container resource isolation), to achieve unit-level full-link grayscale release, application expansion and contraction, etc. In terms of application disaster recovery, unitization technology can also achieve unit-level fault isolation. For example, when a service or database of a unit fails, it usually only affects the business requests of that unit.

[0075] Related technologies provide the ability to unitize applications. Figure 1A The schematic diagram of the unitized application development process is shown in Figure 1A As shown in the figure, the architect first plans the application architecture and then initializes the environment. The developer develops the modular 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 to allocate traffic. Figure 1B The traffic forwarding diagram of the unitized application shown in the figure shows that for the user's first request (without region cookie), the forwarding process is as follows:

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

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

[0078] a3. The local service zone client (denoted as ZoneClient) finds that the requested data is in zone 2 (denoted as region2);

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

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

[0081] However, the above solution lacks end-to-end tool support. Developers need to deal with many unitized details when processing business logic, which places high demands on developers and affects development efficiency. In addition, the business application of the above solution includes unitized forwarding logic. The business logic and forwarding (routing) logic are highly coupled, with unclear boundaries and great challenges in robustness.

[0082] 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, the application management method of the present application is executed.

[0083] Specifically, the application management system can receive a unitized model created by a user for an application, wherein 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, 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 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, and the splitting dimension can be determined according to the primary key of the unitized root object, and then the application management system can call the end-to-end code generation model according to 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.

[0084] 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 code for the unitized partition service. This can achieve unitization of applications and reduce cross-center calls of business requests. Developers are unaware of the details of unitization implementation, which greatly reduces the threshold for unitized application development and improves development efficiency. Moreover, in the application developed by this method, the business logic can be decoupled from the forwarding logic, with clear boundaries, improving overall robustness.

[0085] 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.

[0086] See also Figure 2 The schematic diagram of the architecture of an application management system is shown, and 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 (such as a modeling tool) and a code generation module 204 (such as a code generation tool). In the design state, the present application enables architects to quickly establish a unitized model of a unitized application by providing a modeling tool for unitized applications. In the design state, the present application provides the ability to generate end-to-end code from a unitized model by providing a code generation tool.

[0087] In order to adapt to the unitization transformation, this application also introduces unitization related concepts. Figure 3 The relationship diagrams of the related concepts are explained respectively.

[0088] Unitized subdomain: When all application services in a subdomain are designed with the same unitization rules, this subdomain is a unitized subdomain. In the practice of Domain-Driven Design (DDD), subdomains are formed by dividing domains in order to reduce the complexity of business understanding, and are used to analyze problems through a divide-and-conquer approach. Domains are used to describe a specific business scope, which are business problems and demands that software needs to solve. In other words, domains can be business needs. For example, a domain can include the financial domain, which can be divided into the following subdomains: transactions, credit. Each unitized subdomain can include a unitized root service and several unitized partition services.

[0089] Unitized root service: There is only one unitized root service in each unitized subdomain. The database of the unitized root service includes a root table, which provides the dimension of unit partitioning. The dimension can be the primary key of the root table or other attribute fields. Other tables in the unitized root service include a special field to reference the primary key of the root table to achieve unitized splitting according to the same dimension. Each unitized root service includes a unitized root object and several unitized partition objects.

[0090] Unitized partition service: Each unitized subdomain includes several unitized partition services. All data tables of the partition service include a special field that references the primary key of the root table to achieve unitized splitting according to the same dimension. Each unitized partition service includes several unitized partition objects.

[0091] 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.

[0092] Unitized partition object: Each service (unitized root service, unitized partition service) has several unitized partition objects. The unitized partition object is 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, so that all services in the unitized subdomain can be unitized according to the same dimension.

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

[0094] 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.

[0095] Modeling module 202 is used to 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 (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 data through the same splitting dimension. The splitting dimension can be determined based on 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, unitized modeling tools such as modeling module 202 support modeling of business objects, applications, and unitized subdomains through visual drag and drop.

[0096] The code generation module 204 is used to call 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. The code generation module 204 is also used to output the code of the unitized root service and the code of the unitized partition service.

[0097] 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 introduced below in conjunction with an embodiment.

[0098] See also Figure 4The flowchart of an application management method shown in FIG. 1 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:

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

[0100] 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 an 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. The splitting dimension is described in detail below.

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

[0102] In some other possible implementations, the splitting dimension may be an attribute field other than the primary key of the unitized root object. Specifically, the unitized model may also include 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 may split data by the unitized partition key.

[0103] 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. The present 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.

[0104] 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. For specific implementation, see Figure 5 A flowchart of a unitized model creation process is shown, in which 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 drag and drop operation of the user. 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 drag and drop operation of the user after adding the unitized root service. It should be noted that the unitized root service may 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 a unitized partition object. The modeling module 202 can also add a unitized partition service in the unitized subdomain in response to the drag and drop operation of the user. Similar to the unitized root service, the modeling module 202 can add a unitized partition object in the unitized partition service in response to the drag and drop operation of the user after adding the unitized root service. The unitized partition service may include one or more unitized partition objects. When the unitized partition service includes multiple unitized partition objects, the modeling module 202 may repeatedly perform the operation of creating the unitized partition objects.

[0105] 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 service, including repeatedly adding the unitized partition service in the unitized subdomain and repeatedly adding the unitized partition object in the unitized partition service.

[0106] 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. Further, 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 operation of creating a unitized partition object by triggering the object creation control or inputting the object creation instruction. 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, and 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.

[0107] 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, and the modeling module 202 creates a unitized partition service in response to the trigger 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, and the user triggers the operation of creating a unitized partition object by triggering an object creation control or inputting an object creation instruction, and the modeling module 202 creates a unitized partition object in response to the trigger operation.

[0108] 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.

[0109] The code generation module 204 provides the ability to generate end-to-end code from a unitized model. For each service (such as a unitized root service and a unitized partition service) in the unitized model created in the design state, the code generation module 204 can generate end-to-end service code (such as the code of the unitized root service and the code of the unitized partition service) by calling the end-to-end code generation model.

[0110] Among them, the service code may include at least one of a database data definition language (DDL) file, an interface document, or a 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.

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

[0112] 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.

[0113] The code generation module 204 may also receive user feedback on the generated code, such as feedback on the code of the unitized root service or the code of the unitized partition service generated by the code generation model. The feedback includes the user's modification, acceptance or deletion of the generated code. The code generation module 204 may adaptively adjust the code generation model based on the user's feedback on the generated code, thereby improving the accuracy of the code generation model.

[0114] Furthermore, in the deployment state, the application management system 20 can uniformly deploy services within the unitized subdomain. Among them, the services within the unitized subdomain include 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 uniform expansion and reduction of application services based on the granularity of the unitized subdomain.

[0115] When performing deployment configuration, the application management system 20 may support different configuration modes. In some possible implementation modes, the application management system 20 may receive the target area configured by the user, wherein the target area may include one or more areas. In some other possible implementation modes, the application management system 20 may also receive service information of a service carried by at least one area configured by the user, wherein at least one area includes the target area.

[0116] This method does not require pre-defining the deployment architecture when developing modular applications. In other words, the business logic (or modular model) of the application and the deployment architecture are decoupled, so the deployment architecture or deployment plan can be flexibly defined in the deployment state. This method supports adjusting the deployment architecture to disaster recovery architectures such as dual-active in the same city, multi-active in different locations, and multi-center according to business needs.

[0117] 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 agreements, 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 service user) may include, but are not limited to, quality, availability, or responsibility. The most common component of SLA is the services provided to the customer under a contractual agreement. Specifically, the application management system 20 can receive service level agreements SLAs 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 called between multiple services.

[0118] For example, for services with high SLA requirements, the application management system 20 can recommend using a region with a short distance (e.g., the shortest distance or a distance less than a set distance) for deploying applications to achieve nearby access. For another example, for services with low SLA requirements, the application management system 20 can recommend a region with a low cost (which can be a remote region) for deploying applications to reduce deployment costs.

[0119] 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.

[0120] Specifically, the application management system 20 can receive a service request through a routing module, and obtain the value of the split dimension according to the service request. The value of the split 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. Then, the application management system 20 routes the service request to the service of the corresponding area according to the value of the split dimension.

[0121] 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.

[0122] When the split 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 according to the business request, for example, extracting the value of the primary key of the unitized root object from the request header or path parameter of the business request, and then obtaining the value of the unitized partition key 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 split dimension is the value of the unitized partition key.

[0123] Based on the above description, it can be seen that the application management method of the present 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 concepts 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 in the unitized subdomains shard the data according to the same splitting dimension. The services in a unitized subdomain are uniformly deployed, which reduces cross-data center calls, reduces access time, and reduces the frequency of cross-regional access, thereby improving the overall stability of the link.

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

[0125] Let’s take a trading scenario as an example.

[0126] In the design state, the modeler designs a trading unit subdomain. Figure 6As shown, the Trading unitized subdomain includes the following services (for example, microservices): Customer service, Ordering service, and Paying service. Among them, the Customer service is the unitized root service, and the Ordering service and Paying service are unitized partition services. The Customer service includes a unitized root object, namely the Account object. All services in the Trading unitized subdomain (such as Customer service, Ordering service, and Paying service) use the ID of the Account object as the basis for dividing units. 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 partition objects.

[0127] 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 directly run 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 sample of some database tables of microservice codes generated by the service code generation tool, for example Figure 7 As shown in the figure, 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 subdomains. The data table of the unitized partition objects ShoppingCart and Order objects has the field Account_id as a foreign key, which is used to associate with the Account object. The Account_id field is also used as the basis for dividing the two objects into units.

[0128] The API interfaces of some business objects of the microservices generated by the application management system 20 are as follows: Figure 8 As shown, for the unitized root object Account, the application management system 20 generates a basic add, delete, modify and query API, and the operation objects are all Account objects or the ID of the Account object (recorded as Account_id). The application management system 20 can determine the unit and route of the Account object based on the ID of the Account object (the Account object includes the ID). For the unitized partition objects ShoppingCart and Order, the application management system 20 generates an add, delete, modify and query API, and the API path includes the path parameter of Account_id, and the unit and route of the ShoppingCart and Order objects can be determined based on the value of Account_id.

[0129] In the deployment state, the services in the Trading unitized subdomain can be deployed uniformly. Users can decide whether to deploy the services in the unitized subdomain in a single region or multiple regions during deployment, and can also decide the service information of the services carried by each region during deployment, so as to flexibly define the deployment architecture.

[0130] In the running state, before accessing services in the unitized subdomain, you must 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 in the unitized subdomain are not aware of the unitization details.

[0131] Fig. 9 A schematic diagram of a multi-region deployment of a unitized application is provided, wherein 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 a unitized root service, which provides a unitized root object, namely, the Account object, and 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 the 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, specifically Customer service, Ordering service, and Paying service. Among them, the microservice instances in different regions can store the split data in their respective databases (database, 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.

[0132] Among them, region A and region B are respectively deployed with application gateways, and the application gateway includes a routing plug-in. 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, and 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 value of the primary key of the extracted unitized root object, for example, in a cookie. Correspondingly, when the application gateway receives the business request again, the value of the primary key of the unitized root object can be extracted from the cookie of 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.

[0133] 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.

[0134] 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.

[0135] Figures 6 to 9 The example of using the split dimension as the primary key of the unitized root object shows that, 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 the unitized partition key. Figures 6 to 9The example of the implementation example shows that 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, you only need 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 performing 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.

[0136] Based on the aforementioned application management method, the present application also provides an application management system 20. Figure 2 As shown, the application management system 20 is used to generate code for applications that support unitized deployment, and the application management system 20 includes:

[0137] A modeling module 202 is used to receive a unitized model created by a user for an application, wherein 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, wherein the unitized root service and the unitized partition service are services deployed in the same data center in the application, wherein the unitized partition object is added with a primary key of the unitized root object as an associated foreign key, and 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;

[0138] A code generation module 204, 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;

[0139] 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.

[0140] Exemplarily, the above-mentioned modeling module 202 and code generation module 204 may be implemented by hardware or by software. For ease of description, the modeling module is used as an example for explanation below.

[0141] When implemented by software, the modeling module 202 may be an application running on a computing device, such as a computing engine. The application may be provided in the form of a virtualization service. Virtualization services may include virtual machine (VM) services, bare metal server (BMS) services, and container services. Among them, the VM service may be a service that virtualizes a virtual machine resource pool on multiple physical hosts through virtualization technology 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 BMS 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, and its computing performance is no different from that of a traditional physical machine, and it 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.

[0142] When implemented by hardware, the modeling module 202 may include at least one computing device, such as a server, etc. Alternatively, the modeling module 202 may also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), etc. 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.

[0143] In some possible implementations, the unitized root service and the unitized partition service split data by a primary key of the unitized root object.

[0144] In some possible implementations, the unitized model further includes a unitized partition key, and the unitized partition key is an attribute field in the attribute field of the unitized root object except the primary key;

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

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

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

[0148] The system 20 further includes:

[0149] Recommended modules( Figure 2 ), for recommending an area for deploying the application based on the SLAs invoked between the multiple services.

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

[0151] Deployment Modules Figure 2 ), which is not shown in the figure, and is used to uniformly deploy the unitized root service and the unitized partition service associated with the unitized model to the target area.

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

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

[0154] 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.

[0155] In some possible implementations, the application management system is further used to deploy a routing module in each area of ​​the target area, and the system 20 further includes:

[0156] Interaction Module( Figure 2 (not shown) for receiving a service request through the routing module;

[0157] The routing module ( Figure 2 ), which is not shown in the figure, and is used to obtain the value of the splitting dimension according to the business request, wherein 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 the business request is routed to the service of the corresponding area according to the value of the splitting dimension.

[0158] 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;

[0159] The routing module is specifically used for:

[0160] 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.

[0161] In some possible implementations, the routing module is specifically used to:

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

[0163] 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.

[0164] 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.

[0165] The present application also provides a computing device 1000. Fig.10 As shown, computing device 1000 includes: bus 1002, processor 1004, memory 1006 and communication interface 1008. Processor 1004, memory 1006 and communication interface 1008 communicate through bus 1002. Computing device 1000 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in computing device 1000.

[0166] The bus 1002 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 The bus 1002 may include a path for transmitting information between various components of the computing device 1000 (eg, the memory 1006, the processor 1004, and the communication interface 1008).

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

[0168] The memory 1006 may include a volatile memory, such as a random access memory (RAM). The memory 1006 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a 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.

[0169] 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.

[0170] The embodiment of the present application also provides 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 smart phone.

[0171] like Fig.11 As shown, the computing device cluster includes at least one computing device 1000. The memory 1006 in 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.

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

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

[0174] Fig.12 A possible implementation is shown. Fig.12 As shown, two computing devices 1000A and 1000B are connected via a communication interface 1008. The memory in computing device 1000A stores instructions for executing the functions of modeling module 202. The memory in 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.

[0175] Fig.12 The connection mode between the computing device clusters shown may be based on the consideration that the application management method provided by the present application needs to decouple modeling and code generation. Therefore, it is considered that the functions implemented by the code generation module 204 are handed over to the computing device 1000B for execution.

[0176] It should be understood that Fig.12 The functions of the computing device 1000A shown in FIG. 1000A may also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000B may also be completed by multiple computing devices 1000.

[0177] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.13 A possible implementation is shown. Fig.13 As shown, 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. At the same time, the memory 1006 in the computing device 1000D stores instructions for executing the functions of the code generation module 204.

[0178] Fig.13 The connection method between the computing device clusters shown may be based on the consideration that the application management method provided in the present application needs to decouple modeling and code generation, and therefore it is considered that the functions implemented by the code generation module 204 are handed over to the computing device 1000D for execution.

[0179] It should be understood that Fig.13The functions of the computing device 1000C shown in FIG. 1000A 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.

[0180] 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 the computing device or a data storage device such as a data center containing 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 hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned application to the application management system 20 for executing the application management method.

[0181] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including 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 above code management method.

[0182] 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 cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the 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: A modeling module, configured to receive a unitized model created by a user for an application, wherein 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, wherein the unitized root service and the unitized partition service are services deployed in the same data center in the application, wherein the unitized partition object is added with a primary key of the unitized root object as an associated foreign key, and 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.