Serverless application development device and method based on WebIDE

By introducing WebIDE-based Serverless application development devices in Serverless application development, using lightweight WebIDE, language server protocol and container technology, the problems of inconsistency in environment, difficulty in debugging and low deployment efficiency are solved, and efficient Serverless application development and deployment are achieved , especially suitable for artificial intelligence applications.

CN119292578AInactive Publication Date: 2025-01-10刘宇
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411364158.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

There are problems in the development of existing Serverless applications, such as inconsistent environment, difficulty in debugging, and low deployment efficiency, resulting in compatibility issues and low development efficiency, which cannot meet the growing development needs.

Method used

Provide a Serverless application development device based on WebIDE, including Serverless instances, WebIDE components, code debugging components, environment saving components and one-click deployment components. Through built-in lightweight WebIDE, language server protocol, container technology and automatic deployment algorithm, the environment is realized. Consistency, online debugging, state saving and one-click deployment simplify development and deployment processes.

Benefits of technology

It solves the problem of environmental inconsistency, strengthens the development and debugging capabilities, improves development and testing efficiency, simplifies the deployment process, realizes a continuously available development environment, and provides a convenient and efficient development environment for artificial intelligence applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention provides a Serverless application development device and method based on WebIDE, and aims to solve the problems of inconsistent environment and low efficiency in Serverless application development. The device comprises a Serverless instance, a WebIDE component, a code debugging component, an environment storage component and a one-key deployment component. Wherein the Serverless instance comprises a cloud-based production environment and a test environment corresponding to the cloud-based production environment; the WebIDE component is arranged in the test environment; the code debugging component supports online debugging and testing; the environment storage component is used for storing configuration and change in the development process; the one-key deployment component can directly deploy applications in a test environment to a production environment. The method comprises the steps that a Serverless test environment is divided, a WebIDE assembly is arranged in the Serverless test environment, application development is carried out through the WebIDE assembly, online debugging testing is carried out through a code debugging assembly, configuration changes in the development process are stored through an environment storage assembly, and applications are directly deployed to a production environment through a one-key deployment assembly. According to the method, the Serverless application development and deployment efficiency is improved, and the consistency of a development environment and a production environment is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing, and in particular to a Serverless application development device and method based on WebIDE. Background Art

[0002] As an important technology in the Internet era, cloud computing has been widely used in various industries. Among them, Serverless computing is an emerging model of cloud computing, which enables developers to focus on writing business logic code without having to pay attention to the configuration and management of the underlying infrastructure. Serverless computing has the advantages of automatic scaling and pay-as-you-go, and has important applications in Web application development, data processing, artificial intelligence and other fields.

[0003] Currently, the development of Serverless applications mainly adopts a combination of local development environment and cloud deployment. Developers use IDE tools to write code locally, and then deploy the application to the Serverless platform through scripts or tools. Another solution is to use the online WebIDE provided by cloud service providers to write and deploy Serverless applications directly in the browser. Existing Serverless application development technology simplifies the development and deployment process to a certain extent.

[0004] However, these solutions have problems such as inconsistent environments, difficult debugging, and low deployment efficiency. The difference between the local development environment and the cloud Serverless environment may cause compatibility issues when the application is running online. The online WebIDE has relatively limited functions and insufficient debugging and testing capabilities. In addition, existing solutions usually require manual packaging, uploading, and redeployment of code, and the environment configuration cannot be persisted, which is inefficient during repeated development.

[0005] To solve the above problems, some studies have tried to optimize the serverless application development process. For example, container technology is used to simulate the serverless environment locally, or the debugging function of WebIDE is enhanced. Although these methods have improved the development experience to a certain extent, they are still insufficient in terms of environment consistency, debugging capabilities, and deployment efficiency.

[0006] With the continuous development of Serverless computing, people have put forward higher requirements for development efficiency and application quality. How to further simplify the development process of Serverless applications and improve environment consistency and deployment efficiency has become an urgent problem to be solved in this field. Therefore, a new technical solution is urgently needed that can fully utilize the advantages of the cloud Serverless environment, provide powerful development and debugging capabilities, and simplify the deployment process to the greatest extent possible to meet the growing demand for Serverless application development. Summary of the invention

[0007] The purpose of the present invention is to solve the problems of inconsistent environment, difficult debugging, low deployment efficiency, etc. in the existing Serverless application development. In addition, the present invention also aims to provide an efficient and convenient Serverless application development method, which maximizes the advantages of the cloud Serverless environment and simplifies the development and deployment process.

[0008] To achieve the above purpose, the present invention provides a Serverless application development device based on WebIDE, characterized in that: it includes a Serverless instance, a WebIDE component, a code debugging component, an environment preservation component and a one-click deployment component; the Serverless instance includes a cloud-based Serverless production environment and a corresponding Serverless test environment; the WebIDE component is built into the Serverless test environment to provide an application development interface; the code debugging component is used to support online code debugging and testing; the environment preservation component is used to save various configurations and changes in the Serverless application development process; the one-click deployment component is used to deploy the application in the Serverless test environment directly to the Serverless production environment. In some embodiments, the present invention also provides a Serverless application development method based on the above device.

[0009] Specifically, the WebIDE component adopts a lightweight design and is implemented through a built-in WebIDE Server to reduce the impact on the Serverless test environment.

[0010] Furthermore, the code debugging component implements a remote code debugging function based on a language server protocol (LSP) and a debugging protocol.

[0011] Preferably, the environment saving component saves the state of the current Serverless test environment when WebIDE is closed, and restores the state when WebIDE is started again.

[0012] Optionally, the one-click deployment component generates an environment difference list by comparing the differences between the Serverless test environment and the Serverless production environment. After the user selects the content to be synchronized, the selected content is directly synchronized to the Serverless production environment without the need for re-packaging, uploading, and publishing.

[0013] In one embodiment, the device is suitable for artificial intelligence application development scenarios, and simplifies the development, debugging and deployment process of artificial intelligence applications by providing hardware and software resources that match the production environment in the cloud.

[0014] In some embodiments, the WebIDE component supports online hard disk mounting, and the mounted hard disk can be used directly in the Serverless test environment. In addition, the present invention can also implement state preservation and recovery of the Serverless test environment through container technology. In other embodiments, the one-click deployment component allows users to select part of the test environment content to be deployed to the production environment, achieving more flexible deployment control.

[0015] In a preferred embodiment, the serverless application development method of the present invention includes the following steps: S1: Based on the cloud-based Serverless production environment, divide the corresponding Serverless test environment and build the WebIDE component into the Serverless test environment; S2: Develop Serverless applications using the WebIDE component. S3: Use the code debugging component to perform online debugging and testing of the developed Serverless application; S4: Save various configurations and changes during the development of the Serverless application through the environment preservation component, using container technology to implement state preservation and recovery of the Serverless test environment; S5: Use the one-click deployment component to directly deploy the tested Serverless application to the Serverless production environment. During the deployment process, the differences between the Serverless test environment and the Serverless production environment are compared to generate an environment difference list, and the user selects the content to be deployed.

[0016] In another preferred embodiment, the present invention is specifically used to support the development of artificial intelligence applications, provide cloud hardware resources including GPUs, and pre-set commonly used AI development frameworks and libraries to simplify the development and deployment process of AI applications.

[0017] By adopting the above technical solution, the present invention has the following beneficial effects: (1) Solved the problem of inconsistent environments in Serverless application development and improved application compatibility; (2) Strengthened the online development and debugging capabilities and improved the development and testing efficiency; (3) By saving and restoring the environment status, the development environment is continuously available; (4) The one-click deployment function greatly simplifies the application release process and improves deployment efficiency; (5) It has been specially optimized for artificial intelligence application development, providing AI developers with a convenient and efficient development environment.

[0018] In summary, the present invention provides a complete Serverless application development solution, which effectively solves the difficulties in the prior art and is of great significance to promoting the application and development of Serverless computing. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 It is the overall architecture diagram of the present invention, showing the core components of the present invention and the relationship between them.

[0021] Figure 2 This is a detailed structural diagram of WebIDE components.

[0022] Figure 3 It is a workflow diagram of the code debugging component.

[0023] Figure 4 This is a diagram of how the environment preservation component works.

[0024] Figure 5 It is a workflow diagram for one-click deployment of components.

[0025] FIG6 is a flow chart of Serverless application development based on the present invention. Figure 7 is a schematic diagram of the main components and usage flow of the current system. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments 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 creative work are within the scope of protection of the present invention.

[0027] In the description of the present invention, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as a limitation on the present invention.

[0028] Example 1 This example provides a Serverless application development device based on WebIDE. Figure 1 As shown, the device includes a Serverless instance, a WebIDE component, a code debugging component, an environment saving component, and a one-click deployment component. The Serverless instance includes a cloud-based Serverless production environment and a corresponding Serverless test environment.

[0029] The WebIDE component is built into the Serverless test environment, adopts a lightweight design, and is implemented through the built-in WebIDEServer. Traditional WebIDEs usually require independent server resources and communicate with the development environment through remote connections. The innovation of the present invention is that the WebIDE component is highly integrated with the Serverless test environment. Specifically, the WebIDE Server runs directly in the container or virtual machine where the Serverless test environment is located as a lightweight service, which greatly simplifies the system architecture and improves communication efficiency. Furthermore, the WebIDE Server and the Serverless test environment adopt a file system-based communication method. The WebIDE Server synchronizes the user's code modifications to the shared file directory of the Serverless test environment in real time without network transmission, which significantly reduces latency. Preferably, since the WebIDE Server and the Serverless test environment run in the same environment, the WebIDE component can directly access information such as environment configuration and debug port, without the need for a complex environment synchronization mechanism.

[0030] like Figure 2As shown, in addition to providing basic code editing, syntax highlighting, automatic completion and other functions, the WebIDE component also introduces intelligent prompts and refactoring functions based on the Language Server Protocol (LSP). LSP defines a set of standard communication protocols between editors and language servers. The language server can provide intelligent functions such as code completion, definition jump, error diagnosis, etc. The present invention integrates the LSP client in the WebIDE Server and deploys the corresponding LSP language server in the Serverless test environment. Based on the working principle of LSP, when the user edits the code in WebIDE, the LSP client will send the user's editing behavior to the language server. After the language server analyzes the code, it will return information such as intelligent prompts and error prompts to the LSP client, and then the LSP client will update the WebIDE interface. By introducing LSP, the WebIDE component of the present invention can provide an intelligent development experience comparable to that of a local IDE, greatly improving development efficiency.

[0031] The code debugging component is used to support online code debugging and testing, and its innovation lies in the automatic injection of debuggers and dynamic debugging agents. In traditional online debugging solutions, users are usually required to manually insert debugging statements in the code, or modify the startup configuration of the application to turn on the debugging mode. The code debugging component of the present invention adopts an automatic injection method. When the application is deployed to the Serverless test environment, it automatically detects the runtime type of the application (such as Node.js, Python, etc.), and selects a suitable debugger according to the runtime type, and injects it into the startup process of the application. Taking the Node.js application as an example, the code debugging component will automatically modify the package.json file of the application and modify the node startup command to node --inspect to turn on the debugging mode of Node.js. At the same time, the code debugging component will also inject a dynamic debugging agent into the entry file of the application. The agent will automatically connect to the debugger front end of WebIDE after the application is started to realize the debugging communication between WebIDE and the application. In order to implement the injection of dynamic debugging agents, the code debugging component adopts the following injection process: first, scan the application's entry file to find the definition of the entry module; then, insert a debug agent introduction statement before the entry module definition; then, insert a debug agent initialization statement after the entry module definition; finally, write the modified entry file back to the Serverless test environment. By automatically injecting the debugger and dynamic debugging agent, the code debugging component greatly simplifies the online debugging process. Users can directly start the debugging session in WebIDE without modifying the code or configuration, which improves debugging efficiency.

[0032] The environment preservation component is responsible for preserving various configurations and changes during the Serverless application development process to ensure the continuous availability of the development environment. Traditional cloud IDEs usually use a simple file storage method to save the environment status, such as saving the user's file changes in the cloud file system. However, this method cannot completely save the runtime state of the application, such as the installed dependency package version, environment variables, data in memory, etc. The environment preservation component of the present invention adopts a state preservation mechanism based on container images, which innovatively solves the problem of state persistence. Figure 4 As shown in the figure, the environment preservation component encapsulates the complete state of the Serverless test environment in a container image, which contains not only files such as application code and dependency packages, but also memory snapshots of application processes, environment variable snapshots, etc. Specifically, when creating a container image, the environment preservation component first packages the file system of the current container into a tar file; then, uses the criu tool to create a memory snapshot of the process in the current container; then, packages the file system tar file and the memory snapshot into a new container image; finally, pushes the new container image to the image repository. When WebIDE is closed, the environment preservation component automatically triggers the above container image creation process. Furthermore, when WebIDE is started again, the environment preservation component pulls the latest container image from the image repository, creates a new container based on the image, and restores the previously saved environment state. By introducing an environment preservation mechanism based on container images, the present invention can not only persist the user's file changes, but also completely save the runtime state of the Serverless application, so as to achieve true "out-of-the-box use" and avoid the tedious process of repeatedly building a development environment.

[0033] The one-click deployment component is used to deploy applications in the Serverless test environment directly to the Serverless production environment, simplifying the application release process. Compared with the traditional deployment process, the one-click deployment component of the present invention has innovated in two aspects: deployment efficiency and deployment automation. In terms of deployment efficiency, the traditional deployment process usually requires generating an application deployment package, such as a ZIP package or a Docker image, and then uploading the deployment package to the production environment for deployment. The one-click deployment component takes advantage of the homogeneity of the Serverless test environment and the production environment, and directly deploys the application image running in the test environment to the production environment, avoiding the process of generating and uploading deployment packages. and They represent the time cost of building the deployment package and uploading the deployment package respectively. The time cost of the traditional deployment process is It can be expressed as: in, Indicates the time cost of deploying applications in a production environment. The time cost of deploying components with one click It can be expressed as: It can be seen that the one-click deployment component significantly reduces and These two expenses greatly increase the deployment speed.

[0034] In terms of deployment automation, the traditional deployment process usually requires users to manually configure various parameters of the production environment, such as environment variables and network configuration. The one-click deployment component introduces an automatic environment comparison mechanism, which can automatically compare the differences between the test environment and the production environment, and generate an environment difference list for users to select the configuration items that need to be synchronized, reducing the workload of manual configuration. Its core is an environment comparison algorithm, which is used to compare the differences between the Serverless test environment and the production environment. The input of the algorithm is the configuration information of the two environments, including environment variables, network configuration, security group rules, etc.; the output is an environment difference list, which lists all the differences between the two environments. The algorithm first extracts the configuration information of the two environments, converts the configuration items into a standardized Key-Value form, and then sorts the configuration items of the two environments to generate an ordered list of configuration items. Then, traverse the two ordered lists at the same time and compare the configuration items in the same position. If the Key of the two configuration items is the same but the Value is different, the configuration item is added to the difference list and marked as "modified"; if a configuration item exists in one environment but not in the other, the configuration item is added to the difference list and marked as "added" or "deleted". Finally, the algorithm outputs a list of environment differences. Assuming the number of configuration items in the two environments is n and m respectively, the time complexity of the algorithm is , the space complexity is Through the environment comparison algorithm, the one-click deployment component can accurately identify the differences between the test environment and the production environment, making it easier for users to synchronize configurations.

[0035] In summary, the WebIDE-based Serverless application development device provided in this embodiment significantly improves the development efficiency and quality of Serverless applications and reduces the complexity of Serverless application development through innovative designs such as WebIDE components, code debugging components, environment preservation components, and one-click deployment components. It represents an important development direction of the Serverless development platform.

[0036] Embodiment 2: Based on Embodiment 1, this embodiment provides an improved solution for the development of artificial intelligence applications. Figure 6As shown, in this solution, in addition to providing conventional computing resources, Serverless instances also introduce high-performance computing resources such as GPUs to support the development and training of artificial intelligence applications. Traditional artificial intelligence application development usually requires local configuration of the GPU environment and manual management of the allocation and scheduling of GPU resources, which has problems such as complex environment configuration and low resource utilization. This embodiment innovatively introduces GPU resources into the Serverless platform and deeply integrates it with WebIDE, so that developers do not need to pay attention to the configuration and management of the GPU environment, and can directly develop, debug and deploy artificial intelligence applications in WebIDE, significantly lowering the development threshold.

[0037] Specifically, this embodiment pre-installs mainstream artificial intelligence development frameworks and libraries in the Serverless instance, such as TensorFlow, PyTorch, Keras, etc., as well as commonly used data processing and visualization tools. At the same time, this embodiment also provides an intelligent resource scheduler for dynamically allocating and scheduling GPU resources. When a user starts an artificial intelligence training task in WebIDE, the intelligent resource scheduler automatically allocates the optimal GPU resource combination for it according to the characteristics of the task (such as model type, data scale, hyperparameters, etc.). For example, for large-scale image classification tasks, the scheduler will allocate multiple GPU instances for it and enable distributed training; for small-scale text classification tasks, the scheduler will allocate a single GPU instance and optimize the use of memory and video memory. Suppose the number of GPUs required for an artificial intelligence training task is n, and the computing power of each GPU is , the computational complexity of the training task is , then the theoretical execution time of the task is It can be expressed as: It can be seen that by increasing the number of GPUs and improve GPU computing power , which can significantly reduce the execution time of tasks. Based on this formula, the intelligent resource scheduler automatically allocates the best resource combination for each task in combination with the task characteristics and currently available GPU resources, thereby achieving the purpose of optimizing resource utilization and accelerating task execution.

[0038] During the development process, the WebIDE component provides a series of customized development tools and auxiliary functions for artificial intelligence applications. For example, WebIDE provides a visual model designer, developers can quickly design and build deep learning models by dragging and dropping. At the same time, WebIDE also has built-in a variety of predefined model architectures and training scripts, developers can quickly develop their own models based on these templates. For the debugging phase, WebIDE provides a dedicated tensor viewer for real-time monitoring and visualization of tensor value changes during model training, helping developers to gain insight into model behavior and discover potential problems. In addition, WebIDE also provides an automatic hyperparameter tuning tool that automatically searches for the optimal model hyperparameter combination based on the reinforcement learning algorithm, further improving the efficiency and quality of model development.

[0039] Based on Example 1, the code debugging component further introduces distributed training and debugging functions to support the development of large-scale artificial intelligence applications. The traditional stand-alone debugging method is difficult to cope with the debugging needs in distributed training, such as cross-node breakpoint setting, global tensor value viewing, etc. This embodiment innovatively proposes a distributed debugging protocol, which synchronizes and transfers debugging instructions and data between multiple computing nodes, and realizes global debugging of the distributed training process. Specifically, when a developer sets a breakpoint in WebIDE, the code debugging component synchronizes the breakpoint setting to all computing nodes. When any node triggers the breakpoint, the node sends a breakpoint event to the debugger. After the debugger collects the breakpoint events of all nodes, it automatically selects a globally consistent time point to suspend the execution of all nodes and presents the current global tensor value to the developer. Developers can view the local variables and tensor values ​​of any node in WebIDE, or the global tensor values ​​of all nodes. Based on this distributed debugging protocol, developers can easily debug the key logic and data flow of distributed training, greatly improving the debuggability and transparency of distributed training.

[0040] Based on Example 1, the environment preservation component further introduces the version management function of the model and data. In the traditional development method, models and data are often scattered in different environments and storage media, lacking effective version management and tracking mechanisms, resulting in confusion and inconsistency of models and data. However, this embodiment innovatively incorporates models and data into the version management system, and creates an independent code repository for each artificial intelligence project in WebIDE to store project-related model codes, configuration files, training scripts, etc. At the same time, WebIDE also creates a model repository and a data repository for each project, which are used to store project-related model versions and data versions, respectively. When the developer performs model training in WebIDE, the environment preservation component automatically captures the current model parameters and saves them as a new model version. Similarly, when the developer annotates or preprocesses data in WebIDE, the environment preservation component automatically creates a new data version for the modified data. Through the organic combination of code warehouse, model warehouse, and data warehouse, developers can easily track and manage the version evolution of models and data, ensuring the consistency and reproducibility of data and models during model development.

[0041] The one-click deployment component provides a container-based model deployment solution for the deployment of machine learning models. The traditional model deployment process usually requires converting the model into a specific format and manually writing the model's reasoning code, which is complicated and easy to introduce errors. However, this embodiment innovatively proposes an automated model deployment process that can deploy the trained model as an online reasoning service with just one click. Specifically, when the user completes model training in WebIDE, the model deployment process can be started with the one-click deployment button. The one-click deployment component first automatically generates the corresponding reasoning code and dependency configuration based on the type and framework of the model. Then, the one-click deployment component packages the model file, reasoning code, and dependency configuration into a Docker image and pushes the image to the image repository. Finally, the one-click deployment component creates a Serverless service based on the image, and automatically configures the service's scaling strategy, traffic management, security authentication, etc., making it a highly available, elastically scalable online reasoning service. This container-based model deployment solution has the following advantages: First, container technology provides a consistent operating environment, ensuring the consistency of the model in the development environment and the production environment; second, containerized deployment simplifies the operation and management of the model, and developers do not need to pay attention to the underlying infrastructure; finally, Serverless services enable model reasoning to automatically scale up and down and be billed on demand, reducing the cost of model deployment and maintenance.

[0042] In summary, based on Example 1, this embodiment provides a series of customized development and deployment tools for the special needs of artificial intelligence application development, including intelligent scheduling of GPU resources, distributed training and debugging, model and data version management, one-click model deployment, etc., which significantly improves the development and deployment efficiency of artificial intelligence applications, lowers the development threshold of artificial intelligence applications, and is expected to become a new paradigm for artificial intelligence development platforms.

[0043] Example 3: This example provides a Serverless application development method based on WebIDE, which further optimizes the development process and efficiency of Serverless applications.

[0044] like Figure 6 As shown, the method mainly includes the following steps: S1. Based on the cloud-based Serverless production environment, divide the corresponding Serverless test environment and build a WebIDE component in the Serverless test environment. The key to this step is to establish a mapping relationship between the production environment and the test environment, so that the test environment can accurately simulate the behavior of the production environment and provide a reliable environment foundation for subsequent development and testing.

[0045] S2. Develop Serverless applications through the WebIDE component. This step makes full use of the integrated development environment of the WebIDE component to provide developers with a series of development tools such as coding, debugging, testing, and building, thereby improving the development efficiency of Serverless applications.

[0046] S3. Use the code debugging component to debug and test the developed Serverless application online. This step introduces the code debugging component, which can dynamically debug the Serverless application online without modifying the application code or configuration, greatly simplifying the debugging process of the Serverless application.

[0047] S4. Save various configurations and changes during the development of the Serverless application through the environment preservation component, using container technology to save and restore the state of the Serverless test environment. This step uses the environment preservation component and container technology to persist the state of the Serverless test environment, allowing developers to restore to the previous development environment at any time, avoiding the problem of repeated configuration of the environment.

[0048] S5. Use the one-click deployment component to deploy the tested Serverless application directly to the Serverless production environment. During the deployment process, the differences between the Serverless test environment and the Serverless production environment are compared to generate an environment difference list, and the user selects the content to be deployed. This step uses the one-click deployment component to achieve seamless migration of the Serverless application from the test environment to the production environment, improving the efficiency and reliability of application release.

[0049] It should be noted that the method provided in this embodiment is a Serverless application development method with continuous integration and continuous delivery, which runs through the entire life cycle of the Serverless application. Specifically, steps S1-S4 correspond to the development stage of the Serverless application. Developers can use tools such as WebIDE components, code debugging components, and environment preservation components to complete the coding, debugging, and testing of Serverless applications online. Step S5 corresponds to the release stage of the Serverless application. Developers can quickly release the tested Serverless application to the production environment through one-click deployment components, realizing the continuous delivery of Serverless applications.

[0050] Furthermore, in order to optimize the transition of Serverless applications from the development stage to the release stage, this embodiment introduces an environment difference comparison mechanism. The traditional application release process usually requires manual checking of the differences between the test environment and the production environment, which is prone to omissions or errors. In step S5 of this embodiment, the differences between the test environment and the production environment are automatically calculated through the environment comparison algorithm, and an environment difference list is generated, which lists all the differences between the two environments in terms of configuration, code, data, etc. Based on this list, developers can selectively apply changes in the test environment to the production environment, avoiding the tediousness and errors of manually comparing environment differences.

[0051] In addition, this embodiment also introduces a version control mechanism for managing the version evolution of Serverless applications. Specifically, in steps S2 and S3, developers can use the WebIDE component to submit a new code version each time they complete a functional module or fix a defect. Similarly, in step S4, each time the developer completes an environment change, the environment preservation component generates a new environment version. In step S5, the one-click deployment component deploys the current code version and environment version as a whole to the production environment, thereby achieving traceability and rollback of the Serverless application version. Suppose the version number of the Serverless application is a triple ,in Indicates the code version number, Indicates the environment version number. Indicates the data version number. When an application exception occurs, developers can quickly locate the problematic version based on the version number and restore the application to the previous normal version with one-click rollback, which greatly improves the maintainability and stability of the Serverless application.

[0052] In summary, the WebIDE-based Serverless application development method provided in this embodiment establishes an automated and intelligent development process by standardizing the key steps of Serverless application development. This process covers the entire life cycle of Serverless applications from development to release, introduces mechanisms such as environment difference comparison and version control, and significantly improves the development efficiency, maintainability and stability of Serverless applications, providing strong support for the continuous integration and continuous delivery of Serverless applications.

[0053] Example 4 This example provides a Serverless application development system based on WebIDE, which integrates the functions of Examples 1 to 3 and provides an end-to-end Serverless application development solution.

[0054] like Figure 7 As shown, the system mainly includes the following components: Serverless production environment, Serverless test environment, WebIDE server, code management server, image management server, deployment management server, etc. Among them, the Serverless production environment and test environment correspond to the Serverless instance in Example 1 respectively; the WebIDE server corresponds to the WebIDE component in Example 1; the code management server is used to store and manage the code version of the Serverless application; the image management server is used to store and manage the environment version of the Serverless application; and the deployment management server is used to coordinate and execute the deployment process of the Serverless application.

[0055] In this system, each component communicates and exchanges data through predefined interfaces and protocols, together forming an automated and intelligent Serverless application development platform. Specifically, the WebIDE server provides developers with a Web-based integrated development environment. Developers can access WebIDE through a browser to perform online code editing, debugging, testing and other operations. The WebIDE server synchronizes with the code management server and the image management server in real time to ensure that the code version and environment version seen by the developer are consistent with the server side. At the same time, the WebIDE server also has built-in auxiliary development tools such as smart prompts, automatic completion, and refactoring in various languages, which improves the coding efficiency of developers.

[0056] The code management server creates an independent code repository for each Serverless application to store and manage the code version of the application. Developers can submit code modifications to the code repository through the WebIDE server or command line tools. The code management server will automatically generate a unique version number for each submission and store the version number in association with the corresponding code snapshot. When developers need to roll back to a historical version, they only need to specify the corresponding version number. At the same time, the code management server also provides collaborative development tools such as branch management, code review, and conflict resolution, supporting multiple people to develop the same Serverless application at the same time.

[0057] The image management server is used to store and manage the environment versions of Serverless applications. Whenever a developer installs a new dependency package, modifies the environment configuration, or performs other environment change operations in WebIDE, the image management server will automatically create a new environment version and package the changed environment into a Docker image and store it in the image repository. The image management server generates a unique version number for each environment version and associates the version number with the corresponding image for storage. When a developer needs to restore to a historical environment, they only need to specify the corresponding environment version number.

[0058] The deployment management server is the core component of the system, responsible for coordinating and executing the deployment process of Serverless applications. When developers complete development and testing in WebIDE, they can start application deployment by clicking the "one-click deployment" button. The deployment management server will first compare the current code version and environment version with the version in the production environment, calculate the difference between the two, and generate a deployment plan. Then, according to the deployment plan, the deployment management server will synchronize the changed code and environment to the code management server and the image management server respectively, and start the new version of the Serverless application instance in the production environment. The entire deployment process is automated and intelligent, without the need for manual intervention, which greatly reduces the complexity of application release.

[0059] It is worth mentioning that the system also introduces an intelligent scheduling algorithm based on data flow graphs to optimize the resource allocation and scheduling of Serverless application instances. Specifically, the deployment management server will dynamically generate a data flow graph model based on the characteristics of each deployment request, such as the amount of code updates, the amount of environment updates, the request arrival rate, etc. The nodes in the data flow graph represent the various functions or microservices of the Serverless application, the edges represent the calling relationships between functions, and the weight on each edge represents the calling frequency. The deployment management server will input the data flow graph into the intelligent scheduling algorithm, which automatically allocates the optimal resource quota and number of instances to each node based on graph partitioning and traffic prediction technology, and dynamically adjusts resource configuration according to the actual request traffic. Suppose the resource quota of the i-th node is , the number of instances is , then the processing capacity of the node can be expressed as: The goal of the intelligent scheduling algorithm is to minimize the resource cost of all nodes while ensuring that the processing capacity of each node meets the needs of the request traffic. This problem can be formalized as an integer programming problem: in, Indicates The request traffic of each node, Indicates the total number of nodes. The intelligent scheduling algorithm uses heuristic search and approximate algorithms to find an approximately optimal resource allocation solution under the premise of satisfying constraints. Through the intelligent scheduling algorithm, the system can automatically optimize resource allocation according to the actual request pattern of the Serverless application, improve resource utilization, and reduce the operating cost of the application.

[0060] In summary, the Serverless application development system based on WebIDE provided in this embodiment integrates multiple innovative functions such as visual development, intelligent debugging, automated deployment, and intelligent scheduling, forming an end-to-end Serverless application solution. Developers only need to access WebIDE through a browser to get the complete development experience of traditional IDEs and enjoy the advantages of elastic scaling and pay-as-you-go of the Serverless platform. At the same time, the system's built-in intelligent scheduling algorithm can automatically optimize resource allocation according to the actual request mode of the application, balancing application performance and cost. This innovative development model and architectural design represents an important development direction of the Serverless application development platform and is expected to become the mainstream paradigm for future Serverless application development.

[0061] The WebIDE-based Serverless application development device and method provided by the present invention significantly improves the development efficiency and quality of Serverless applications through key capabilities such as integrated development environment, online debugging, environment preservation, and one-click deployment. The present invention can be widely used in various Serverless application development scenarios and is suitable for enterprises of different sizes and fields.

[0062] In practical applications, the apparatus and method provided by the present invention can also be expanded and varied. For example, in addition to the components described herein, other auxiliary development tools and services can be introduced, such as code quality analysis, performance bottleneck diagnosis, security vulnerability scanning, etc., to further enhance the convenience of development and the reliability of applications. In terms of environment preservation and recovery, in addition to using container technology, other environment isolation and packaging technologies can also be used, such as virtual machine snapshots, application packaging, etc. In terms of one-click deployment, more deployment strategies and process customization can also be supported, such as canary release, blue-green deployment, etc., to meet the release requirements of different applications.

[0063] In short, technicians in the field to which the present invention belongs can make various modifications and variations to the present invention according to actual needs without departing from the principles and spirit of the present invention, and these modifications and variations should also be regarded as within the scope of protection of the present invention.

[0064] For those skilled in the art, many improvements and modifications can be made without violating the principles of the present invention, all of which fall within the scope of protection of the present invention. For example, the present invention can be combined with virtualization, edge computing and other technologies to further expand the application scenarios and effects of intelligent scheduling.

Claims

1. A Serverless application development device based on WebIDE, characterized in that: It includes: Serverless instance, WebIDE component, code debugging component, environment preservation component and one-click deployment component; the Serverless instance includes a cloud-based Serverless production environment and a corresponding Serverless test environment; the WebIDE component is built into the Serverless test environment to provide an application development interface; the code debugging component is used to support online code debugging and testing; the environment preservation component is used to save various configurations and changes during the Serverless application development process; the one-click deployment component is used to deploy the application in the Serverless test environment directly to the Serverless production environment.

2. The device according to claim 1, characterized in that The WebIDE component adopts a lightweight design and is implemented through a built-in WebIDE Server to reduce the impact on the Serverless test environment.

3. The device according to claim 1, characterized in that The code debugging component implements a remote code debugging function based on a language server protocol (LSP) and a debugging protocol.

4. The device according to claim 1, characterized in that The environment saving component saves the state of the current Serverless test environment when WebIDE is closed, and restores the state when WebIDE is started again.

5. The device according to claim 1, characterized in that The one-click deployment component generates an environment difference list by comparing the differences between the Serverless test environment and the Serverless production environment. After the user selects the content to be synchronized, the selected content is directly synchronized to the Serverless production environment without the need for re-packaging, uploading, and publishing.

6. The device according to any one of claims 1 to 5, characterized in that The device is suitable for artificial intelligence application development scenarios, and simplifies the development, debugging and deployment processes of artificial intelligence applications by providing hardware and software resources that match the production environment in the cloud.

7. The device according to any one of claims 1 to 5, characterized in that The WebIDE component supports online hard disk mounting, and the mounted hard disk can be directly used in the Serverless test environment.

8. A Serverless application development method based on WebIDE, characterized in that: The following steps are involved: S1. Based on the cloud-based Serverless production environment, divide the corresponding Serverless test environment and build the WebIDE component into the Serverless test environment; S2. Develop Serverless applications through the WebIDE component. S3. Use the code debugging component to perform online debugging and testing on the developed Serverless application. S4. Save various configurations and changes during the Serverless application development process through the environment storage component; S5. Use the one-click deployment component to directly deploy the Serverless application that has passed the test to the Serverless production environment.

9. The method according to claim 8, characterized in that In step S4, the environment preservation component uses container technology to implement state preservation and recovery of the Serverless test environment.

10. The method according to claim 8, characterized in that In step S5, the one-click deployment component generates an environment difference list by comparing the differences between the Serverless test environment and the Serverless production environment, and the user selects the content to be deployed.

Citation Information

Cited By

  • System and method for developing and debugging Javascript at server side

    CN120780583A

  • A system and method for server-side javascript development debugging

    CN120780583B