Application deployment method and device, computer equipment, readable storage medium and program product

By initializing multiple application instances in a low-code platform and dynamically allocating resources, combined with asynchronous communication of message queues, the problems of low resource utilization and complex operation and maintenance in traditional deployment methods are solved, and efficient resource management and maintenance efficiency are achieved.

CN119759370APending Publication Date: 2025-04-04SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411938734.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The application deployment of traditional low-code platforms relies on a single application instance, resulting in low resource utilization, complex operation and maintenance, and it is difficult to achieve efficient resource optimization and management.

Method used

By obtaining deployment information, initializing multiple application instances, and dynamically allocating application resources according to resource demand information, configuring a message queue for each application instance to achieve asynchronous communication.

Benefits of technology

It improves resource utilization, reduces coupling between applications, improves system flexibility and scalability, and thus improves system maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759370A_ABST
    Figure CN119759370A_ABST
Patent Text Reader

Abstract

The invention relates to an application deployment method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring deployment information; the deployment information comprises configuration information and resource demand information; initializing a plurality of application examples according to the configuration information, and allocating application resources for the application examples according to the resource demand information; and configuring a message queue for each application instance, so that each application instance performs asynchronous communication through the application resource. By adopting the method, the maintenance efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an application deployment method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] As the demand for software development grows day by day, the traditional development methods are complex in code writing and have a long development cycle, resulting in low development efficiency. Enterprises are facing tremendous pressure in development and maintenance. Therefore, low-code platforms have emerged. Low-code platforms use a visual method to develop applications to reduce the amount of code.

[0003] In related technologies, application deployment on low-code platforms usually relies on a single application instance. Each application runs independently, and resource allocation and management are static, resulting in low resource utilization and increased O&M complexity. Each application instance needs to be independently configured and managed, and it is usually impossible to dynamically adjust resources according to actual needs, making it difficult to achieve efficient resource optimization and management. Especially when dealing with a large number of applications and complex scenarios, a lot of manual intervention is often required, affecting the maintenance efficiency of the system. Summary of the invention

[0004] Based on this, it is necessary to provide an application deployment method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve maintenance efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides an application deployment method, comprising:

[0006] Obtaining deployment information; the deployment information includes configuration information and resource requirement information;

[0007] Initializing multiple application instances according to the configuration information, and allocating application resources to each of the application instances according to the resource demand information;

[0008] A message queue is configured for each of the application instances, so that each of the application instances can communicate asynchronously through the application resources.

[0009] In one embodiment, the deployment information includes message queue information; configuring a message queue for each application instance includes:

[0010] According to the message queue information, create the message queue corresponding to each application instance; the message queue is used to process asynchronous requests;

[0011] Each of the application instances is associated with the corresponding message queue.

[0012] In one embodiment, after allocating application resources to each application instance according to the resource demand information, the method further includes:

[0013] Monitoring the configuration information and the resource demand information through a preset application monitor;

[0014] When it is monitored that the resource demand information and the configuration information are modified, the adjustment resource information and the adjustment configuration information are generated, and the application instance is reconfigured according to the adjustment configuration information, and new application resources are allocated to the reconfigured application instance according to the adjustment resource information.

[0015] In one embodiment, the reconfiguring of the application instance according to the adjustment configuration information includes:

[0016] Verifying the validity of the adjustment resource information and the adjustment configuration information;

[0017] When the validity verification is passed, the adjustment configuration information is sent to each of the application instances by broadcasting; and each of the application instances performs configuration update according to the adjustment configuration information.

[0018] In one embodiment, after reconfiguring the application instance according to the adjustment configuration information, the method further includes:

[0019] Detecting whether the adjustment configuration information is effective according to a preset time interval;

[0020] In the case that the adjustment configuration information is not effective, the application instance is reconfigured according to the adjustment configuration information until the adjustment configuration information is effective.

[0021] In one embodiment, after generating multiple application instances according to the configuration information, the method further includes:

[0022] An application identifier is generated for each application instance, and the application identifier is returned to the front end; the application identifier is used to modify the configuration information and the resource requirement information.

[0023] In a second aspect, the present application also provides an application deployment device, including:

[0024] An acquisition module, used to acquire deployment information; the deployment information includes configuration information and resource requirement information;

[0025] An initialization module, used to initialize multiple application instances according to the configuration information, and allocate application resources to each of the application instances according to the resource demand information;

[0026] The configuration module is used to configure a message queue for each of the application instances so that each of the application instances can perform asynchronous communication through the application resources.

[0027] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0029] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the method in any one of the above embodiments when executed by a processor.

[0030] The above-mentioned application deployment method, apparatus, computer device, computer-readable storage medium and computer program product first obtain configuration information and resource demand information, then initialize multiple application instances according to the configuration information, and dynamically configure the required resources for each instance according to the resource demand information, so as to avoid resource waste and improve resource utilization. After that, a message queue is configured for each application instance, so that the application instances can interact through asynchronous communication, reduce the coupling between applications, improve the flexibility and scalability of the system, and thus improve the maintenance efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A schematic diagram of a flow chart of an application deployment method in an embodiment;

[0033] Figure 2 A flowchart of the steps of application deployment in one embodiment;

[0034] Figure 3 A schematic diagram of an application deployment environment in one embodiment;

[0035] Figure 4 A structural block diagram of an application deployment device in an embodiment;

[0036] Figure 5FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] In one embodiment, Figure 1 As shown, an application deployment method is provided. This embodiment uses the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0039] Step 102, obtaining deployment information; the deployment information includes configuration information and resource requirement information.

[0040] Deployment information refers to all the information that needs to be collected and parsed before the application is deployed to ensure that the application can run correctly in the target environment. The acquisition of deployment information usually relies on configuration files, databases, APIs, and dynamic requests from the management platform to ensure the accuracy and timeliness of the information.

[0041] Deployment information includes configuration information and resource requirement information. Configuration information refers to detailed parameters related to the operating environment, functions, dependencies, etc. of the application instance. Configuration information is used to ensure that the application has the correct environment configuration when it starts, including system-level configuration, network configuration, dependent services, port numbers, etc. For example, an application instance may need to rely on a specific version of a database or external API service, and the configuration information clarifies these requirements. Resource requirement information refers to the computing resources, storage requirements, network bandwidth, and other external resources required by the application instance during runtime. Resource requirement information is used to provide sufficient resource support for the application instance to ensure that the application can run normally and will not cause bottlenecks due to insufficient resources. For example, an instance may require a high memory configuration to process big data tasks, while another instance may require high network bandwidth for a large number of network interactions.

[0042] For example, in the scenario of a low-code platform, assume that the user is deploying a Customer Relationship Management System (CRM) application. Configuration information may include the service port number, database connection information, API interface configuration, user authentication method, etc. required by the application instance. For example, the application may need to access an external user data API and synchronize data with the database inside the platform, so the configuration information will specify the database connection parameters, API access rights and URL address, etc. Resource requirement information includes the resources required by the application instance at runtime, such as the number of CPU cores, memory capacity, storage space, and network bandwidth for each CRM module to process data. For example, the customer data module of the CRM system may require higher memory and processing power to process large amounts of user data, while the data synchronization module may require higher network bandwidth for frequent data exchanges with external APIs.

[0043] Step 104: Initialize multiple application instances according to the configuration information, and allocate application resources to each application instance according to the resource demand information.

[0044] Among them, an application instance refers to a separate entity created by the platform and running in a virtualized or containerized environment according to configuration requirements. Each application instance is an independent unit with independent functions and resources, which can be dynamically started and run according to configuration information and resource demand information. For example, in a low-code platform, each application instance may represent a specific module or function, which can work independently or in collaboration with other instances.

[0045] Optionally, the process package for initializing multiple application instances starts the required application instances according to the configuration information. Each instance is initialized according to the module definition, interface requirements, and external service links in the configuration information. For example, if an instance needs to communicate with an external database, the application instance will automatically configure the database connection and authentication information during the initialization process to ensure that the relevant data can be accessed normally.

[0046] Optionally, the specific process of allocating application resources to application instances based on resource demand information includes dynamically allocating computing resources, memory, storage, and network bandwidth based on the resource demand of each application instance. For example, a certain instance may require more memory and storage to process data analysis tasks, while another instance may only require smaller computing resources. The system automatically allocates resources based on these demands to avoid resource waste and ensure efficient operation of each application instance.

[0047] Step 106: configure a message queue for each application instance so that each application instance can communicate asynchronously through application resources.

[0048] Among them, message queue refers to a communication mechanism that allows application instances to exchange data through message passing, usually in an asynchronous manner. Through message queues, application instances can asynchronously transmit data in different threads or processes, avoiding direct synchronous calls, reducing system load, and improving system responsiveness and scalability.

[0049] Optionally, configuring a message queue for an application instance includes creating or configuring a message queue service, such as Kafka, RabbitMQ, etc., to ensure that each application instance can communicate with other instances or external services. The system allocates one or more message queues to each application instance and configures them based on the communication needs of the instance. For example, some instances may need to handle high-frequency messaging, while others may need to handle low-frequency batch data.

[0050] For example, the process of how application instances communicate asynchronously is as follows: when an application instance needs to send data to another instance, it packages the data into a message and sends it to the message queue. The receiving application instance then obtains the data from the message queue and processes it. Due to asynchronous communication, the sender does not need to wait for the receiver's response, which can process a large number of requests in a short time and ensure high throughput of the system. In this way, the platform can achieve loosely coupled asynchronous interaction between multiple application instances, improving the overall efficiency and scalability of the system.

[0051] In the above application deployment method, first, configuration information and resource requirement information are obtained, then multiple application instances are initialized according to the configuration information, and the required resources are dynamically configured for each instance according to the resource requirement information, so that resource waste can be avoided and resource utilization can be improved. After that, a message queue is configured for each application instance, so that application instances can interact through asynchronous communication, reducing the coupling between applications, improving the flexibility and scalability of the system, and thus improving the maintenance efficiency of the system.

[0052] Further, in one embodiment, the above deployment information includes message queue information; configuring a message queue for each application instance includes: creating a message queue corresponding to each application instance according to the message queue information; the message queue is used to process asynchronous requests; and associating each application instance with the corresponding message queue.

[0053] The message queue information refers to the configuration related to each application instance to ensure that they can communicate through the asynchronous message queue. The queue information includes the queue type, queue name, message transmission protocol, queue storage strategy, access control rules, etc.

[0054] Optionally, based on the message queue information, the system will create a corresponding message queue for each application instance. The specific process includes creating a message queue through an API interface using message queue technology, such as RabbitMQ, Kafka, or ActiveMQ, based on the queue definition in the configuration file or database. The creation process generally reads the message queue information first, including the name of the queue, message storage strategy, etc., and then uses the interface call of the message queue technology to create the queue. For example, when using RabbitMQ, the system declares the queue by calling the channel.queueDeclare method, specifying the queue name, persistence properties, and other related parameters. If the queue already exists, skip the creation process and use the existing queue directly; if it does not exist, create a new queue.

[0055] Optionally, after creating the message queue, the system will associate each application instance with its corresponding message queue. First, the system assigns a unique identifier to each application instance, and then binds each instance to the corresponding message queue by reading the configuration file of the message queue or using the API interface. Furthermore, the technical implementation of the association process depends on the connection management component of the message queue. For example, in RabbitMQ, instances and queues are bound through Channel.basicConsume and Channel.basicPublish to ensure that each instance can send and receive messages through the corresponding queue. Among them, Channel.basicConsume is used for operations that receive messages and Channel.basicPublish is used for operations that send messages.

[0056] In this way, the configuration and creation of message queues enable each application instance to process tasks independently and flexibly. The message queue provides an efficient asynchronous communication mechanism by decoupling the dependencies between different application instances.

[0057] Furthermore, in one embodiment, after allocating application resources to each application instance according to the resource demand information, the method further includes: monitoring the configuration information and resource demand information through a pre-set application listener; when it is detected that the resource demand information and the configuration information are modified, generating adjustment resource information and adjustment configuration information, and reconfiguring the application instance according to the adjustment configuration information, and allocating new application resources to the reconfigured application instance according to the adjustment resource information.

[0058] Adjusting resource information means that the resource configuration of the application instance has changed, including the difference between the original configuration and the current configuration. For example, if the originally allocated memory is 2GB and the adjusted resource requirement is 4GB, then the adjusted resource information is the change in memory resource requirement, that is, the 2GB difference. Adjusting configuration information means that the configuration parameters of the application instance have changed, such as the version number of the application, execution parameters, or the path of the configuration file have been modified. Adjusting configuration information reflects the system's adjustment or optimization of the configuration content.

[0059] An application listener is a monitoring tool or mechanism that is designed to track and respond to changes in resource requirements or configurations in the system in real time. The listener is usually pre-set by registering callback functions, event monitoring, or polling, and continuously monitors changes in resource or configuration information. Once changes in resource requirement information or configuration information are detected, the listener triggers corresponding operations, such as generating and adjusting resource information, adjusting configuration information, and performing subsequent processing. The listener can be set up through a configuration file, such as loading a configuration file at system startup, or adjusting the configuration through a background management tool.

[0060] Exemplarily, the application listener can monitor the resource demand or configuration information status by periodically polling, or by a system event trigger mechanism. For example, in the resource monitoring module, when the CPU usage or memory usage exceeds a preset threshold, the listener will automatically trigger, generate adjustment resource information and reallocate.

[0061] Furthermore, in order to improve the real-time performance and efficiency of monitoring, a scheduled task may be set to periodically check the status of resource requirements and configuration information, and perform monitoring operations through a scheduling mechanism.

[0062] Optionally, you can use the PowerJob framework to register `appName` for the application group and create a scheduled task. PowerJob is an efficient and scalable distributed task scheduling framework that can easily create scheduled tasks for application instances or application groups and perform task scheduling. With PowerJob, you can create scheduled tasks to regularly check whether the resource requirements and configuration information of the application instance have changed, and trigger related monitoring operations when necessary.

[0063] For example, in the PowerJob framework, a unique identifier (such as appName) can be registered for an application instance group. This identifier is used to distinguish different application groups or instances and create corresponding task schedules for each application instance. PowerJob can be used to create scheduled tasks for application groups or application instances. For example, a scheduled task can be set to check changes in resource requirements and configuration information at regular intervals. If changes are detected, a monitoring operation is triggered to reconfigure the application instance or update resource requirements.

[0064] Among them, it is possible to judge whether the resource demand information or configuration information has been modified by comparing the difference between the historical configuration and the current configuration. For example, the current resource configuration can be compared with the configuration before the modification. If a difference is found, it can be determined that the information has been modified. The process of determining the modification usually relies on a configuration management tool or a version control system, or triggers the modification judgment by monitoring the real-time changes of the data source.

[0065] Afterwards, the application instance is reconfigured according to the adjusted configuration information, and new application resources are allocated to the reconfigured application instance according to the adjusted resource information.

[0066] Among them, reconfiguring the application instance according to the adjustment configuration information includes: verifying the validity of the adjustment resource information and the adjustment configuration information; sending the adjustment configuration information to each application instance by broadcasting when the validity verification passes; and updating the configuration of each application instance according to the adjustment configuration information.

[0067] Validation refers to ensuring that the adjusted resource configuration and configuration information meet the actual needs of the system and do not cause inconsistencies or conflicts. For example, the system needs to verify whether the new resource requirements can meet the conditions of the existing hardware environment, or whether the new configuration information meets the expected behavior of the application instance.

[0068] Optionally, the validity verification process can be performed by an automated verification tool, which will check the compatibility of the new resource configuration with the current environment, such as checking whether the allocation of memory, CPU, and storage is within a reasonable range, and confirming whether the format, type, and content of the configuration information meet the specifications. After the verification is passed, the system will continue with the subsequent configuration update, otherwise an error log will be generated and the update process will be stopped.

[0069] Furthermore, when the validity verification of the adjustment resource information and configuration information is passed, the system will send the adjustment configuration information to each application instance by broadcasting. The broadcast method can ensure that all relevant application instances receive the configuration information update at the same time, avoiding the delay and synchronization problems caused by pushing one by one. After receiving the adjustment configuration information, each application instance will automatically update according to the new configuration, which may include reloading the configuration file, adjusting resource allocation, restarting the application service, etc. Transmitting configuration information by broadcasting can ensure that each application instance in the system is updated synchronously at the same time point, ensuring the consistency and stability of the system.

[0070] In one embodiment, after the application instance is reconfigured according to the adjustment configuration information, the method further includes: detecting whether the adjustment configuration information is effective according to a preset time interval; if the adjustment configuration information is not effective, reconfiguring the application instance according to the adjustment configuration information until the adjustment configuration information is effective.

[0071] The system monitors the status of the application instance through periodic checks to confirm whether the adjusted configuration information has been successfully applied. If the configuration of the application instance does not change as expected within the set time, the system will determine that the adjusted configuration information has not yet taken effect. In order to ensure the correctness of the system configuration, the system will reconfigure the application instance according to the adjusted configuration information. This process will continue until the adjusted configuration information is fully effective.

[0072] Exemplarily, the system compares the configurations of each application instance at preset time intervals. Once it detects that the adjusted configuration information is not effective, the system automatically initiates a reconfiguration operation, applies the adjusted configuration information to the application instance again, and continues to detect whether the adjusted configuration information is effective.

[0073] This ensures that configuration updates in the system will not fail to take effect in a timely manner due to occasional errors or network problems.

[0074] In one embodiment, after generating multiple application instances according to the configuration information, the method further includes: generating an application identifier for each application instance, and returning the application identifier to the front end; the application identifier is used to modify the configuration information and resource requirement information.

[0075] The application identifier is a unique identifier used to uniquely identify each application instance. The identifier can be a unique string automatically generated by the system, or generated by certain attributes in the configuration information, such as the application name and version number. After the system generates application identifiers for each application instance, it associates these identifiers with the corresponding application instance and returns them to the user through the front-end interface. In this way, the user can view the identifiers of each application instance through the front-end interface and configure and manage the corresponding application instance based on the identifiers.

[0076] For example, the appId of each application instance can be accurately obtained by implementing the getAppId method in the ApaasSingleAppProperties class. This method returns a unique application identifier when the application instance is initialized. This identifier is not repeatable in the system and can ensure accurate tracking and operation of each application instance. In asynchronous logic, the getAppId method can be used to asynchronously obtain and process the appId. For example, when the application instance is configuring resources or modifying configuration information, the method can be asynchronously called to accurately identify which application instance is currently being operated. In this way, the accuracy and consistency of the appId can be ensured regardless of synchronous or asynchronous operation.

[0077] For example, users can select and configure the deployment information corresponding to each application instance through the application identifier in the front end. Users can modify the configuration information or resource requirement information of each application instance according to the application identifier of each application instance, such as adjusting the memory, CPU or storage capacity. In this way, the system can accurately identify each application instance and allow users to flexibly manage and modify the configuration and resource allocation of different application instances, thereby achieving more efficient resource management and deployment optimization.

[0078] In an exemplary embodiment, in combination Figure 2 , Figure 2 A flowchart of the steps of application deployment in one embodiment.

[0079] Step S202: Obtain deployment information, wherein the deployment information includes configuration information and resource requirement information.

[0080] Step S204, initialize multiple application instances according to the configuration information, and allocate application resources to each application instance according to the resource demand information. After initializing each application instance, it also includes generating an application identifier for each application instance and returning the application identifier to the front end; the application identifier is used to modify the configuration information and resource demand information.

[0081] Step S206, configure a message queue for each application instance so that each application instance can communicate asynchronously through application resources. The deployment information includes message queue information; configuring a message queue for each application instance includes: creating a message queue corresponding to each application instance according to the message queue information; the message queue is used to process asynchronous requests; and associating each application instance with the corresponding message queue.

[0082] Step S208, monitor the configuration information and resource demand information through a pre-set application monitor; when it is monitored that the resource demand information and configuration information are modified, generate adjustment resource information and adjustment configuration information, reconfigure the application instance according to the adjustment configuration information, and allocate new application resources to the reconfigured application instance according to the adjustment resource information. Reconfiguring the application instance according to the adjustment configuration information includes: validating the adjustment resource information and the adjustment configuration information; in the case of passing the validity verification, sending the adjustment configuration information to each application instance by broadcasting; each application instance updates the configuration according to the adjustment configuration information.

[0083] Step S210, detecting whether the adjusted configuration information is effective according to a preset time interval; if the adjusted configuration information is not effective, reconfiguring the application instance according to the adjusted configuration information until the adjusted configuration information is effective.

[0084] In yet another exemplary embodiment, in combination Figure 3 As shown, Figure 3 The diagram is a containerized deployment diagram of an aPaaS platform and a Kubernetes (K8S) cluster in one embodiment.

[0085] Among them, the aPaaS operation and maintenance management platform includes multiple container components, including Container aPaaS components, Container RabbitMQ components, Container Redis components, Container MySQL components, Container MongoDB components and Container PowerJob components. Container aPaaS components are used to manage and coordinate containerized applications, Container RabbitMQ is responsible for message queue functions and supports asynchronous communication, Container MySQL is used for persistent data storage, Container MongoDB is used for unstructured data storage, and Container PowerJob is a task scheduling component used for the management and execution of scheduled tasks or distributed tasks. Among them, the K8S cluster is the core of container orchestration and scheduling and is responsible for service deployment. The Jenkins service is responsible for the pipeline management of the application release process. Jenkins deploys applications from the development stage to the application operating environment in the K8S cluster through the CI / CD (continuous integration and continuous deployment) pipeline.

[0086] In this embodiment, each container can identify an application instance, and each application instance performs resource configuration and management through the core functions of Kubernetes.

[0087] exist Figure 3 The process of application deployment in aPaaS includes: 1. The user submits an application deployment request through the aPaaS operation and maintenance management platform. The deployment request carries deployment information. The platform generates multiple application instances based on the configuration information and resource demand information submitted by the user, and assigns a corresponding identifier to each instance; 2. The platform dynamically allocates computing resources and related configurations to application instances through interaction with the K8S cluster; 3. RabbitMQ provides asynchronous communication capabilities between application instances to ensure loose coupling between services; 4. The Jenkins service packages and pushes the application to the K8S cluster according to the configured pipeline process. K8S is responsible for deploying the application to the target environment; 5. After the deployment is completed, the application instance is exposed to the outside through the services provided by K8S. Redis and MongoDB provide data support, and the K8S cluster monitors the running status of the application. If there is a need for resource or configuration adjustment, PowerJob can reschedule the task and the Redis cache can be refreshed dynamically.

[0088] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0089] Based on the same inventive concept, the embodiment of the present application also provides an application deployment device for implementing the above-mentioned application deployment method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more application deployment device embodiments provided below can refer to the limitations on the application deployment method above, and will not be repeated here.

[0090] In an exemplary embodiment, Figure 4 As shown, an application deployment device is provided, including: an acquisition module 410, an initialization module 420 and a configuration module 430, wherein:

[0091] The acquisition module 410 is used to acquire deployment information; the deployment information includes configuration information and resource requirement information.

[0092] The initialization module 420 is used to initialize multiple application instances according to the configuration information and allocate application resources to each application instance according to the resource demand information.

[0093] The configuration module 430 is used to configure a message queue for each application instance so that each application instance can perform asynchronous communication through application resources.

[0094] In one embodiment, the configuration module 330 further includes:

[0095] A queue unit is created to create a message queue corresponding to each application instance according to the message queue information; the message queue is used to process asynchronous requests.

[0096] The association unit is used to associate each application instance with a corresponding message queue.

[0097] In one embodiment, the above device further comprises:

[0098] The monitoring module is used to monitor the configuration information and resource demand information through a preset application monitor.

[0099] The reconfiguration module is used to generate adjustment resource information and adjustment configuration information when it monitors that resource demand information and configuration information are modified, reconfigure the application instance according to the adjustment configuration information, and allocate new application resources to the reconfigured application instance according to the adjustment resource information.

[0100] In one embodiment, the reconfiguration module further includes:

[0101] The verification unit is used to detect whether the adjusted configuration information is effective according to a preset time interval.

[0102] The reconfiguration unit is used to reconfigure the application instance according to the adjusted configuration information when the adjusted configuration information is not effective, until the adjusted configuration information takes effect.

[0103] In one embodiment, the above device further comprises:

[0104] The identification generation module is used to generate an application identification for each application instance and return the application identification to the front end; the application identification is used to modify configuration information and resource requirement information.

[0105] Each module in the above application deployment device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0106] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store log data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an application deployment method is implemented.

[0107] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0108] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining deployment information; the deployment information includes configuration information and resource requirement information; initializing multiple application instances according to the configuration information, and allocating application resources to each application instance according to the resource requirement information; configuring a message queue for each application instance so that each application instance can communicate asynchronously through the application resources.

[0109] In one embodiment, when the processor executes the computer program, the following steps are also implemented: creating a message queue corresponding to each application instance according to the message queue information; the message queue is used to process asynchronous requests; and each application instance is associated with the corresponding message queue.

[0110] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the configuration information and resource requirement information are monitored by a pre-set application listener; when it is monitored that the resource requirement information and the configuration information are modified, the adjustment resource information and the adjustment configuration information are generated, and the application instance is reconfigured according to the adjustment configuration information, and new application resources are allocated to the reconfigured application instance according to the adjustment resource information.

[0111] In one embodiment, when the processor executes the computer program, the following steps are also implemented: verifying the validity of the adjustment resource information and the adjustment configuration information; if the validity verification passes, sending the adjustment configuration information to each application instance by broadcasting; and each application instance updates the configuration according to the adjustment configuration information.

[0112] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to a preset time interval, detecting whether the adjustment configuration information is effective; if the adjustment configuration information is not effective, reconfiguring the application instance according to the adjustment configuration information until the adjustment configuration information is effective.

[0113] In one embodiment, when the processor executes the computer program, the following steps are also implemented: an application identifier is generated for each application instance, and the application identifier is returned to the front end; the application identifier is used to modify the configuration information and the resource requirement information.

[0114] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining deployment information; the deployment information includes configuration information and resource requirement information; initializing multiple application instances according to the configuration information, and allocating application resources to each application instance according to the resource requirement information; configuring a message queue for each application instance so that each application instance can communicate asynchronously through the application resources.

[0115] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating a message queue corresponding to each application instance according to the message queue information; the message queue is used to process asynchronous requests; and each application instance is associated with the corresponding message queue.

[0116] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: configuration information and resource requirement information are monitored by a pre-set application listener; when it is monitored that the resource requirement information and configuration information are modified, adjustment resource information and adjustment configuration information are generated, and the application instance is reconfigured according to the adjustment configuration information, and new application resources are allocated to the reconfigured application instance according to the adjustment resource information.

[0117] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: verifying the validity of the adjustment resource information and the adjustment configuration information; if the validity verification passes, sending the adjustment configuration information to each application instance by broadcasting; and each application instance updates the configuration according to the adjustment configuration information.

[0118] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to a preset time interval, detecting whether the adjustment configuration information is effective; if the adjustment configuration information is not effective, reconfiguring the application instance according to the adjustment configuration information until the adjustment configuration information is effective.

[0119] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: an application identifier is generated for each application instance, and the application identifier is returned to the front end; the application identifier is used to modify the configuration information and the resource requirement information.

[0120] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: obtaining deployment information; the deployment information includes configuration information and resource requirement information; initializing multiple application instances according to the configuration information, and allocating application resources to each application instance according to the resource requirement information; configuring a message queue for each application instance so that each application instance communicates asynchronously through the application resources.

[0121] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating a message queue corresponding to each application instance according to the message queue information; the message queue is used to process asynchronous requests; and each application instance is associated with the corresponding message queue.

[0122] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: configuration information and resource requirement information are monitored by a pre-set application listener; when it is monitored that the resource requirement information and configuration information are modified, adjustment resource information and adjustment configuration information are generated, and the application instance is reconfigured according to the adjustment configuration information, and new application resources are allocated to the reconfigured application instance according to the adjustment resource information.

[0123] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: verifying the validity of the adjustment resource information and the adjustment configuration information; if the validity verification passes, sending the adjustment configuration information to each application instance by broadcasting; and each application instance updates the configuration according to the adjustment configuration information.

[0124] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to a preset time interval, detecting whether the adjustment configuration information is effective; if the adjustment configuration information is not effective, reconfiguring the application instance according to the adjustment configuration information until the adjustment configuration information is effective.

[0125] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: an application identifier is generated for each application instance, and the application identifier is returned to the front end; the application identifier is used to modify the configuration information and the resource requirement information.

[0126] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0128] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An application deployment method, characterized in that: The method comprises: Obtaining deployment information; the deployment information includes configuration information and resource requirement information; Initializing multiple application instances according to the configuration information, and allocating application resources to each of the application instances according to the resource demand information; A message queue is configured for each of the application instances, so that each of the application instances can communicate asynchronously through the application resources.

2. The method according to claim 1, characterized in that The deployment information includes message queue information; the configuring of the message queue for each application instance includes: According to the message queue information, create the message queue corresponding to each application instance; the message queue is used to process asynchronous requests; Each of the application instances is associated with the corresponding message queue.

3. The method according to claim 1, characterized in that: After allocating application resources to each of the application instances according to the resource demand information, the method further includes: Monitoring the configuration information and the resource demand information through a preset application monitor; When it is monitored that the resource demand information and the configuration information are modified, the adjustment resource information and the adjustment configuration information are generated, and the application instance is reconfigured according to the adjustment configuration information, and new application resources are allocated to the reconfigured application instance according to the adjustment resource information.

4. The method according to claim 3, characterized in that: The reconfiguring the application instance according to the adjustment configuration information includes: Verifying the validity of the adjustment resource information and the adjustment configuration information; When the validity verification is passed, the adjustment configuration information is sent to each of the application instances by broadcasting; and each of the application instances performs configuration update according to the adjustment configuration information.

5. The method according to claim 3, characterized in that: After reconfiguring the application instance according to the adjustment configuration information, the method further includes: Detecting whether the adjustment configuration information is effective according to a preset time interval; In the case that the adjustment configuration information is not effective, the application instance is reconfigured according to the adjustment configuration information until the adjustment configuration information is effective.

6. The method according to claim 1, characterized in that Initializing multiple application instances according to the configuration information further includes: An application identifier is generated for each application instance, and the application identifier is returned to the front end; the application identifier is used to modify the configuration information and the resource requirement information.

7. An application deployment device, characterized in that: The device comprises: An acquisition module, used to acquire deployment information; the deployment information includes configuration information and resource requirement information; An initialization module, used to initialize multiple application instances according to the configuration information, and allocate application resources to each of the application instances according to the resource demand information; The configuration module is used to configure a message queue for each of the application instances so that each of the application instances can perform asynchronous communication through the application resources.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Application deployment method and device, storage medium and electronic equipment

    CN120335827A