Automatic publishing method of application, scheduling server and low-code platform

Through the automated application publishing method, container technology is used to simplify the deployment process of Java Web applications, solving the problems of the traditional publishing process being cumbersome and relying on manual labor, and achieving fast and reliable application publishing and operation.

CN117785266BActive Publication Date: 2024-09-20WUXI XUELANG DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311814245.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2024-09-20
Estimated Expiration
2043-12-26

AI Technical Summary

Technical Problem

The release process of existing Java web applications is cumbersome, relies on manual configuration, takes a long time and is difficult to expand, and has compatibility issues in different environments.

Method used

Provides an automatic publishing method for applications. By obtaining the publishing file generated by the publishing server, creating a container based on the configuration file and starting the middleware, it realizes the automatic deployment and operation of the application. It combines the container technology to encapsulate complex steps, and the user only needs to click Can be published and run.

Benefits of technology

It simplifies the application release process, reduces dependence on manual configuration, improves deployment efficiency, and achieves application reliability and consistency in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117785266B
    Figure CN117785266B
Patent Text Reader

Abstract

The present invention relates to the technical field of application publishing, and specifically discloses an automatic publishing method for an application, a scheduling server, and a low-code platform, including: obtaining a publishing file generated by a publishing server, wherein the publishing server can generate a publishing file according to a user's publishing request, and the publishing file at least includes a sql file, a source data file, and a configuration file; creating a container according to the configuration file, and starting all corresponding middleware in the container according to the publishing file; when it is determined that all middlewares have been successfully started, executing the publishing file to complete the startup of the application. The automatic publishing method for an application provided by the present invention can realize the automatic publishing of an application, solving the problem that the current application publishing process is too dependent on manual work and has cumbersome configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of application publishing technology, and in particular to an automatic publishing method for an application, a scheduling server, and a low-code platform. Background Art

[0002] At present, the release process of Java Web applications in the prior art mainly includes: (1) Compilation and packaging. First, compile the source code of the Java Web application into an executable Java bytecode file, and place the relevant static resources (such as HTML, CSS, and JavaScript files) in the appropriate directory. Then, use a build tool (such as Apache Maven or Gradle) to package the application into a WAR (Web Application Archive) file. (2) Select a Web server. Select a suitable Web server to host the Java Web application. Common choices include Apache Tomcat, Jetty, and WildFly. According to your needs and preferences, select a suitable Web server and install and configure it. (3) Configure the Web server. According to the selected Web server, perform corresponding configuration, usually including specifying the context path, port number, log configuration, etc. of the application. (4) Deploy the application. Deploy the packaged WAR file to the Web server. This is achieved by copying the WAR file to a specific directory of the Web server (such as Tomcat's webapps directory). Once the WAR file is placed in the correct location, the Web server will automatically decompress and deploy the application. (5) Configure the front-end static files. If your Java web application contains front-end static files (such as HTML, CSS, JavaScript files), you can place these files in a specific directory on the web server so that they can be accessed through a browser. The specific directory location depends on the web server and configuration used. For example, in Tomcat, you can place static files in the root directory of the application or in the webapps / your-app-name directory.

[0003] According to the release process of Java Web applications in the above-mentioned prior art, it can be seen that it has the following defects: (1) Complicated configuration and deployment process: Traditional project deployment usually requires manual configuration and settings, including selecting and configuring appropriate Web servers, databases, network settings, etc. These processes may be relatively complex, require familiarity with relevant technologies and tools, and are prone to configuration errors and conflicts. (2) Requirement of professional knowledge: Traditional project deployment usually requires developers to have certain system management and operation and maintenance knowledge, including server configuration, network settings, database management, etc. This may be an unfamiliar field for pure developers, increasing the cost of learning and maintenance. (3) Long deployment time: Traditional project deployment usually takes a long time, especially in large-scale projects or complex environments. This includes steps such as compiling code, packaging, uploading, configuring and starting the server, which may take considerable time and resources. (4) Difficult to expand and upgrade: Traditional project deployment methods may bring certain challenges to the expansion and upgrade of the system. When it is necessary to add servers, adjust configurations or upgrade dependent components, a series of manual operations may be required, which are prone to errors and inconsistencies. (5) Dependence on a specific environment: Traditional project deployment usually depends on a specific hardware and software environment, including operating systems, web servers, databases, etc. This may lead to compatibility issues when deploying and running projects in different environments, requiring additional configuration and adjustments.

[0004] Therefore, how to solve the problem that the current application publishing process is too dependent on manual work and has cumbersome configuration has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] The present invention provides an automatic publishing method for applications, a scheduling server and a low-code platform to solve the problem in the related art that the current publishing process of applications is too dependent on manual labor and has cumbersome configuration.

[0006] As a first aspect of the present invention, a method for automatically publishing an application is provided, comprising:

[0007] Obtaining a publishing file generated by a publishing server, wherein the publishing server can generate a publishing file according to a publishing request of a user, and the publishing file at least includes a sql file, a source data file, and a configuration file;

[0008] Creating a container according to the configuration file, and starting all corresponding middleware in the container according to the release file;

[0009] When it is determined that all middlewares are started successfully, the release file is executed to complete the startup of the application.

[0010] Further, creating a container according to the configuration file, and starting all corresponding middleware in the container according to the release file, including:

[0011] Generate a container creation command according to the configuration file;

[0012] Execute the container creation command to obtain a container;

[0013] Determine whether the published file is published for the first time;

[0014] If the release file is released for the first time, all corresponding middleware in the container are started;

[0015] If the release file is not released for the first time, the middleware is started according to the status of all the current middleware in the container.

[0016] Furthermore, starting the middleware according to the current status of all the middleware in the container includes:

[0017] Determine whether the status of all current middleware in the container is available;

[0018] If the status of all the middlewares in the container are available, start all the corresponding middlewares in the container;

[0019] If the status of any middleware in the container is currently unavailable, the middleware corresponding to the container with the unavailable status is restarted.

[0020] Further, when it is determined that all middlewares are started successfully, the release file is executed to complete the startup of the application, including:

[0021] When it is determined that all middlewares are started successfully, the status information of all middlewares is reported to the publishing server;

[0022] Execute the sql file and obtain the sql execution result;

[0023] Whether the startup of the application is completed is determined according to whether the SQL execution result is successful.

[0024] Further, determining whether the application is started is completed according to whether the SQL execution result is successful, including:

[0025] Determine whether the SQL execution result is successful according to the configuration file;

[0026] If it is determined that the sql execution result is successful, then checking the application status of the application corresponding to the published file;

[0027] If the application state of the application corresponding to the release file is stopped, start the application according to the relevant connection information corresponding to all middleware in the configuration file;

[0028] If the application state of the application corresponding to the release file is running, the application is restarted according to the relevant connection information corresponding to all the middleware in the configuration file.

[0029] Furthermore, it also includes:

[0030] Determine whether the startup result of the application corresponding to the release file is successful;

[0031] If the startup result of the application corresponding to the release file is successful, the startup of the application is completed;

[0032] If the startup result of the application corresponding to the published file fails, an error message is returned to the publishing server and the SQL execution result is deleted.

[0033] Furthermore, if it is determined that the sql execution result fails, an error message is returned to the publishing server, and the sql execution result is deleted.

[0034] As another aspect of the present invention, a scheduling server is provided for implementing the automatic publishing method of the application described above, wherein the scheduling server comprises:

[0035] An acquisition module is used to acquire a publishing file generated by a publishing server, wherein the publishing server can generate a publishing file according to a publishing request of a user, and the publishing file at least includes a SQL file, a source data file, and a configuration file;

[0036] A creation module, used to create a container according to the configuration file, and start all corresponding middleware in the container according to the release file;

[0037] The execution module is used to execute the release file to complete the startup of the application program after determining that all middlewares are successfully started.

[0038] As another aspect of the present invention, a low-code platform is provided, which includes a publishing server and the scheduling server mentioned above, wherein the publishing server and the scheduling server are communicatively connected,

[0039] The publishing server is used to receive a publishing request from a user and generate a publishing file according to the publishing request from the user, wherein the publishing file at least includes a sql file, a source data file and a configuration file;

[0040] The scheduling server is used to create a container according to the publishing file and complete the startup of the application in the container.

[0041] Furthermore, the publishing server is used to receive a publishing request from a user and generate a publishing file according to the publishing request from the user, including:

[0042] Receive a user's publishing request;

[0043] Generate a publishing result according to the publishing request of the user, wherein the publishing result at least includes a publishing version, a publishing environment and identification information of the application;

[0044] Verifying the publishing result, and generating a publishing file when the publishing result passes the verification;

[0045] The publishing file is sent to the scheduling server based on the Restful API to complete the application startup.

[0046] The automatic publishing method of the application provided by the present invention obtains the publishing file generated by the publishing server, and creates a container based on the configuration file in the publishing file, so as to start the middleware corresponding to the publishing file in the container, so as to complete the application startup process in the container. This automatic publishing method of the application combines the container technology to realize the construction of the operating environment of the application, and at the same time encapsulates the complex steps of the traditional application publishing into a black box. The user only needs to click on the page to complete the steps of publishing, running, accessing, etc. of the application, and the automatic publishing of the application can be realized. In addition, the automatic publishing method of the application can forward and report data, so that there is no direct data interaction between the development tool and the actual running application, and the decoupling between the development tool and the application is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation of the present invention.

[0048] Figure 1 The present invention is a flowchart of the method for automatically publishing an application program.

[0049] Figure 2 A flowchart of starting the middleware provided by the present invention.

[0050] Figure 3 A flowchart of executing a release file provided by the present invention to complete application startup.

[0051] Figure 4 This is a structural block diagram of the scheduling server provided by the present invention.

[0052] Figure 5 A structural block diagram of the low-code platform provided by the present invention.

[0053] Figure 6 A schematic diagram of application release and iteration provided by the present invention. DETAILED DESCRIPTION

[0054] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0055] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.

[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0057] In this embodiment, a method for automatically publishing an application is provided. Figure 1 is a flow chart of a method for automatically publishing an application program according to an embodiment of the present invention. Figure 1 As shown, including:

[0058] S100, obtaining a publishing file generated by a publishing server, wherein the publishing server can generate a publishing file according to a publishing request of a user, and the publishing file at least includes a SQL file, a source data file, and a configuration file;

[0059] In an embodiment of the present invention, the publishing server receives a publishing request from a user, and the publishing request may include some basic configuration information of the user, such as the publishing version and publishing environment set or selected by the user. The publishing server can generate a publishing result according to the publishing request of the user, and the publishing result may include the publishing version of the application, the publishing environment, and some identification information based on the publishing operation. When generating the publishing result, the publishing server first confirms the publishing environment, and then confirms the publishing version, and generates the publishing result based on these confirmation information.

[0060] After generating the publishing result, the publishing server needs to verify the publishing result. Only the publishing result that passes the verification can generate the publishing file. If the publishing result verification fails, an error message will be returned.

[0061] After the above release file is generated, it is sent to the scheduling server based on the Restful API to complete the application startup.

[0062] In an embodiment of the present invention, the release file includes at least a sql file, a source data file and a configuration file. It should be noted here that the configuration file can be generated based on some basic configuration information in the release request, such as the release environment, release version, version name, custom image repository, and custom image tag. In addition, the configuration file also includes middleware information such as data source, cache, file storage service, etc., and the source data file in the release file needs to be written into the data source.

[0063] S200, creating a container according to the configuration file, and starting all corresponding middleware in the container according to the release file;

[0064] In the embodiment of the present invention, a container is created according to the configuration file obtained above, and subsequent startup of the application program is implemented in the created container.

[0065] Specifically, the container described here may be Kubernetes or Docker.

[0066] S300: When it is determined that all middlewares are started successfully, execute the release file to complete the startup of the application.

[0067] After starting all the middleware inside the above container, execute the release file to complete the startup of the application.

[0068] Therefore, the automatic publishing method of the application provided by the present invention obtains the publishing file generated by the publishing server, and creates a container based on the configuration file in the publishing file, so as to start the middleware corresponding to the publishing file in the container, so as to complete the application startup process in the container. This automatic publishing method of the application combines the container technology to realize the construction of the application's operating environment, and at the same time encapsulates the complex steps of traditional application publishing into a black box. The user only needs to click on the page to complete the steps of publishing, running, accessing, etc. of the application, and the automatic publishing of the application can be realized. In addition, the automatic publishing method of the application can forward and report data, so that there is no direct data interaction between the development tool and the actual running application, thereby realizing the decoupling between the development tool and the application.

[0069] In the embodiment of the present invention, the development environment may specifically include the following three environments.

[0070] Sandbox environment: The environment provided by the low-code platform by default. All applications generated by the user's sandbox publishing operations exist in this environment. It can be used for application testing. For example, after the application is built, you want to try whether you can log in and whether the role configuration is correct.

[0071] Online environment: An environment that is customized and added by the user. This environment is reachable through the network of the low-code platform development tool, and subsequent operations can be performed directly through the page. It can be used for the pre-release environment of the application. This environment requires the user to provide the server themselves and install the corresponding scheduling server on the server to make it a runtime environment supported by the low-code platform.

[0072] Offline environment: An environment that is customized by the user, and this environment is unreachable from the network of the low-code platform development tool. Subsequent operations require intervention from operation and maintenance personnel. It can be used in the production environment of the application. This environment requires the user to provide the server themselves and install the corresponding scheduling server on the server to make it a runtime environment supported by the low-code platform.

[0073] In an embodiment of the present invention, a container is created according to the configuration file, and all corresponding middleware in the container are started according to the release file, such as Figure 2 As shown, including:

[0074] S210, generating a container creation command according to the configuration file;

[0075] S220, executing the container creation command to obtain a container;

[0076] S230, determining whether the published file is published for the first time;

[0077] S240: If the release file is released for the first time, start all corresponding middleware in the container;

[0078] S250: If the release file is not released for the first time, start the middleware according to the status of all the current middleware in the container.

[0079] In order to free the scheduling server from the constraints of host environment dependence, the deployment of the scheduling server is also containerized. Since the scheduling server itself is in a container, a container-supported environment can be created for the scheduling server by using Docker-in-Docker (DinD).

[0080] In addition, to avoid using privileged mode, you can use the sock mounting method, that is, mount the host's / var / run / docker.sock into the container and the container's base image supports the docker client. Because it only mounts the host's sock and there are no duplicate Docker images, it saves disk space and is safe because no privileged options are required.

[0081] In the embodiment of the present invention, further, starting the middleware according to the current status of all the middleware in the container includes:

[0082] Determine whether the status of all current middleware in the container is available;

[0083] If the status of all the middlewares in the container are available, start all the corresponding middlewares in the container;

[0084] If the status of any middleware in the container is currently unavailable, the middleware corresponding to the container with the unavailable status is restarted.

[0085] It should be noted that only when the status of all the current middleware in the container is available, can all the corresponding middleware in the container be started. If they are all unavailable, the corresponding middleware in the container needs to be restarted.

[0086] In the embodiment of the present invention, when it is determined that all middlewares are started successfully, the release file is executed to complete the startup of the application program, such as Figure 3 As shown, including:

[0087] S310, when it is determined that all middlewares are started successfully, reporting the status information of all middlewares to the publishing server;

[0088] It should be understood that when all middlewares are successfully started, the status information of the middlewares is reported to the publishing server. The status information of the middlewares reported here may be, for example, whether the current middlewares are running normally, the resources occupied, and the running time.

[0089] S320, execute the sql file and obtain the sql execution result;

[0090] After all middlewares are started successfully, the SQL file is executed, and whether the application has completed startup is determined based on the SQL execution result.

[0091] S330: Determine whether the application is started based on whether the SQL execution result is successful.

[0092] Specifically, determining whether the application is started successfully according to whether the SQL execution result is successful includes:

[0093] S331, judging whether the SQL execution result is successful according to the configuration file;

[0094] In the embodiment of the present invention, the sql file can be executed according to the data source client corresponding to the data source in the configuration file, and the execution result will be output to the IO stream, which is divided into the standard output IO stream and the error output IO stream. The criterion for judging whether the execution is successful is whether there is content output in the error output IO stream. If not, it means that the execution is successful; if there is, it needs to be judged according to specific rules.

[0095] S332: If it is determined that the SQL execution result is successful, then check the application status of the application corresponding to the published file;

[0096] In the embodiment of the present invention, checking the application status of the application may specifically check whether the application status of the application is normal. Specifically, the application status of the application may be obtained by querying through an interface built into the application using the http protocol.

[0097] In the embodiment of the present invention, it should be noted that if it is determined that the SQL execution result fails, an error message is returned to the publishing server and the SQL execution result is deleted.

[0098] S333: If the application state of the application corresponding to the release file is stopped, start the application according to the relevant connection information corresponding to all the middleware in the configuration file;

[0099] In the embodiment of the present invention, if the application state of the application corresponding to the release file is stopped, relevant connection information corresponding to the middleware in the configuration file is obtained, and the application is started based on the information.

[0100] S334: If the application state of the application corresponding to the release file is running, restart the application according to the relevant connection information corresponding to all the middleware in the configuration file.

[0101] In the embodiment of the present invention, if the application state of the application corresponding to the release file is running, relevant connection information corresponding to the middleware in the configuration file is obtained, and the application is restarted based on the information.

[0102] In the embodiment of the present invention, in order to determine whether the application has completed startup, the following step is further included:

[0103] Determine whether the startup result of the application corresponding to the release file is successful;

[0104] If the startup result of the application corresponding to the release file is successful, the startup of the application is completed;

[0105] If the startup result of the application corresponding to the published file fails, an error message is returned to the publishing server and the SQL execution result is deleted.

[0106] In the embodiment of the present invention, the application can be started according to the script execution client, and the startup result will be output to the IO stream, which is divided into the standard output IO stream and the error output IO stream. The criterion for judging whether the startup is successful is whether there is content output in the error output IO stream. If there is no content, it means that the startup is successful; if there is content output, it needs to be judged according to specific rules.

[0107] It should be understood that if the application startup result is a failure, an error message is reported to the publishing server, and the SQL execution result is deleted, that is, the SQL execution content is rolled back to the state where the execution has not started.

[0108] It should be noted that after the application is automatically published and successfully started, there is a dedicated application access address. In order to achieve dynamic access to the application cluster and realize the scenario of multiple uses of one configuration, Traefik is introduced as a gateway to solve the dynamic proxy problem. Traefik can support dynamic loading of routing information from multiple configurations (such as Zookeeper, Redis). After the scheduling server automatically deploys the application, it obtains the unique identifier of the instance, dynamically splices the URL and writes it to the configuration center. Traefik hot-loads the configuration and forwards the request according to the routing rules. Combined with Traefik's dynamic routing capabilities, access requests can be entered through a unified IP or domain name, and Traefik forwards the request according to the globally unique cluster (instance system) ID.

[0109] It should also be noted that most StatefulSet-type Pods (the smallest unit of K8S scheduling and management, a Pod can contain one or more containers, each Pod has its own virtual IP, a working node can have multiple Pods, and the master node will automatically schedule the Pod to which node to run based on the load) will involve persistence requirements. If the data is stored on the disk of the Node (a node that runs container services, mainly divided into two types: master and worker; among them, the master is the master node and the worker is the working node), due to the scheduling characteristics of Kubernetes (specifically an open source tool that provides cluster deployment and management for containerized applications), in order to avoid Pod drift, the separated persistence state of the middleware needs to complete two things: (1) The data file can be saved to the disk. Specifically, NFS shared storage can be used. NFS is a network file system protocol based on TCP / IP transmission. By using the NFS protocol, the client can access shared resources in the remote server like accessing a local directory.

[0110] (2) The connection between the execution application and the data file must be preserved in some way. Specifically, the connection between the Pod and the PV is bound by declaring PVC (specifically a component provided by Kubernetes) on the Pod and using SC (StorageClass) to bind the PVC and the PV. Then the Pod created by the middleware adopts the StatefulSet type, so that the name of the Pod can be fixed and correspond to the PV one by one.

[0111] It should be noted that PV stands for Persistent Volume (PV), which is a piece of storage in the cluster. It can be prepared by the administrator or dynamically prepared using storage classes. Persistent volumes are cluster resources, just like nodes are cluster resources. PV persistent volumes are implemented using volume plug-ins like ordinary volumes, but they are used independently of the life cycle of any Pod using PV. The implementation details of the storage are described in this API object, whether it is NFS, iSCSI or a cloud platform-specific storage system behind it.

[0112] In addition, PVC stands for Persistent Volume Claim (PVC for short), which expresses the user's request for storage. Conceptually, it is similar to the Pod type. Pods can consume node resources, while PVC claims consume PV resources. Pods can request a specific amount of resources (CPU and content), and PVC claims can also request a specific size and access mode.

[0113] SC (Storage Class) provides administrators with a method to describe storage "classes". Different types can be mapped to different service quality levels or backup policies, or any policies set by the cluster administrator. The SC can also be understood as a configuration file.

[0114] If you want to elastically increase replicas, you only need to add Pods and LocalPVs. You can also let provisioner create PVs automatically.

[0115] LocalPV stands for Local Persistent Volume, which is a persistent storage solution for Kubernetes. It is used to map storage devices on local nodes (such as hard disks on nodes) to persistent volumes that can be used by applications.

[0116] Provisioner represents the provisioner, which is a component in the storage class. The storage class uses the provisioner to create the corresponding persistent volume according to the specific persistent volume claim definition.

[0117] In summary, the automatic publishing method of the application provided by the present invention currently supports running the application on two container technologies, Kubernetes and Docker, in terms of deployment mode; at the same time, it also runs in a containerized manner, adopts the dind technology to realize the scheduling of the container, and no longer relies on the host environment; in terms of heartbeat reporting, the mechanism of application heartbeat reporting is optimized, and the previous HTTP method is replaced by the RPC long connection method, so as to achieve more timely and efficient heartbeat collection; while the application actively reports the heartbeat, the scheduling server can regularly poll all applications, and if it finds that an application has not been reported for a long time, it will be annotated as offline; in terms of data source, various non-relational databases are supported as data sources. At the same time, the data security capability is enhanced, and various backup methods (local machine, different machine, OSS, etc.) are supported. In terms of backup data storage, hot and cold data backup is supported; in terms of task execution, in order to avoid the occurrence of black box situations, logs are actively collected and multiple data such as logs and performance indicators are collected, and the functions of task execution record and task execution status query are provided; at the same time, Logkit is introduced to collect and report the environment's Log, Metric and other data.

[0118] As another embodiment of the present invention, a scheduling server is provided for implementing the automatic publishing method of the application program described above, wherein: Figure 4 As shown, the scheduling server 10 includes:

[0119] The acquisition module 100 is used to acquire the publishing file generated by the publishing server, wherein the publishing server can generate the publishing file according to the publishing request of the user, and the publishing file at least includes a SQL file, a source data file and a configuration file;

[0120] A creation module 200, used to create a container according to the configuration file, and start all corresponding middleware in the container according to the release file;

[0121] The execution module 300 is used to execute the release file to complete the startup of the application program after determining that all the middlewares are successfully started.

[0122] The scheduling server provided by the present invention obtains the publishing file generated by the publishing server, and creates a container based on the configuration file in the publishing file, so as to start the middleware corresponding to the publishing file in the container, so as to complete the application startup process in the container. This automatic publishing method of the application combines the container technology to realize the construction of the application's operating environment, and at the same time encapsulates the complex steps of traditional application publishing into a black box. The user only needs to click on the page to complete the steps of publishing, running, accessing, etc. of the application, and the automatic publishing of the application can be realized. In addition, the scheduling server can forward and report data, so that there is no direct data interaction between the development tool and the actual running application, and the decoupling between the development tool and the application is realized.

[0123] The working process and principle of the scheduling server of the present invention can be referred to the description of the automatic publishing method of the application program in the previous text, and will not be repeated here.

[0124] As another embodiment of the present invention, a low-code platform 1 is provided, wherein Figure 5 As shown, it includes a publishing server 20 and the scheduling server 10 mentioned above, and the publishing server 20 and the scheduling server 10 are connected in communication.

[0125] The publishing server 20 is used to receive a publishing request from a user and generate a publishing file according to the publishing request from the user, wherein the publishing file at least includes a sql file, a source data file and a configuration file;

[0126] The scheduling server 10 is used to create a container according to the publishing file and start the application in the container.

[0127] In an embodiment of the present invention, the publishing server is used to receive a publishing request from a user and generate a publishing file according to the publishing request from the user, including:

[0128] Receive a user's publishing request;

[0129] Generate a publishing result according to the publishing request of the user, wherein the publishing result at least includes a publishing version, a publishing environment and identification information of the application;

[0130] Verifying the publishing result, and generating a publishing file when the publishing result passes the verification;

[0131] The publishing file is sent to the scheduling server based on the Restful API to complete the application startup.

[0132] Specifically, during the multiple iteration requirements of an application, the application needs to be continuously iterated and ensure the stability of the production version. In order to meet this goal, the low-code platform proposes the version function.

[0133] Each version should correspond to a stable version. Users can choose whether to generate a new version when publishing. The new version represents an initialized new release, while choosing the old version means continuing to iterate and update the content based on the last operation of this version.

[0134] It should be noted here that each application can generate multiple unique identifiers (app_uuid) according to different environments, operation types, offline and other information; and each application operation will generate a unique operation identifier (app_action_id), which is a standard uuid; that is, an application has multiple instances (auId is the unique identifier of the instance), and each instance will correspond to multiple operation identifiers (aaId).

[0135] Regarding the release process of the application of the present invention, when releasing a new version, the user can click Release in the upper right corner of the application editor, select a specific environment, and then click Release as a new version; when iterative release, the user can click Release in the upper right corner of the application editor, select a specific environment, select an existing version (the selected version will be highlighted), and click Next. The schematic diagram of specific application release and iteration is shown in FIG. Figure 6 shown.

[0136] The low-code platform provided by the present invention can realize automatic publishing of applications because the scheduling server adopted is based on the automatic publishing method of the application in the previous text. In addition, based on the scheduling server, data forwarding and reporting can be performed, so that there is no direct data interaction between the development tool and the actual running application, and the decoupling between the development tool and the application is realized.

[0137] Regarding the working process and principle of the low-code platform of the present invention, please refer to the description of the automatic publishing method of the application in the previous article, which will not be repeated here.

[0138] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A method for automatically publishing an application, characterized in that: include: Obtaining a publishing file generated by a publishing server, wherein the publishing server can generate a publishing file according to a publishing request of a user, and the publishing file at least includes a sql file, a source data file, and a configuration file; Creating a container according to the configuration file, and starting all corresponding middleware in the container according to the release file; When it is determined that all middlewares are started successfully, executing the release file to complete the startup of the application; The step of creating a container according to the configuration file and starting all corresponding middleware in the container according to the release file includes: Generate a container creation command according to the configuration file; Execute the container creation command to obtain a container; Determine whether the published file is published for the first time; If the release file is released for the first time, all corresponding middleware in the container are started; If the release file is not released for the first time, starting the middleware according to the status of all the current middleware in the container; The starting of the middleware according to the current status of all the middleware in the container includes: Determine whether the status of all current middleware in the container is available; If the status of all the middlewares in the container are available, start all the corresponding middlewares in the container; If the status of any middleware in the container is currently unavailable, restart the middleware corresponding to the container in the unavailable status; The container mounts the host machine's / var / run / docker.sock inside. Once the application is successfully started, set up Traefik as a gateway to dynamically load routing information from multiple configurations.

2. The automatic publishing method of application according to claim 1, characterized in that: When it is determined that all middlewares are started successfully, the release file is executed to complete the startup of the application, including: When it is determined that all middlewares are started successfully, the status information of all middlewares is reported to the publishing server; Execute the sql file and obtain the sql execution result; Whether the startup of the application is completed is determined according to whether the SQL execution result is successful.

3. The automatic publishing method of application according to claim 2, characterized in that: Determining whether the application is started according to whether the SQL execution result is successful includes: Determine whether the SQL execution result is successful according to the configuration file; If it is determined that the sql execution result is successful, then checking the application status of the application corresponding to the published file; If the application state of the application corresponding to the release file is stopped, start the application according to the relevant connection information corresponding to all middleware in the configuration file; If the application state of the application corresponding to the release file is running, the application is restarted according to the relevant connection information corresponding to all the middleware in the configuration file.

4. The automatic publishing method of application according to claim 3, characterized in that: Also includes: Determine whether the startup result of the application corresponding to the release file is successful; If the startup result of the application corresponding to the release file is successful, the startup of the application is completed; If the startup result of the application corresponding to the published file fails, an error message is returned to the publishing server and the SQL execution result is deleted.

5. The automatic publishing method of application according to claim 3, characterized in that: If it is determined that the sql execution result fails, an error message is returned to the publishing server and the sql execution result is deleted.

6. A scheduling server, used to implement the automatic publishing method of the application program according to any one of claims 1 to 5, characterized in that: The scheduling server comprises: An acquisition module is used to acquire a publishing file generated by a publishing server, wherein the publishing server can generate a publishing file according to a publishing request of a user, and the publishing file at least includes a SQL file, a source data file and a configuration file; A creation module, used to create a container according to the configuration file, and start all corresponding middleware in the container according to the release file; The execution module is used to execute the release file to complete the startup of the application program after determining that all middlewares are successfully started.

7. A low-code platform, characterized in that: comprising a publishing server and the scheduling server according to claim 6, wherein the publishing server and the scheduling server are in communication connection, The publishing server is used to receive a publishing request from a user and generate a publishing file according to the publishing request from the user, wherein the publishing file at least includes a sql file, a source data file and a configuration file; The scheduling server is used to create a container according to the publishing file and complete the startup of the application in the container.

8. The low-code platform according to claim 7, characterized in that: The publishing server is used to receive a publishing request from a user and generate a publishing file according to the publishing request from the user, including: Receive a user's publishing request; Generate a publishing result according to the publishing request of the user, wherein the publishing result at least includes a publishing version, a publishing environment and identification information of the application; Verifying the publishing result, and generating a publishing file when the publishing result passes the verification; The publishing file is sent to the scheduling server based on the Restful API to complete the application startup.