Inter-cloud computing decentralized FaaS workflow cross-cloud cooperation method and system

By obtaining the orchestrator configuration of the FaaS workflow, deploying it to multiple cloud platforms, and utilizing asynchronous trigger calls and message queues or serverless data storage services, cross-cloud collaboration of the FaaS workflow is achieved, and FaaS work in the existing technology is solved. Stream cross-cloud collaboration challenges, improving performance and reliability.

CN118573679APending Publication Date: 2024-08-30NAT UNIV OF DEFENSE TECH +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410656170.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve cross-cloud collaboration of FaaS workflows. It is limited by the heterogeneity of different FaaS service frameworks and APIs, resulting in poor portability of function workflow logic, and the centralized workflow controller cannot be used when concurrent calls are made by multiple tenants. Performance degrades.

Method used

Adopting Yunji Computing's decentralized FaaS workflow cross-cloud collaboration method, by obtaining the orchestrator workflow configuration of the function node, deploy it to multiple cloud platforms, and use HTTP asynchronous trigger calls and simple message queues or serverless data storage The service implements collaboration between functions, supports cross-platform collaboration in multiple modes, reduces state transition costs, and improves performance.

Benefits of technology

It realizes cross-cloud collaboration of FaaS workflows, shields the heterogeneity of different FaaS frameworks, improves overall performance, reduces state transition costs, and enhances the reliability and portability of function workflows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118573679A
    Figure CN118573679A
Patent Text Reader

Abstract

The invention discloses a cloud computing decentralized FaaS workflow cross-cloud cooperation method and system. The method comprises the following steps: acquiring arranger workflow configuration of each function node in a FaaS workflow; deploying the function nodes to one or more cloud platforms according to the orchestrator workflow configuration; and executing the FaaS workflow deployed on one or more cloud platforms, triggering execution among the function nodes on the same cloud platform in an http asynchronous triggering calling mode, and triggering execution among the function nodes on different cloud platforms by adopting a simple message queue or a server-free data storage service as intermediate data. The method aims at supporting cross-platform cooperation in multiple modes of the FaaS workflow, heterogeneous resources on the cloud are fully utilized, and the overall performance is improved while the requirement for reducing the state conversion cost is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cross-cloud collaboration of FaaS (function as a service) workflows in a cloud environment, and in particular to a cross-cloud collaboration method and system for FaaS workflows in a decentralized cloud computing environment. Background Art

[0002] With the development of cloud computing, more and more enterprises and companies are adopting multi-cloud development strategies. On the one hand, multi-cloud deployments can fully utilize cloud resources, effectively reducing costs and improving performance. On the other hand, users do not want to be locked into a single cloud provider and need to comply with different regional data laws and regulations. For specific applications, multi-cloud development strategies mainly include multi-cloud deployment and cross-cloud migration. The lightweight and stateless nature of serverless computing, a new cloud computing paradigm that has recently gained popularity, perfectly meets the inherent requirements of multi-cloud development strategies.

[0003] Serverless computing is often considered a combination of FaaS (Function as a Service) and BaaS (Backend as a Service). This model is the most typical and natural implementation of the serverless computing paradigm, and all major public cloud providers offer function computing services. Functions are the core of the serverless architecture and the smallest unit of computation. They typically run in a function runtime (sandbox) with constrained memory, CPU, and other resources. Typical memory values ​​range from 128MB, 256MB, 512MB, and 1GB, with CPU and other resources allocated proportionally. Compared to traditional runtimes like virtual machines and containers, functions are more lightweight and significantly reduce startup time. Functions are typically stateless, triggered by set events, automatically scale instances based on request traffic, and terminate upon timeout after processing requests. Users pay only for the resources actually used during function execution. Therefore, the lightweight, stateless, and maintenance-free nature of functions makes them more suitable for multi-cloud deployments and cross-cloud migration compared to traditional cloud computing paradigms. Furthermore, the performance models and pricing schemes for function computing products vary among cloud providers. This means that multi-cloud deployments can fully utilize cloud resources, improve performance, and reduce costs. However, a task often consists of multiple functions with different functionalities, known as function workflows, to form a complete application. Data transfer and process coordination between multiple functions often require the support of a workflow framework to ensure at-least-once execution and fault-tolerance recovery. Most public cloud providers offer function workflow orchestration services, charging for each state transition. However, achieving cross-cloud collaboration for function workflows still presents many challenges. First, the frameworks and APIs of different FaaS services vary, which deepens vendor lock-in. Second, the function workflow orchestration engine is proprietary to each cloud provider, with significant differences in implemented functionality and formats, such as Microsoft's Azure Durable Functions and Amazon's AWS Step Functions. This significantly hinders the portability of workflow logic. Even deploying the same function workflow logic across different clouds requires modifications to the function interface, payload objects, and configuration files. Furthermore, the centralized workflow controller design often leads to performance degradation due to the number of concurrent calls across multiple tenants. Therefore, there is an urgent need to design a cross-cloud collaboration mechanism for function workflows that can shield the heterogeneity of different FaaS frameworks and workflow controllers and provide users with a universal function workflow deployment, orchestration, and scheduling solution. Considering that some public cloud providers or private clouds do not provide a function workflow orchestration mechanism, it is necessary to design a workflow control mechanism based only on FaaS. Summary of the Invention The technical problem to be solved by the present invention is as follows: In response to the above-mentioned problems of the prior art, a cross-cloud collaboration method and system for FaaS workflows in cloud computing are provided. The present invention aims to support cross-platform collaboration in multiple modes of FaaS workflows, make full use of heterogeneous resources on the cloud, reduce the cost of state conversion, and improve overall performance.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: A cross-cloud collaboration method for decentralized FaaS workflows in cloud computing, including: Step S101: Obtain the orchestrator workflow configuration of each function node in the FaaS workflow; Step S102: deploying the function nodes to one or more cloud platforms according to the orchestrator workflow configuration; Step S103, execute the FaaS workflow deployed on one or more cloud platforms, and the function nodes on the same cloud platform are triggered to execute through http asynchronous trigger calls, and the function nodes on different cloud platforms use simple message queues or serverless data storage services as intermediate data to trigger execution.

[0005] Optionally, obtaining the orchestrator workflow configuration of each function node in the FaaS workflow in step S101 refers to: obtaining the directed acyclic graph description file and orchestrator configuration file of the FaaS workflow input by the user; and compiling the directed acyclic graph description file and orchestrator configuration file of the FaaS workflow using the orchestrator compiler to obtain the orchestrator workflow configuration of each function node in the FaaS workflow.

[0006] Optionally, obtaining the orchestrator workflow configuration of each function node in the FaaS workflow in step S101 refers to obtaining the orchestrator workflow configuration of each function node in the FaaS workflow input by the user.

[0007] Optionally, after step S103, the method further includes avoiding the cold start phase of the next function node in the FaaS workflow by preheating the function call based on the execution log of the FaaS workflow to reduce the cold start time on the critical path: Step S301: Parse the FaaS workflow execution log to obtain a detailed breakdown of the FaaS workflow execution time period. The detailed breakdown includes four phases: trigger call, cold start, code execution, and post-execution processing. Step S302: Determine the warm-up call time of each next function node based on the cold start phase time of each next function node, and modify the orchestrator workflow configuration of each next function node so that it sends a control flow event based on the calculated warm-up call time to reduce the cold start time on the critical path.

[0008] Optionally, after step S103, the process also includes migrating function nodes whose execution failure times exceed a set value from the original cloud platform to a different cloud platform based on the execution log of the FaaS workflow to improve the execution reliability of the FaaS workflow.

[0009] Optionally, when executing the FaaS workflow deployed on one or more cloud platforms in step S103, the execution of a function node in the FaaS workflow includes: Step S201: Obtain a data flow event trigger function written by a user in the orchestrator workflow configuration of the function node. The data field in the event of the data flow event trigger function includes a data source and a data value. The data source is triggered asynchronously via HTTP between function nodes on the same cloud platform, or triggered by intermediate data using a simple message queue or serverless data storage service between function nodes on different cloud platforms. Step S202, read the control flow information in the event of the data flow event triggering function, if the control flow information exists in the event, jump to step S203; otherwise jump to step S204; Step S203: Determine the type of control flow information. If it is a preheat call, directly return to step S204; if it is a cross-cloud platform migration, modify the orchestrator configuration file of the function node to migrate the function node to a different cloud platform, and jump to step S204. Step S204: Read the intermediate representation file of the function node, which is a runtime configuration that records the orchestrator workflow configuration of the function node. Initialize the orchestrator runtime class, which includes the workflow sequence number of the function node, the cloud platform where the function node is located, the data storage method, and subsequent function nodes. Check the database checkpoint output by the current function node. Step S205: Determine whether a data checkpoint exists for the function node. If so, the function directly passes the data to the exit data processing function for processing, and then jumps to step S206. If the data checkpoint does not exist, the function enters the event entry data processing function and determines the data source. When the data is stored in the data storage service, the data value is further read. At this time, the checkpoint pointer stored in the data storage is passed to the abstract database read encapsulation function to obtain the checkpoint data, and then passed to the user function. If the data is not stored in the data storage service, the data value is directly passed to the user function for processing. Step S206: After the export data processing function completes the data processing, it is determined whether the data checkpoint is enabled. If the data checkpoint is enabled, the process jumps to step S207; if the data checkpoint is not enabled, the process jumps to step S208. Step S207, further determine whether the data checkpoint exists; if the data checkpoint does not exist, create and store the data checkpoint; if the data checkpoint exists, directly proceed to the next step of processing; Step S208, modify the data flow event information of the subsequent function node according to the data checkpoint information, call the subsequent function node according to the relationship type between the function node and the subsequent function node, and further determine whether a cross-cloud call occurs when calling the subsequent function node: when no cross-cloud call occurs, directly use the calling API provided in the cloud to trigger the downstream function node; when a cross-cloud call occurs, it is necessary to write the called data flow event into the message queue or data storage of the cloud platform where the destination function node is located to asynchronously trigger the downstream function node.

[0010] Optionally, the relationship type between the function node and the subsequent function node is one of the following types: a chain transfer relationship, which is used to pass the result of the previous function node directly to the next function node after the execution is completed, and after obtaining the output, the next function node is asynchronously called through the encapsulated call method invoke. If the next function node is still the same function node, the conditional keyword and operation condition variable are used in the orchestrator workflow configuration of the function node to control the number of loops to achieve loop execution; a one-to-many transfer relationship, which is used to pass the output result of the previous function node to multiple function nodes in the backend; a one-to-many transfer relationship of the same function, which is used to treat the output of the current function node as iterable data and call the backend function node once for each item in the output; a many-to-one transfer relationship, which is used to call the specified function node using the output of the current function node and the output of all other function nodes that fan into the same function node; a judgment relationship, which is used to call different function nodes according to runtime conditions or control whether the function node is executed through conditional variables.

[0011] In addition, the present invention also provides a cloud computing decentralized FaaS workflow cross-cloud collaboration system, including interconnected microprocessors and memories, and the microprocessors are programmed or configured to execute the cloud computing decentralized FaaS workflow cross-cloud collaboration method.

[0012] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program / instruction, and the computer program / instruction is programmed or configured to execute the cloud computing decentralized FaaS workflow cross-cloud collaboration method through a processor.

[0013] In addition, the present invention also provides a computer program product, including a computer program / instruction, which is programmed or configured to execute the cloud computing decentralized FaaS workflow cross-cloud collaboration method through a processor.

[0014] Compared with the existing technology, the present invention has the following main advantages: the function workflow collaboration mechanism is an important component of the cloud environment supporting server-insensitive computing paradigm. In response to the above-mentioned problems of the existing technology, the present invention includes obtaining the orchestrator workflow configuration of each function node in the FaaS workflow; deploying the function nodes to one or more cloud platforms according to the orchestrator workflow configuration; executing the FaaS workflow deployed to one or more cloud platforms, and the function nodes on the same cloud platform are triggered to execute through http asynchronous trigger calls, and the function nodes on different cloud platforms use simple message queues or serverless data storage services as intermediate data to trigger execution. The present invention supports cross-platform collaboration in multiple modes of FaaS workflows, makes full use of heterogeneous resources on the cloud, meets the needs of reducing state conversion costs, and improves overall performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 Schematic diagram of the basic process of the method of the embodiment of the present invention.

[0016] Figure 2 A schematic diagram of the principle of obtaining the orchestrator workflow configuration in an embodiment of the present invention.

[0017] Figure 3 It is a directed acyclic graph described by the directed acyclic graph description file in an embodiment of the present invention.

[0018] Figure 4 This is a schematic diagram of the function node deployment results in an embodiment of the present invention.

[0019] Figure 5 The figure is a schematic diagram of the execution flow of a function node in an embodiment of the present invention. DETAILED DESCRIPTION

[0020] like Figure 1 As shown, the decentralized FaaS workflow cross-cloud collaboration method of cloud computing in this embodiment includes: Step S101: Obtain the orchestrator workflow configuration of each function node in the FaaS workflow; Step S102: deploying the function nodes to one or more cloud platforms according to the orchestrator workflow configuration; Step S103, execute the FaaS workflow deployed on one or more cloud platforms, and the function nodes on the same cloud platform are triggered to execute through http asynchronous trigger calls, and the function nodes on different cloud platforms use simple message queues or serverless data storage services as intermediate data to trigger execution.

[0021] As an optional implementation, Figure 2As shown, in step S101 of this embodiment, obtaining the orchestrator workflow configuration of each function node in the FaaS workflow refers to: obtaining the directed acyclic graph description file of the FaaS workflow input by the user ( Figure 2 In the workflow DAG description) and the orchestrator configuration file ( Figure 2 The orchestrator workflow configuration of each function node in the FaaS workflow is obtained by compiling the directed acyclic graph description file of the FaaS workflow and the orchestrator configuration file using the orchestrator compiler, that is, the orchestrator runtime configuration of each function node, such as Figure 2 As shown. The directed acyclic graph description file (DAG description file, such as the high-level representation of AWS Step Functions) mainly includes the task type, next node name, start and end flags of each function node in the workflow. The directed acyclic graph of the function node described in this embodiment is as follows Figure 3As shown, nodes F1-F5 in the directed acyclic graph represent different function nodes, while edges represent dependencies between function nodes. The orchestrator configuration file primarily includes intermediate data storage and attributes for each function node, including the cloud platform, code directory, and runtime. A directed acyclic graph description file (DAG description file) generates an intermediate representation file for each function node, or users can create their own intermediate representation files for their functions. The intermediate representation file primarily includes the function name and the command for processing the next node. As an alternative implementation, obtaining the orchestrator workflow configuration for each function node in the FaaS workflow in step S101 can be accomplished by obtaining the orchestrator workflow configuration for each function node in the FaaS workflow input by the user. When creating a DAG description file, users need to create a working directory for each function, an orchestrator library directory, a pre-written orchestrator configuration file, and a workflow DAG graph description file (such as a high-level representation for AWS Step Functions) within the function workflow directory. The working directory primarily contains the function code, the intermediate representation file (the orchestrator configuration for the function runtime), and an orchestrator library wrapper. The intermediate representation file can be generated by the orchestrator compiler by reading the DAG description file, or it can be written by the user without extracting the DAG file (in this case, there is no need to write a workflow DAG graph description file). The orchestrator library directory includes three parts: the orchestrator body, the cross-cloud call encapsulation, and the intermediate data encapsulation used for orchestration and transmission. The directed acyclic graph description file used in this embodiment is a high-level representation of AWS StepFunctions, a hierarchical JSON file that primarily includes the type, attributes, next node, and start and end markers for each node. When generating / writing the orchestrator function configuration file, the user defines the database type (including object storage, table storage, etc.) required for intermediate state transfer between function nodes, the cloud platform type for each function deployment (such as Alibaba Cloud, Amazon Cloud, etc.), and the trigger type (used to trigger function calls, including HTTP, database, message queue, etc.). Function nodes are deployed to the cloud platform using the cloud platform's command line tools, and data stores are created on each cloud platform. The starting function node is called using events in a predefined format. The events are cloud events, which include data and control information generated when the function is running, and are used to transmit data flow and control flow information between function nodes. Figure 4 As shown, in this embodiment, function nodes F1 to F5 are deployed on AWS and AliYun cloud platforms respectively. SQS message queues and Serverless databases are used to transmit data flow and control flow information between the function nodes of AWS and AliYun cloud platforms.

[0022] As an optional implementation, this embodiment further includes collecting the running logs of the FaaS workflow to optimize the workflow performance and error migration. Analyze the impact of the cold start delay on the critical path of the workflow, and use the corresponding control flow events in combination with the real-time logs to trigger the function in advance to reduce the cold start delay. When a function node in the workflow executes a large number of errors, the function's orchestrator configuration file is modified to other cloud platforms through control flow events, so as to achieve user-friendly cross-cloud migration and provide high availability. For example, as an optional implementation, this embodiment also includes, after step S103, avoiding the cold start phase of the next function node in the FaaS workflow by preheating the call function according to the execution log of the FaaS workflow to reduce the cold start time on the critical path: Step S301: Parse the FaaS workflow execution log to obtain a detailed breakdown of the FaaS workflow execution time period. The detailed breakdown includes four phases: trigger call, cold start, code execution, and post-execution processing. Step S302 determines the warmup call time for each next function node based on the cold start phase duration of the node. The orchestrator workflow configuration for each next function node is modified to send a control flow event based on the calculated warmup call time to reduce the cold start time on the critical path. For example, function node 5 may be warmed up and called 2 seconds after function node 3 completes execution, or function node 5 may be called 5 seconds after the start node runs. During the next execution, a control flow event is sent based on the calculated warmup call time to reduce the cold start time on the critical path.

[0023] For example, as an optional implementation, after step S103 of this embodiment, the function nodes whose execution failure times exceed a set value are migrated from the original cloud platform to a different cloud platform based on the execution log of the FaaS workflow to improve the execution reliability of the FaaS workflow. In the above manner, when a function node encounters a large number of errors during execution, the function can be migrated to a different cloud or region through a control flow event to reduce the error rate and delay and improve the task stability. The control flow event is to add the corresponding cloud platform to the Control field in the event. The entry data processing component will modify the corresponding orchestrator configuration file according to the cloud platform field. The current function node calls the function of other clouds according to the configuration file to achieve migration.

[0024] The orchestrator's runtime library includes data input and output preprocessing. This embodiment defines a language-independent transmission format, represented using JSON. It includes two fields: data and control. The former encapsulates the data source, while the latter encapsulates external control information. In this embodiment, the orchestrator uses a globally unique namespace during workflow execution. A globally unique session is generated at the workflow start node and propagated through intermediate representation files (runtime metadata). All intermediate data stores and storage objects created by each branch use unique names, and workflow execution logs on each cloud platform are collected into local files. The orchestrator library implements a create_if_not_exists method within the intermediate data store objects to ensure that each function call is executed exactly once (even if a function node fails, the final workflow execution result remains consistent with a non-failed execution result). The data egress process attempts to write the function result to a checkpoint object in the data store. If such a checkpoint already exists, it indicates a duplicate operation. The downstream function is called using the data in the checkpoint object to guarantee the result of the first successful execution. The data entry process checks the checkpoint object of the function node before executing the user function code. If there is data, the user function code is skipped and the stored result is directly used to call the downstream function, shortening the execution time. The data entry merges the data from the incoming edge and passes the processed data to the function. After the data exit receives the result of the function, it calls the next function or saves the intermediate state in the data store, and uses the checkpoint to ensure execution once. If there is a control field, the external control information is processed first, such as cross-cloud migration. In this embodiment, a highly abstract interface is used in the runtime library to shield the asynchronous call API of multiple cloud platform functions, the creation, addition and deletion of intermediate data storage, and dynamically link specific cloud platforms and intermediate data storage according to the orchestrator configuration file. Dynamic linking ensures that functions can be deployed and migrated on multiple clouds.

[0025] like Figure 5 As shown, in step S103 of this embodiment, when executing a FaaS workflow deployed on one or more cloud platforms, the execution of a function node in the FaaS workflow includes: Step S201: Obtain a data flow event trigger function written by a user in the orchestrator workflow configuration of the function node. The data field in the event of the data flow event trigger function includes a data source and a data value. The data source is triggered asynchronously via HTTP between function nodes on the same cloud platform, or triggered by intermediate data using a simple message queue or serverless data storage service between function nodes on different cloud platforms. Step S202, read the control flow information in the event of the data flow event triggering function, if the control flow information exists in the event, jump to step S203; otherwise jump to step S204; Step S203: Determine the type of control flow information. If it is a preheat call, directly return to step S204; if it is a cross-cloud platform migration, modify the orchestrator configuration file of the function node to migrate the function node to a different cloud platform, and jump to step S204. Step S204: Read the intermediate representation file of the function node, which is a runtime configuration that records the orchestrator workflow configuration of the function node. Initialize the orchestrator runtime class, which includes the workflow sequence number of the function node, the cloud platform where the function node is located, the data storage method, and subsequent function nodes. Check the database checkpoint output by the current function node. Step S205: Determine whether a data checkpoint exists for the function node. If so, the function directly passes the data to the exit data processing function for processing, and then jumps to step S206. If the data checkpoint does not exist, the function enters the event entry data processing function and determines the data source. When the data is stored in the data storage service, the data value is further read. At this time, the checkpoint pointer stored in the data storage is passed to the abstract database read encapsulation function to obtain the checkpoint data, and then passed to the user function. If the data is not stored in the data storage service, the data value is directly passed to the user function for processing. Step S206: After the export data processing function completes the data processing, it is determined whether the data checkpoint is enabled. If the data checkpoint is enabled, the process jumps to step S207; if the data checkpoint is not enabled, the process jumps to step S208. Step S207, further determine whether the data checkpoint exists; if the data checkpoint does not exist, create and store the data checkpoint; if the data checkpoint exists, directly proceed to the next step of processing; Step S208, modify the data flow event information of the subsequent function node according to the data checkpoint information, call the subsequent function node according to the relationship type between the function node and the subsequent function node, and further determine whether a cross-cloud call occurs when calling the subsequent function node: when no cross-cloud call occurs, directly use the calling API provided in the cloud to trigger the downstream function node; when a cross-cloud call occurs, it is necessary to write the called data flow event into the message queue or data storage of the cloud platform where the destination function node is located to asynchronously trigger the downstream function node.

[0026] In this embodiment, the relationship type between the function node and the subsequent function node is one of the following types: The chain transfer relationship is used to pass the result directly to the next function node after the previous function node is executed. After obtaining the output, the next function node is asynchronously called through the encapsulated call method invoke. If the next function node is still the same function node, the conditional keyword (Conditional) and the operation condition variable are used in the orchestrator workflow configuration of the function node to control the number of loops (Next Payload Modifiers) to achieve loop execution; this relationship can be described as a Chain model. The invoke method that shields heterogeneity of backend calls abstractly includes: (1) Functions on the same cloud can use the HTTP asynchronous call API provided by the FaaS framework to call backend functions; (2) Functions on different clouds depend on the backend FaaS platform. Most of them support simple message queues as asynchronous triggers. The front-end function writes the export data to the message queue, and the backend function trigger is set to the corresponding message queue. Other intermediate data storage methods that support function triggers can also be set in this way; A one-to-many transfer relationship is used to pass the output of the previous function node to multiple backend function nodes. This relationship can be described as a Fan-Out model, where the output of the previous function is passed to multiple backend functions. The subsequent function list is obtained by reading the intermediate representation file, and after obtaining the function output, the subsequent functions in the asynchronous call list are iterated, i.e., multiple calls to the invoke instruction are made. A one-to-many identical function transfer relationship treats the output of the current function node as iterable data and calls the backend function node once for each item in the output. This relationship can be described as a Map model, in which the output of the current function is treated as iterable data (such as an array) and the backend function is called once for each item in the output. The same operation can be performed on each part of the function output, that is, the same function is called for each element of the function output. A many-to-one transfer relationship is used to call a specified function node using the output of the current function node and the output of all other function nodes that fan into the same function node; this relationship can be described as a Fan-In model, in which the output of the current function and the output of all other functions that fan into the same node are used to call the specified function. In this decentralized orchestration mechanism, there is no need to specify a single branch function as the orchestrator. Instead, after all fan-in branches are completed, the backend function is called by the last branch. To determine this situation, all fan-in branches add the names of their checkpoint objects to a shared collection in the data store. Any branch that reads a collection with a size equal to the total number of branches will use the checkpoints of all branches as input to call the target function. The Fan-In instruction contains the total number of fan-in functions. The size can be specified explicitly or using a variable in the call request. Similar to the checkpoint, the collection data structure used for orchestration requires strong consistency of the data store. (1) When all functions are on the same cloud, a Serverless table storage for orchestration is created on that cloud. (2) When the functions are not on the same cloud, a Serverless table storage for orchestration is created on the cloud where the backend function is located. Judgment relationships are used to call different function nodes based on runtime conditions or control the execution of function nodes through conditional variables. This relationship can be described as a branch model. In this model, applications may need to call different functions based on runtime conditions (such as function outputs) or control them through conditional variables. Call instructions can optionally be protected by conditional expressions that access function outputs and execution metadata recorded in the intermediate representation file. Users can use the conditional keyword (Conditional) in the intermediate representation file to set conditional judgments.

[0027] In addition, this embodiment also provides a cloud computing decentralized FaaS workflow cross-cloud collaboration system, including interconnected microprocessors and memories, and the microprocessors are programmed or configured to execute the cloud computing decentralized FaaS workflow cross-cloud collaboration method.

[0028] In addition, this embodiment also provides a computer-readable storage medium, which stores a computer program / instruction, and the computer program / instruction is programmed or configured to execute the cloud computing decentralized FaaS workflow cross-cloud collaboration method through a processor.

[0029] In addition, this embodiment also provides a computer program product, including a computer program / instruction, which is programmed or configured to execute the cloud computing decentralized FaaS workflow cross-cloud collaboration method through a processor.

[0030] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions described in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0031] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A cross-cloud collaboration method for FaaS workflows in cloud computing decentralization, characterized in that: include: Step S101, obtaining the orchestrator workflow configuration of each function node in the FaaS workflow; Step S102, deploying the function nodes to one or more cloud platforms according to the orchestrator workflow configuration; Step S103, execute the FaaS workflow deployed to one or more cloud platforms, and the function nodes on the same cloud platform are triggered to execute through http asynchronous trigger calls, and the function nodes on different cloud platforms use simple message queues or serverless data storage services as intermediate data to trigger execution.

2. According to claim 1, the decentralized FaaS workflow cross-cloud collaboration method for cloud computing is characterized in that: Obtaining the orchestrator workflow configuration of each function node in the FaaS workflow in step S101 refers to: obtaining the directed acyclic graph description file and the orchestrator configuration file of the FaaS workflow input by the user; and compiling the directed acyclic graph description file and the orchestrator configuration file of the FaaS workflow using the orchestrator compiler to obtain the orchestrator workflow configuration of each function node in the FaaS workflow.

3. The cross-cloud collaboration method for decentralized FaaS workflows in cloud computing according to claim 1, characterized in that: Obtaining the orchestrator workflow configuration of each function node in the FaaS workflow in step S101 refers to obtaining the orchestrator workflow configuration of each function node in the FaaS workflow input by the user.

4. The cross-cloud collaboration method for decentralized FaaS workflows in cloud computing according to claim 1, characterized in that: Step S103 also includes avoiding the cold start phase of the next function node in the FaaS workflow by preheating the calling function according to the execution log of the FaaS workflow to reduce the cold start time on the critical path: Step S301, parsing the execution log of the FaaS workflow to obtain a detailed running time period decomposition of the FaaS workflow, where the detailed running time period after decomposition includes four stages: trigger call, cold start, code execution, and post-execution processing; Step S302, determining the preheating call time of the next function node according to the time of the cold start phase of each next function node, and modifying the orchestrator workflow configuration of each next function node so that it sends a control flow event according to the calculated preheating call time to reduce the cold start time on the critical path.

5. The cross-cloud collaboration method for decentralized FaaS workflows in cloud computing according to claim 4 is characterized in that: Step S103 also includes migrating function nodes whose execution failure times exceed a set value from the original cloud platform to a different cloud platform according to the execution log of the FaaS workflow to improve the execution reliability of the FaaS workflow.

6. The cross-cloud collaboration method for decentralized FaaS workflows in cloud computing according to claim 5, characterized in that: When executing the FaaS workflow deployed on one or more cloud platforms in step S103, the execution of a function node in the FaaS workflow includes: Step S201, obtaining a data flow event trigger function written by a user in the orchestrator workflow configuration of the function node, wherein the data field in the event of the data flow event trigger function includes a data source and a data value, wherein the data source is an intermediate data trigger between function nodes on the same cloud platform via http asynchronous triggering or between function nodes on different cloud platforms using a simple message queue or a serverless data storage service; Step S202, read the control flow information in the event of the data flow event triggering function, if there is control flow information in the event, jump to step S203; otherwise jump to step S204; Step S203, determine the type of control flow information. If it is a preheating call, directly return to jump to step S204; if it is a cross-cloud platform migration, modify the orchestrator configuration file of the function node to migrate the function node to a different cloud platform, and jump to step S204; Step S204, reading the intermediate representation file of the function node, the intermediate representation file is a runtime configuration that records the orchestrator workflow configuration of the function node, initializing the orchestrator runtime class, the orchestrator runtime class includes the workflow sequence number of the function node, the cloud platform where the function node is located, the data storage method and the subsequent function node, and checking the database checkpoint output by the current function node; Step S205, determine whether the data checkpoint of the function node exists. If the data checkpoint exists, directly hand it over to the export data processing function for processing, and jump to step S206; if the data checkpoint does not exist, enter the event input entry data processing function and determine the data source: when the data is stored through the data storage service, further read the data value, at this time, the checkpoint pointer in the data storage is stored, passed to the abstract database read encapsulation function to obtain the checkpoint data, and then passed to the user function; if it is not stored through the data storage service, directly pass the data value to the user function for processing; Step S206, after the export data processing function completes the data processing, it is determined whether the data checkpoint is enabled. If the data checkpoint is enabled, the process jumps to step S207; if the data checkpoint is not enabled, the process jumps to step S208; Step S207, further determine whether the data checkpoint exists; if the data checkpoint does not exist, create and store the data checkpoint; if the data checkpoint exists, directly proceed to the next step of processing; Step S208, modify the data flow event information of the subsequent function node according to the data checkpoint information, call the subsequent function node according to the relationship type between the function node and the subsequent function node, and further determine whether a cross-cloud call occurs when calling the subsequent function node: when no cross-cloud call occurs, directly use the calling API provided in the cloud to trigger the downstream function node; when a cross-cloud call occurs, it is necessary to write the called data flow event to the message queue or data storage of the cloud platform where the destination function node is located, and asynchronously trigger the downstream function node.

7. The cross-cloud collaboration method for decentralized FaaS workflows in cloud computing according to claim 6, characterized in that: The relationship type between the function node and the subsequent function node is one of the following types: a chain transfer relationship, which is used to directly transfer the result of the previous function node to the next function node after the execution is completed, and after obtaining the output, the next function node is asynchronously called through the encapsulated call method invoke. If the next function node is still the same function node, the conditional keyword and the operation condition variable are used in the orchestrator workflow configuration of the function node to control the number of loops to achieve loop execution; a one-to-many transfer relationship, which is used to transfer the output result of the previous function node to multiple back-end function nodes; a one-to-many transfer relationship of the same function, which is used to treat the output of the current function node as iterable data and call the back-end function node once for each item in the output; a many-to-one transfer relationship, which is used to call the specified function node using the output of the current function node and the outputs of all other function nodes that fan into the same function node; a judgment relationship, which is used to call different function nodes according to runtime conditions or control whether the function node is executed through conditional variables.

8. A cloud computing decentralized FaaS workflow cross-cloud collaboration system, comprising interconnected microprocessors and memories, characterized in that: The microprocessor is programmed or configured to execute the cloud computing decentralized FaaS workflow cross-cloud collaboration method as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program / instruction stored therein, characterized in that: The computer program / instructions are programmed or configured to execute the cross-cloud collaboration method for decentralized FaaS workflows in cloud computing as described in any one of claims 1 to 7 through a processor.

10. A computer program product comprising a computer program / instructions, characterized in that The computer program / instructions are programmed or configured to execute the cross-cloud collaboration method for decentralized FaaS workflows in cloud computing as described in any one of claims 1 to 7 through a processor.

Citation Information

Cited By

  • Cross-cloud resource operation method, device and equipment based on task orchestration and medium

    CN119603299A