Continuous workflow

By dynamically allocating computing resources and virtual machine instances on an event-driven serverless computing platform, dynamic suspending and recovery of workflows is solved, and the inefficient use of computing resources caused by workflow execution in computing services is improved, and execution efficiency and performance are improved.

CN119576474APending Publication Date: 2025-03-07AMAZON TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411208378.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-03-27
Filing Date
2020-03-26
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In computing services, the execution of workflows may cause the computing system to be idle, resulting in inefficient use of computing resources, because the system needs to wait for responses from other services.

Method used

By dynamically allocating computing resources, hosting virtual machine instances using an event-driven serverless computing platform, realizing dynamic suspension and recovery of workflows. The specific steps include: the first virtual machine instance executes the first part of the workflow, performs data processing operations through the entity, generates a response, and uses a handle to restore the execution state of the workflow, so that the second virtual machine instance continues to execute the second part of the workflow.

Benefits of technology

Effective utilization of computing resources avoids idleness in the computing system while waiting for service response, and improves the execution efficiency and performance of workflows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576474A_ABST
    Figure CN119576474A_ABST
Patent Text Reader

Abstract

A method and system for executing a workflow, and a non-transitory computer-readable storage medium are provided. The method includes causing a first virtual machine instance to dynamically allocate computing resources to execute a first portion of a workflow, the first virtual machine instance hosted on a server of an event-driven server-less computing platform; continued execution of the workflow needs to be determined by one or more data processing operations through an entity; requesting the entity to generate a response associated with the workflow, the response required for continued execution of the workflow; receiving a recovery workflow request from the entity, the recovery workflow request including a handle, the handle including a reference to a snapshot corresponding to an execution state of the workflow; and causing a second virtual machine instance to execute a second portion of the workflow using the handle of the snapshot.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of an invention patent with an application date of March 26, 2020, application number 202080028908.7 (international application number PCT / US2020 / 025079), and invention name “Continued Workflow”.

[0002] CROSS-REFERENCE TO RELATED APPLICATIONS

[0003] This application claims priority to U.S. Patent Application No. 16 / 366,976, filed on March 27, 2019, entitled “CONTINUATION WORKFLOWS,” U.S. Patent Application No. 16 / 366,795, filed on March 27, 2019, entitled “REDUCING REQUEST LATENCY IN AMULTI-TENANT WEB SERVICE HOST,” and U.S. Patent Application No. 16 / 366,998, filed on March 27, 2019, entitled “CHAINING VIRTUAL MACHINES,” and incorporates by reference the entire disclosures of said patent applications for all purposes. Technical Field

[0004] The present application relates to the technical field of workflow continuation, and more particularly to a method, system, and non-transitory computer-readable storage medium for executing a workflow. Background Art

[0005] In various environments, managing the efficiency and performance of various applications is critical in many computing services. Computing services typically utilize a network of various functions and operations to execute workflows that may be required by various applications. These functions and operations typically utilize instantiations of computing systems to execute workflows required by various applications. In addition, workflows may require the use of other services to complete the workflow. Access to such services may cause the computing system that is instantiated to execute the workflow to be idle because the service operates to provide a response to the computing system. This idleness may result in inefficient use of the computing resources of the computing system, which must operate while waiting for the service response. Summary of the invention

[0006] One aspect of the present application relates to a method, which includes: causing a first virtual machine instance to dynamically allocate computing resources to execute a first part of a workflow, the first virtual machine instance being hosted on a server of an event-driven serverless computing platform; continuing execution of the workflow requires one or more data processing operations to be determined by an entity; requesting the entity to generate a response associated with the workflow, the response being required for continued execution of the workflow; receiving a resume workflow request from the entity, the resume workflow request including a handle containing a reference to a snapshot corresponding to an execution state of the workflow; and using the handle of the snapshot to cause a second virtual machine instance to execute a second part of the workflow.

[0007] Another aspect of the present application relates to a non-transitory computer-readable storage medium on which executable instructions are stored, and the executable instructions, when executed by one or more processors of a computer system, cause the computer system to perform at least the following operations: cause a first virtual machine instance to allocate computing resources to execute a first portion of a workflow; determine that continued execution of the workflow requires one or more data processing operations to be performed by an entity; request the entity to generate a response associated with the workflow, the response being required for continued execution of the workflow; receive a resume workflow request from the entity, the resume workflow request including a handle containing a reference to a snapshot corresponding to an execution state of the workflow; and use the handle of the snapshot to cause a second virtual machine instance to execute a second portion of the workflow.

[0008] Another aspect of the present application relates to a system, which includes: one or more processors; and a memory, wherein the memory stores computer-executable instructions, which, when executed, cause the one or more processors to perform the following operations: cause a first virtual machine instance to allocate computing resources to execute a first part of a workflow; determine that continued execution of the workflow requires one or more data processing operations to be performed by an entity; request the entity to generate a response associated with the workflow, which is required for continued execution of the workflow; receive a resume workflow request, the resume workflow request including a handle, the handle containing a reference to a snapshot corresponding to the execution state of the workflow; and use the handle of the snapshot to cause a second virtual machine instance to execute the second part of the workflow. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Various techniques will be described with reference to the accompanying drawings, in which:

[0010] Figure 1 shows an example of a continuation workflow according to one embodiment;

[0011] Figure 2 is a swim diagram illustrating an example of a continuation workflow according to one embodiment;

[0012] Figure 3 is a flow chart illustrating an example of a continuation workflow according to one embodiment;

[0013] Figure 4 shows an example of linking virtual machines according to one embodiment;

[0014] Figure 5 illustrates an example of a fan-out virtual machine according to one embodiment;

[0015] Figure 6 illustrates an example of a fan-out virtual machine according to another embodiment;

[0016] Figure 7 is a swim lane diagram illustrating an example of linking virtual machines according to one embodiment;

[0017] Figure 8 is a flowchart illustrating an example of linking virtual machines according to one embodiment; and

[0018] Fig. 9 A system is shown in which various embodiments may be implemented.

[0019] Fig.10 An example of using virtual machines to isolate concurrent requests for storage services is shown according to one embodiment;

[0020] Fig.11 shows an example of a virtual machine configuration exported from a base virtual machine according to one embodiment;

[0021] Fig.12 An example of running a cloned virtual machine on a host machine according to one embodiment is shown;

[0022] Fig.13 shows an example of an interface for providing a customer code according to one embodiment;

[0023] Fig.14 is a flow chart illustrating an example of creating and distributing a particular virtual machine configuration according to one embodiment;

[0024] Fig.15 is a flow chart illustrating an example of a process for executing customer code within a data storage service according to one embodiment;

[0025] Fig.16is a swim lane diagram illustrating an example of a process for executing software code according to one embodiment. DETAILED DESCRIPTION

[0026] The techniques and systems described below relate to event-driven suspension and resumption of virtual machine configurations that execute workflows through a series of stages. In one example, a workflow request to execute a workflow is received through an application programming interface. In the example, a first virtual machine instance is caused to execute function code to execute a first portion of the workflow. In this example, execution of the first portion of the workflow includes: storing a first execution state of the function code as a first snapshot (e.g., in a persistent storage device, random access memory (RAM), etc.); receiving a first wakeup handle corresponding to the first snapshot; submitting a first service request for first information associated with the workflow to a first service, wherein the first service request includes a first wakeup handle; and terminating the first virtual machine instance.

[0027] In some examples, the term "virtual machine instance" refers to a virtual machine that is instantiated and executed on a host computer system. The virtual machine instance can be used for various purposes, such as operating as a server to support a website, operating a business application, or generally serving as computing power for a client. Other applications of the virtual machine instance can be to support database applications, e-commerce applications, business applications, and / or other applications.

[0028] Still in the example, a first wakeup handle and a first message are received from a first service through an application programming interface. Then, in the example, the first wakeup handle and the first message are used to cause a second virtual machine instance to resume execution of the function code from the first execution state to execute a second portion of the workflow. In this example, execution of the second portion of the workflow includes: storing a second execution state of the function code as a second snapshot (e.g., in a persistent storage device, RAM, etc.); receiving a second wakeup handle corresponding to the second snapshot; submitting a second service request for second information associated with the workflow to a second service, wherein the second service request includes a second wakeup handle; and terminating the second virtual machine instance.

[0029] Furthermore, in the example, a second wakeup handle and a second information are received from a second service through an application programming interface. The second wakeup handle and the second information are used to cause the third virtual machine instance to resume execution of the function code from the second execution state to execute the third part of the workflow. In this example, execution of the third part of the workflow includes: determining a workflow result based on the first information and the second information; returning the workflow result; and terminating the third virtual machine instance. Finally, in the example, the workflow result is provided in response to the workflow request.

[0030] In another example, receiving function code (due to being executed by the virtual machine configuration) causes the virtual machine configuration to execute at least a portion of the workflow to generate information, generate a snapshot corresponding to the current state of the virtual machine configuration, return the information and a call handle to the snapshot, and terminate the virtual machine configuration. A request to execute a workflow is received through an application programming interface.

[0031] In the example, the request is satisfied by at least causing a first virtual machine configuration to be instantiated to execute function code to perform a first portion of the workflow. In addition, to satisfy the request, first information and a handle are received from the first virtual machine configuration. Further, to satisfy the request, a first operation is performed based on the first information. Also to satisfy the request, a second virtual machine configuration is instantiated to execute function code to perform a second portion of the workflow based on the invoked handle.

[0032] In addition, to satisfy the request, second information is received from the second virtual machine configuration. Further, to satisfy the request, a second operation is performed based on the second information. Also to satisfy the request, a workflow result is determined based on the execution of the first operation and the second operation. Finally, the workflow result is provided in response to the request.

[0033] In the previous and following descriptions, various techniques are described. For the purpose of explanation, specific configurations and details are set forth in order to provide a thorough understanding of possible ways to implement the techniques. However, it will also be apparent that the techniques described below may be practiced in different configurations without the specific details. In addition, well-known features may be omitted or simplified to avoid obscuring the described techniques.

[0034] Figure 1 An example of a continuation workflow according to one embodiment is shown. Specifically, Figure 1An example 100 of a depicted system, in which a client 110 causes a virtual machine (VM) configuration 104 hosted by a computing resource service provider to perform a workflow utilizing continuation in a manner described in the present disclosure. In some examples, a computing resource service provider is an entity that provides one or more computing resource services to its clients individually or as a combination of services of a distributed computer system. Examples of the types of computing resources provided by a computing resource service provider include infrastructure as a service (IaaS), platform as a service (PaaS), and / or software as a service (SaaS). One or more computing resource services of a computing resource service provider may be accessed by a user via a network, and may include services such as virtual computer system services, block-level data storage services, encryption services, on-demand data storage services, notification services, authentication services, policy management services, task services, and / or other such services. Not all of the described embodiments include all of the described services, and in addition to or as an alternative to the services explicitly described, additional services may also be provided.

[0035] In some examples, an on-demand data storage service is a collection of computing resources that are configured to synchronously process requests to store and / or access data. The on-demand data storage service may allow data to be provided in response to a data request, and may operate using computing resources (e.g., a database) that enable the on-demand data storage service to quickly locate and retrieve data. For example, the on-demand data storage service may maintain the stored data in a manner that enables a data object to be provided in response to the request (or a streaming transmission of a data object may be initiated) when a data object request is retrieved. As noted, the data stored in the on-demand data storage service may be organized into data objects. Perhaps except for certain constraints on size, data objects may have any size. Therefore, the on-demand data storage service may store data objects of many different sizes. The on-demand data storage service may operate as a key-value store that associates a data object with an identifier of the data object, and a client may use the identifier to retrieve or perform other operations in conjunction with a data object stored by the on-demand data storage service.

[0036] A client of a computing resource service provider, such as client 110, may communicate with one or more services via an interface, which may be a web service interface or any other type of client interface. Each service provided by a computing resource service provider may have its own interface, and a subset of services may have corresponding individual interfaces in addition to or as an alternative to a general interface. Client 110 may communicate with the computing resource service provider via a network, which may be a communications network, such as the Internet, an intranet, an Internet Service Provider (ISP) network, and / or some other such network as described below.

[0037] In one embodiment, client 110 is any entity operable to access a system such as VM configuration 104. In some examples, client 110 is an individual, group of individuals, business entity, or other organization that has a business relationship with a computing resource service provider. In the present disclosure, it is contemplated that the use of the term "client" may include a computing device (also referred to as a "client device") that is used to perform operations (e.g., to access services provided by a computing resource service provider) under the control of a client or on behalf of a client. Examples of such computing devices include one or more instances of a physical computing instance (e.g., a physical server computer, a mobile communication device, a laptop computer, a tablet computer, a personal computer, a mainframe, etc.) or one or more instances of a virtual computing instance (such as a virtual machine accessible to a client hosted on one or more computer servers), or other computing systems capable of communicating with services provided by a computing resource service provider. In some examples, a "service" refers to an executing computer application that provides functionality to another computer application.

[0038] In some examples, a virtual machine configuration refers to a virtual machine that has been configured to support one or more operations that are expected to be performed. A virtual machine configuration may be instantiated from a snapshot of a virtual machine stored in an execution state, whereby a specific set of executable software instructions is initiated to a point where a function code is ready / able to be accepted and / or executed to perform a workflow as described in the present disclosure. In some examples, a "snapshot" refers to a serialized representation (e.g., a copy) of the state of a (physical or virtual) computer system or a copy of the execution state of a computer program stored in a volatile or non-volatile storage device (e.g., RAM, a persistent storage device, etc.). In the present disclosure, serialization may refer to the process of converting computer data into a format that can be stored (e.g., in a file or in a memory) or transmitted and reconstructed to produce another instance of the original data. Therefore, a serialized representation of the state of a (virtual or non-virtual) computer system may be the result of converting the state into a data format (e.g., binary, text, etc.), which may be used to recreate or reproduce the state of the computer system starting from the point at which it was serialized.

[0039] In some examples, the term "virtual machine" refers to an emulation in software and / or hardware of a physical computer system, such that software executed in a virtual machine environment behaves as if the virtual machine were a physical computer. A virtual machine may include various virtual computer components, such as one or more virtual processors, virtual memory, or other virtual devices. The virtual processor, virtual memory, and / or other one or more virtual devices may emulate a physical simulation while utilizing the sharing of one or more of the physical processors, memory, or other devices of a host computing device to perform corresponding virtual functions. Virtual machines may be provided to customers of a computing resource service provider via a virtual computer system service, and customers may run operating systems, applications, and / or other such computer system entities on a virtual host.

[0040] Client 110 may communicate with VM configuration 104 via one or more communication networks, such as the Internet. Further, various communications to / from client 110 may be orchestrated by a browser or other application executing on client 110. In one embodiment, client 110 communicates with VM configuration 104 via one or more application programming interfaces (APIs). In some examples, an application programming interface may be a set of subroutine definitions, communication protocols, and / or software tools that provide a method for communication from client 110 and VM configuration 104. Further, in some examples, VM configuration 104 may communicate with services A 106 and B 108 by using one or more APIs.

[0041] In one embodiment, VM configuration 104 performs various functions on behalf of a customer under the control of a service, such as a serverless computing service provided by a computing resource service provider to its customers. Examples of serverless computing services include AWS Lambda, Google Cloud Functions, IBM Cloud Functions, Fn or Fn Project, platform as a service service providers, etc. The serverless computing service may be serverless in that computing resources are dynamically allocated to execute functions (also referred to as serverless computing functions, serverless functions, Lambda functions) triggered by events, such as endpoint invocations from clients (e.g., web API calls made over a network, such as the Internet). In one embodiment, the serverless computing function is triggered when the serverless computing endpoint is invoked, and computing resources are provided in which the function can run in response to detecting the triggering item. Note, however, that the embodiments of the present disclosure are not necessarily limited to use with serverless computing services, and may be implemented on some other virtual computing service platform, such as a software container service or a virtual computer system service. The computing resources utilized may be based on a computing environment suitable for executing the function. The computing resources may be physical, which may include a physical server computer, or virtual, which may include a virtual machine. For example, if the triggered function is written in the Java programming language, the serverless computing service may allocate a Java virtual machine as a resource for running the encoded function.

[0042] In one embodiment, client 110 invokes function 102 through an API call to execute a specified workflow. Function 102 may include one or more operations; these operations may require the use of various services, such as service A 106. In one embodiment, function 102 includes executing one or more operations and storing the state of function 102 after executing one or more operations.

[0043] In various embodiments, the state of function 102 (and other states described in the present disclosure) may be stored using a storage service (such as an on-demand data storage service, a block storage service, an archived data storage service, a database, or other storage on a persistent (non-volatile) storage device or a non-persistent (volatile) storage device). Examples of persistent storage media include one or more of the following: magnetic media (e.g., hard disk drives, floppy disk drives, and associated removable media), optical media (e.g., compact disks (CDs), digital versatile disks (DVDs), Blu-ray disks, etc.), flash memory (e.g., solid-state drives, etc.), holographic data storage devices, and other similar storage media. Examples of non-persistent storage media include static and dynamic random access memory.

[0044] Function 102 may require additional operations to perform the specified workflow; service A 106 may include one or more additional operations. For example, function 102 may store its state (e.g., in memory or persistent storage) and terminate after calling service A 106 (e.g., making a request to service A 106 to perform one or more of its additional operations) and providing a call handle of the stored state of function 102 to service A, so that service A can use the call handle to re-call function 102 when it completes its task, rather than remaining idle while waiting for a response from service A 106. In the present disclosure, a request to service A 106 to perform one or more of its additional operations may be referred to as an "operation request." In an embodiment, an operation request is an asynchronous operation request because the request is for another entity (e.g., service 106, client 110, etc.) to perform one or more sufficiently time-consuming operations, and there is value (e.g., in terms of the cost of a computing resource service provider or a client of a computing resource service provider) for the function / virtual machine to release its allocated real or virtual resources until the entity completes the execution of one or more operations. In some examples, the stored state may be stored in a persistent storage device, accessible through one or more data storage services and / or systems via a wakeup handle. In one embodiment, a wakeup handle is a data object that includes a reference to a resource, such as a snapshot and / or its variants. In some examples, the wakeup handle may be a uniform resource identifier (URI) in a uniform resource name (URN) format.

[0045] In one embodiment, the evoke handle can be passed from function 102 to service A 106 using one or more communication networks, and an API can be used to facilitate communication. Service A 106 can perform one or more operations as part of a specified workflow. In some examples, service A 106 can perform one of one or more services, including data processing, data storage, applications, interfaces, licenses, security policies, encryption, and / or other such services. In one embodiment, when service A 106 performs one or more operations, function 102 is suspended. In some examples, function 102 can be suspended by storing the state of function 102 and then terminating the virtual machine instance on which function 102 is executing.

[0046] In one embodiment, the stored state may be invoked by using a wakeup handle by service A 106. For example, after performing one or more operations, service A 106 may pass various results of one or more operations performed by service A 106 to function 102 that may have been suspended. In one embodiment, function 102 calls (e.g., an API call) to a serverless computing service or other service that executes the function using a wakeup handle of the stored state of function 102 by service A 106 to instantiate function 102A to reinstantiate or wake up. In addition to the wakeup handle, service A 106 may pass various results of one or more operations to function 102A. In this way, the reinstantiated function 102A may utilize various results of one or more operations included by service A 106 to perform one or more functions and / or operations as part of a specified workflow. In addition, in some embodiments, the instantiation of function 102A may include the instantiation of another virtual machine instance to execute one or more functions that function 102A may include. In other embodiments, the stored state may include a snapshot of the virtual machine instance that was executing function 102 when the state was stored, so that when the recall handler is called, the virtual machine instance is also restored. Note, however, that the virtual machine may be restored to execute on a different physical computing device (also referred to as a "host") than the physical computing device that was executing the virtual machine before the snapshot.

[0047] Function 102A may include one or more operations; as noted above, these operations may require the use of various services, which may include service B 108 in addition to service A 106. Also as noted above, in one embodiment, function 102A includes performing one or more operations, and storing a second state of function 102A after performing the one or more operations. The second stored state (which may be referred to as a continuation in some examples) may require additional operations to execute the specified workflow, and service B 108 may include one or more additional operations. For example, function 102A may store its state (e.g., in a memory or persistent storage device) and terminate after calling service B 108 (e.g., making a request to service B 108 to perform one or more of its additional operations), rather than remaining idle while waiting for a response from service B 108. Similar to the above, in the present disclosure, a request to service B 108 to perform one or more of its additional operations may be referred to as an "operation request." In an embodiment, the operation request is an asynchronous operation request because the request is for another entity (e.g., service B 108, customer 110, etc.) to perform one or more sufficiently time-consuming operations, and there is value in the function / virtual machine (e.g., in terms of the cost of the computing resource service provider or the computing resource service provider's customer) to release its allocated real or virtual resources until the entity completes the execution of one or more operations. As explained above, in some examples, the second stored state may be stored in a persistent storage device, accessible via a wake-up handle through one or more data storage services and / or systems. In an embodiment, the wake-up handle of the second stored state may be different from the wake-up handle of the previous stored state. In other embodiments, the second stored state may overwrite the previous stored state, and in such embodiments, the wake-up handle of the second stored state may be the same as the previous wake-up handle. In other embodiments, the wake-up handle of the stored state of function 102A is the same as the wake-up handle of the stored state of function 102, so that the use of the wake-up handle causes the most recently stored state of the function to be awakened.

[0048] In one embodiment, the evoke handle can be passed from function 102A to service B 108 using one or more communication networks, and an API can be utilized to facilitate communication. Service B 108 can perform one or more operations as part of a specified workflow. In some examples, service B 108 can perform one of one or more services, including data processing, data storage, applications, interfaces, licenses, security policies, encryption, and / or other such services. In one embodiment, when service B 108 performs one or more operations, function 102A is suspended. In some examples, function 102A can be suspended by terminating the virtual machine instance on which function 102A is executing.

[0049] In one embodiment, the stored state can be accessed by using a wakeup handle. For example, after performing one or more operations, service B 108 can pass various results of one or more operations included in service B 108 to function 102A that may have been suspended. In one embodiment, function 102A calls (e.g., API calls) to serverless computing services or other services that use the wakeup handle of the stored state of function 102A to instantiate function 102B to reinstantiate or wake up through service 108B. In addition to the wakeup handle, service B 108 can pass various results of one or more operations to function 102B. In this way, the reinstantiated function 102B can utilize the various results of one or more operations included in service B 108 to perform one or more functions and / or operations to complete the specified workflow. In addition, in some embodiments, the instantiation of function 102B may include the instantiation of a virtual machine instance to execute one or more functions that function 102B may include. In other embodiments, the stored state may include the virtual machine instance that was executing function 102 when the state was stored, so that when the evoke handle is called, the virtual machine instance is also resumed. In one embodiment, function 102B completes the specified workflow and returns one or more results of the specified workflow to client 110; after function 102B is completed, the virtual machine instance that was instantiated to execute one or more functions that function 102B may include may be terminated (e.g., by exiting and abandoning any allocated resources). Note that although Figure 1 Two services are depicted, service A 106 and service B 108, but it is contemplated that the techniques described above may involve only a single service or many services greater than two.

[0050] Figure 1An exemplary use case of the system depicted in can be a use case of an online ordering system. Customer 110 can place an order for a product or service through function 102. In order to proceed to the next stage in the workflow, function 102 may need tax information (e.g., sales tax) about the order and may need to make a call to a tax service (e.g., service A 106) for the information. Instead of idly waiting for the tax service to return the tax information, function 102 can store its own saved state (first saved state) and make a call to the tax service, while including a call handle to the first saved state (first call handle). Function 102 and its host virtual machine instance can then terminate. Once the tax service determines the tax information, it can re-invoke the function (e.g., function 102A) using the first call handle and pass the tax information to function 102A. In the use case, function 102A can continue to execute its workflow until it needs to make a call to a discount service (e.g., service B 108) to find out whether customer 110 qualifies for any discounts on the order. As with the tax service, function 102A may store another saved state of itself (a second saved state) and make a call to the discount service, including a call handle to the second saved state (a second call handle), rather than idly waiting for the discount service to return the discount information. Function 102A and its host virtual machine instance may then terminate again. Once the discount service determines the discount information, it may re-invoke a function (e.g., function 102B) using the second call handle and pass the discount information to function 102B. In the use case, function 102B may continue the workflow (e.g., providing a final price for the order, collecting payment from the customer, emailing the customer order details, etc.) to complete the order for customer 110, and terminate upon completion.

[0051] Note that although example 100 depicts two services, service A 106 and service B 108, it is conceivable that the techniques described in this disclosure may be applied to any number of services as needed to complete the workflow. Similarly, the techniques described in this disclosure may be applied only to a single service, such as, for example, an embodiment in which service A 106 is repeatedly called by a function, and when service A 106 responds using a wakeup handle and its response, the function stores its state to recover from the stored state. Additionally or alternatively, the function may wait for a response from a user (such as client 110) rather than waiting for a response from a service. For example, function 102 may pass the wakeup handle of its stored state to the user interface of client 110 and terminate when waiting for client 110 to submit a response. As the client's response is submitted through the user interface, the user interface may call the wakeup handle of the stored state of function 102A to allow it to continue to execute the workflow using the client's information. In this way, the resources allocated to function 102 are released for use for other purposes, and function 102 otherwise will idlely wait for client input.

[0052] Figure 2 200 according to various embodiments. Some or all of process 200 (or any other process described, or variations and / or combinations of those processes) may be performed under the control of one or more computer systems configured with executable instructions and / or other data, and may be implemented as executable instructions that are collectively executed on one or more processors. The executable instructions and / or other data may be stored on a non-transitory computer-readable storage medium (e.g., a computer program permanently stored on magnetic, optical, or flash media).

[0053] For example, some or all of process 200 may be performed by any suitable system (such as a server in a data center), in conjunction with Fig. 9 Various components of the depicted system 900, such as web server 906 or application server 908, multiple computing devices in a distributed system of computing resource service providers, or any electronic client device, such as electronic client device 902. Process 200 includes a series of operations in which the system performing process 200 executes a specified workflow using a continuation workflow.

[0054] In one embodiment, a client 230 invokes 204 a function via an API call 202 to a virtual computing service (e.g., a serverless computing service, a software container service, or a virtual computer system service, etc.) provided by a computing resource service provider to execute a specified workflow. A function may include one or more operations; these operations may require the use of various services, such as service A 234. In one embodiment, a function includes executing one or more operations, and storing 206 a state of the function after executing the one or more operations. The stored state (which may be referred to as a continuation in some examples) may require additional operations to execute the specified workflow; service A 234 may include one or more additional operations. In some examples, the stored state may be stored in a persistent storage device, accessible through one or more data storage services and / or systems via an invocation handle.

[0055] In one embodiment, the stored state can be accessed by using a wakeup handle. The wakeup handle can be passed from the function to the service A 234 via an API using one or more communication networks to facilitate communication between the provider 232 and the service A 234. The service A 234 can perform 210 one or more operations as part of a specified workflow. In some examples, the service A 234 can perform one of one or more services, including data processing, data storage, applications, interfaces, licenses, security policies, encryption, and / or other such services. In one embodiment, when the service A 234 performs one or more operations, the function is terminated 208. In some examples, the function can be terminated 208 by terminating the virtual machine instance on which the function is executed (e.g., by exiting and abandoning any allocated resources).

[0056] After performing one or more operations 210, service A 234 may pass 212 a call-up handle and various results of the one or more operations performed by service A 234 to resume the function that was previously terminated 208. Service A 234 may utilize API calls from one or more APIs to facilitate communication of the results and use of the call-up handle and various results between provider 232 and service A 234 over one or more communication networks. In one embodiment, the function is resumed 214 from the state by utilizing the call-up handle to obtain access to the stored state of the function passed by service A 234. The resumed function may utilize various results of the one or more operations performed by service A 234 and perform one or more functions and / or operations as part of a specified workflow.

[0057] In addition, the recovery 214 of the function may include instantiating a second virtual machine instance different from the first virtual machine instance to execute one or more functions of the function. The different virtual machine instances may also be executed on different physical computing devices ("hosts"). In this way, a virtual computer system service that provides virtual machines to customers may use any available physical host to effectively host functions at different stages of the workflow.

[0058] The resumed function may include one or more operations; these operations may require the use of various services, such as service B 236. In one embodiment, the resumed function includes performing the one or more operations, and storing 216 the state of the resumed function after performing the one or more operations. The stored state (which may be referred to as a continuation in some examples) may require additional operations to perform the specified workflow; service B 236 may perform the one or more additional operations. In some examples, the stored state may be stored 216 in a persistent storage device, accessible through one or more data storage services and / or the system via an invocation handle.

[0059] In one embodiment, the stored state can be accessed by using a wakeup handle. The wakeup handle can be passed from the restored function to service B 236 using one or more communication networks, and an API can be utilized to facilitate communication between provider 232 and service B. Service B 236 can perform 220 one or more operations as part of a specified workflow. In some examples, service B 236 can perform one of one or more services, including data processing, data storage, application programs, interfaces, licenses, security policies, encryption, and / or other such services. In one embodiment, when service B 236 performs one or more operations, the restored function is terminated 218. In some examples, the restored function can be terminated 218 by terminating the virtual machine instance on which the restored function is executed (e.g., by exiting and abandoning any allocated resources).

[0060] After performing one or more operations, service B 236 may pass 222 a wakeup handle and various results of one or more operations included in service B 236 to resume the previously terminated function. Service B 236 may facilitate the communication of the results and use of the wakeup handle and various results to provider 232 using API calls from one or more APIs over one or more communication networks. In one embodiment, access to the stored state of the function passed by service B 236 is obtained by utilizing the wakeup handle, and the function is resumed 224 from the state. The resumed function may utilize various results of one or more operations performed by service B 236 in order to perform one or more functions and / or operations to complete the specified workflow. In addition, the recovery of the function may include instantiating a virtual machine instance to execute one or more functions executed by the function.

[0061] In addition, the recovery 214 of the function may include instantiating a third virtual machine instance different from the first virtual machine instance and the second virtual machine instance to execute one or more functions of the function. The different virtual machine instances may also be executed on different physical hosts. In this way, a virtual computer system service that provides virtual machines to customers can use any available physical host to effectively host functions at different stages of the workflow.

[0062] In one embodiment, the resumed function completes the specified workflow and returns 226 one or more results of the specified workflow to the client 230. It should be noted that in some embodiments, one or more operations performed in process 200 may be performed in various orders and combinations, including in parallel.

[0063] Figure 3300 is a flow chart illustrating an example of a process 300 for continuing a workflow according to various embodiments. Some or all of the process 300 (or any other process described, or variations and / or combinations of those processes) may be performed under the control of one or more computer systems configured with executable instructions and / or other data, and may be implemented as executable instructions that are collectively executed on one or more processors. The executable instructions and / or other data may be stored on a non-transitory computer-readable storage medium (e.g., a computer program permanently stored on magnetic, optical, or flash media).

[0064] For example, some or all of process 300 may be performed by any suitable system (such as a server in a data center), in conjunction with Fig. 9 Various components of the system 900 described (such as web server 906 or application server 908), multiple computing devices in a distributed system of a computing resource service provider, or any electronic client device (such as electronic client device 902). In some of these examples, the system is a system under the management of a virtual computing service (such as a serverless computing service, a software container service, or a virtual computer system service, etc.) provided by the computing resource service provider. Process 300 includes a series of operations, in which the system performing process 300 utilizes continuation to execute a workflow.

[0065] In one embodiment, the system performing process 300 obtains 302 function code for executing a workflow. In some examples, the workflow may include various operations to perform a desired task. The tasks may include, but are not limited to, calculations, derivations, data processing, and / or variations thereof. In addition, the function code may include various operations for executing the workflow. In some examples, the function code may include various operations for inputting and determining various outputs. In addition, the function code may be written in various programming languages ​​(such as Java, JavaScript, Python, C, C++, SQL, Ruby, Perl, and / or variations thereof) and may utilize serverless computing services, such as in conjunction with Figure 1 Describes the serverless computing service.

[0066] In one embodiment, the system receives 304 a request to execute a workflow. In some examples, the system receives the request via one or more communication networks, such as the Internet. The one or more communication networks can utilize various applications, interfaces, and / or APIs to communicate the request to execute a workflow.

[0067] The system may instantiate 306 a configuration to perform a function. In some examples, the system may instantiate one or more physical systems (such as a server computer) and / or one or more virtual systems (such as a virtual machine) to perform the function. After instantiating the configuration, the system may cause 308 the configuration to execute the function to perform at least a portion of the workflow. In some examples, the configuration may execute the function to perform the workflow by executing one or more programs that the function may include. The configuration may utilize one or more applications present on the configuration to execute the function to perform the workflow.

[0068] The system may then determine 310 whether the workflow is complete. For example, if the system has received the required information from services and other sources and has completed the workflow, the system may continue to perform 312 actions based on the results. In some examples, the results may be outputs of the executed workflow generated as a result of one or more functions included in the executed workflow. The system may determine the completion of the workflow based on one or more indicators present on the configuration. In some examples, the completion of the workflow may include the generation of one or more outputs; the detection of the outputs may indicate the completion of the workflow. In addition, in some examples, the system may determine that the workflow is completed by detecting various indicators (such as metadata that may be generated as a result of completing the workflow). For example, if the workflow involves obtaining information from one or more other services (e.g., outside the system executing the function code), once the information from the final service is obtained and processed, the system may determine that the workflow is completed.

[0069] If the workflow is complete, the system may terminate 314 the configuration. In some examples, the configuration may be terminated by terminating one or more systems instantiated as a result of instantiating the configuration (e.g., by exiting and relinquishing any allocated resources). The configuration may include one or more physical systems (such as server computers) and / or one or more virtual systems (such as virtual machines); these systems may be terminated and / or deallocated as a result of termination.

[0070] On the other hand, if the system determines 310 that the workflow is not complete (e.g., if additional information is to be obtained from another service), the system may store 316 the configuration in the most recent state as the next configuration associated with the handle. In various embodiments, the stored configuration may be referred to as a continuation. Further, in various embodiments, the system may store 316 the configuration as a set of differences between the most recent configuration and a previous configuration, rather than storing a complete configuration. In this way, a complete configuration may be recreated by additively combining the previous configuration with the set of differences. For example, a first stored configuration may be a snapshot of a base configuration, a second stored configuration may include a first set of differences between a snapshot of a second running configuration and a snapshot of the first configuration, a third stored configuration may include a second set of differences between a snapshot of a third running configuration and a combination of the first snapshot and the first set of differences, and so on.

[0071] In some examples, the system may store 316 the configuration in a persistent storage device, such as in one or more data storage devices and / or systems. When storing the configuration, a handle, such as a URN, referring to the stored configuration may be generated (e.g., by a data storage service or by a system executing process 300). The handle may be used to restore the stored configuration from the storage device. For example, a call to a virtual computing service including a handle may cause the virtual computing system to determine the location of the stored configuration in the storage device, obtain the stored configuration from the storage device, and use the stored configuration to instantiate a virtual machine and use the function to resume execution from the state in which the stored configuration was stored. As noted above, the virtual machines may not necessarily be instantiated on the same physical host, thereby allowing different physical hosts of a distributed computing system to execute different stages of a function.

[0072] In addition, a workflow may require that one or more additional services (such as Figure 1 317 and service A 106 and service B). Such one or more additional services may include data processing, data storage, applications, interfaces, permissions, security policies, encryption, and / or other such services. In some examples, performing one or more additional services may include submitting 317 a request to a service and passing a handle, which may be represented as an awakening handle, to the service. In this way, a service may re-instantiate a configuration when it completes one or more of its operations. In various embodiments, the system may terminate 318 a configuration to avoid any unnecessary computational or other resource costs that may be incurred by managing an active configuration.

[0073] The system may receive 320 a request with a handle to continue the workflow. In various embodiments, the request may originate from the service to which the request 317 was submitted. Using the handle, the system may then instantiate 322 a next configuration to perform the function from a recent state. In some examples, instantiating the next configuration may include preparing one or more physical systems (such as server computers) and / or one or more virtual systems (such as virtual machines) to perform the function. In one embodiment, the system instantiates the next configuration using a handle included with the request; the handle included with the request may provide the system with access to the most recent state of a previous configuration.

[0074] In one embodiment, the system of execution process 300 causes 324 the next configuration to execute a function to continue the workflow. In some examples, the configuration may execute a function to execute the workflow by executing one or more programs that the function may include. The configuration may utilize one or more applications present on the configuration to execute the function to execute the workflow. After executing the function, the system determines again 310 whether the workflow is complete, and if complete, performs operations 312 and 314 as described in the aforementioned paragraphs. If the workflow requires information from another service, the system may continue to repeat operations 316-324 for another service. It should be noted that in various embodiments, one or more operations performed in process 300 may be performed in various orders and combinations (including parallelism). For example, in some embodiments, a function code for executing the workflow is received together with a request to execute the workflow, and therefore operations 302-4 may be combined.

[0075] Figure 4 An example of linking virtual machines according to one embodiment is shown. Specifically, Figure 4 An example 400 of a system is depicted in which a client 410 causes a VM configuration of a virtual computer system service 405 to execute a specified workflow using a linked virtual machine continuation. In one embodiment, the client 410 is similar to Figure 1 For example, a customer 410 may be an individual, a group of individuals, a business entity, or other organization that has a business relationship with a computing resource service provider, and / or a computing device used by the above entities to perform operations under the control of or on behalf of the customer. Customer 410 may communicate with virtual computer system service 405 via one or more communication networks, such as the Internet. In addition, various communications to / from customer 410 may be orchestrated by a browser or other application executing on a client device of customer 410.

[0076] In one embodiment, virtual computer system service 405 is used by a computing resource service provider to provide computer system resources to clients. Virtual computer system service can provide such computer system resources by instantiating virtual machine instances on physical hardware. The physical hardware may include a physical host, which may include any device or apparatus configured to execute instructions for performing data computing, manipulation, or storage tasks, such as a computer system similar to a computer system in conjunction with a virtual machine. Fig. 9 The computer or server of the electronic client device 902 and application server 908 described above. The computing resource service provider can provide access to the computer system using services such as virtual computer system services, which can be a collection of computer resources configured to instantiate virtual machine instances on behalf of customers. Customers can interact with the virtual computer system service to provide, place and operate virtual machine instances instantiated on physical computer devices hosted and operated by the computing resource service provider.

[0077] In one embodiment, the client 410 communicates with the virtual computer system service 405 through one or more APIs. In some examples, the application programming interface can be a set of subroutine definitions, communication protocols and / or software tools that provide methods for communication from the client 410 and the virtual computer system service 405. In one embodiment, the virtual computer system service 405 includes services that perform various functions, such as serverless computing services. In one embodiment, when the serverless computing endpoint is awakened, the serverless computing function is triggered, and in response to detecting the triggering item, a computing resource in which the function can run is provided. The computing resources can be based on a computing environment suitable for executing the function. The computing resources can be physical, which can include a physical server computer, or virtual, which can include a virtual machine.

[0078] In one embodiment, the client 410 causes the virtual machine 403 managed by the virtual computer system service 405 to invoke the first stage 402A of the function through an API call to perform a specified workflow. For example, the client 410 may be an administrator of the virtual machine 403 and may cause the virtual machine 403 to initiate a workflow (e.g., database operations, etc.) associated with the stages 402A-02N of the function through a graphical user interface (GUI) to the virtual machine 403. In some examples, a database is an organized collection of data, such as tables, queries, reports, views, and other stored objects. As another example, the virtual machine 403 may host a web-based online market, and the client 410 may be an individual who conducts transactions through the web-based online market, and one or more interactions with the web-based online market cause the virtual machine 403 to initiate a workflow associated with the stages 402A-02N of the function to perform transactional operations.

[0079] In some examples, the invocation of the stages 402A-02N of the function by the virtual machine 403 may include causing the virtual machines 404A-04N to be instantiated (e.g., within the virtual computer system service 405 or some other computing system service (such as an event-driven serverless computing service)) to execute the stages 402A-02N of the function starting from the first stage 402A of the function. In various embodiments, the virtual machines 404A-04N are not necessarily instantiated on the same physical host. The first stage 402A of the function may include instantiating the virtual machine 404A to execute the first stage 402A of the function.

[0080] In one embodiment, the first stage 402A of the function includes performing one or more operations; the one or more operations may require the use of one or more services 406 (e.g., in addition to the virtual computer system service 405), which may include one of the following one or more services, including data processing, data storage, applications, interfaces, licenses, security policies, encryption, and / or other such services. For example, the specified workflow may include a multi-stage analysis of a large amount of data stored in one or more services 406. The first stage 402A of the function may utilize one or more services 406 to retrieve a portion of the data and generate results based on the analysis of the data. In various examples, the results of the first stage 402A of the function may be provided to the virtual machine 503 and / or other services or entities for additional processing. After performing one or more operations of the first stage 402A of the function, the state of the first stage 402A of the function may be saved and stored.

[0081] Additionally or alternatively, in various examples, the result of the first stage 402A of the function may be stored with its state so that the next stage of the function can access the result when resuming from the stored state. In some examples, the stored state may be stored in a persistent storage device (such as a data storage system and / or service accessible to the virtual computer system service 405) and may be accessible through a evoke handle that may be passed from the first stage 402A of the function to the virtual machine 403. After performing one or more operations of the first stage 402A of the function and passing the handle to the virtual machine 403, the virtual machine 404A may be terminated (e.g., by exiting and abandoning any allocated resources).

[0082] When the next stage of the workflow is to be executed (e.g., by the second stage 402B of the function), the second stage 402B may be invoked using the passed invocation handle as described in the present disclosure. In some embodiments, the client 410 may invoke the second stage 402B of the function on demand (e.g., by a GUI). In other embodiments, the virtual machine 403 may invoke the second stage 402B of the function after completing the processing of the result received by the virtual machine 403 from the first stage 402A of the function. In one embodiment, the second stage 402B of the function is instantiated using the saved state of the first stage 402A of the function accessed by the invocation handle. The second stage 402B of the function may resume execution from the point where the state of the first stage 402A of the function is stored. In some examples, the invocation of the second stage 402B of the function includes (e.g., by a virtual computer system service, a software container service, a serverless computing service, etc.) instantiating a virtual machine 404B to execute the second stage 402B of the function.

[0083] In one embodiment, the second stage 402B of the function includes performing one or more operations; the one or more operations may require the use of one or more services 406, which may include data processing, data storage, applications, interfaces, permissions, security policies, encryption, and / or other such services. For example, referring back to the above example, the specified workflow may include a multi-stage analysis of a large amount of data stored in one or more services 406. The second stage 402B of the function may utilize one or more services 406 to retrieve another portion of the data and generate a result based on the analysis of the data.

[0084] In various examples, the result of the second stage 402B of the function may be returned to the virtual machine 403 for further processing. In addition, after performing the one or more operations, the state of the second stage 402B of the function may be saved and stored. Additionally or alternatively, in various examples, the result of the first stage 402A of the function may be stored with its state so that the next stage of the function can access the result when resuming from the stored state. In some examples, the stored state may be stored in a persistent storage device (such as a data storage system and / or service accessible to the virtual computer system service 405) and may be accessible through a wakeup handle that may be passed from the second stage 402B of the function to the virtual machine 403. After performing one or more operations of the second stage 402B and passing the handle to the virtual machine 403, the virtual machine 404B may be terminated (e.g., by exiting and abandoning any allocated resources).

[0085] In various embodiments, the client 410 and / or virtual machine 403 may continue to invoke and terminate the function N times until the last stage 402N of the function of the specified workflow is completed. In some examples, the client 410 and / or virtual machine 403 may continue to invoke and terminate any number of functions until the specified workflow is completed. In addition, the client 410 may continue to instantiate and terminate the virtual machine N times (corresponding to the N functions called) until the virtual machine 404N in which the specified workflow is completed. Continuing with the above example, the specified workflow may include analysis of a large amount of data stored in one or more services 406. The client 410 and / or virtual machine 403 may continue to invoke functions and instantiate virtual machines to access portions of the large amount of data stored in one or more services 406 until all of the desired data stored in one or more services 406 is analyzed; the analysis of the desired data stored in one or more services 406 may be completed with the virtual machine 404N including the last stage 402N of the function. After completing the specified workflow, the results of the specified workflow may be returned to the client 410 or to the virtual machine 403 of the virtual computer system service 405, which may return the results to the client 410. In addition, the virtual machine 404N including the last stage 402N of the function may be terminated (e.g., by exiting and relinquishing any allocated resources).

[0086] An exemplary use case for a linked virtual machine configuration as described in the present disclosure may be processing large amounts of data. For example, a large amount of digital images may be stored using a storage service (e.g., one or more services 406), and a client 410 may seek to retrieve all stored digital images containing a "blue car". The first stage 402A may retrieve a first subset of images from the one or more services 406 and determine which digital images in the first subset of images contain enough blue pixels to warrant further processing and return those digital images to the virtual machine 403. The virtual machine 403 may then examine those digital images with enough (e.g., exceeding a threshold) blue pixels to determine whether the blue pixels fit the shape of a "car". After the virtual machine 403 finishes processing the digital images returned by the first stage 402A of the function, the virtual machine 403 may cause the second stage 402B of the function to be invoked to retrieve a second subset of images and filter those digital images to return digital images with enough blue pixels to warrant further processing by the virtual machine 403. This process may continue until the last subset of images is retrieved from the one or more services 406 and processed by the last stage 402N of the function.

[0087] As another example, virtual machine 403 may be executing a process of backing up data objects, and the first stage 402A of the function retrieves a first set of data objects that have not yet been backed up. In the example, the first stage 402A of the function saves its state and returns the first wakeup handle of the saved state and the first set of data objects to virtual machine 403 for backup, and terminates. In the example, after virtual machine 403 has backed up the first set of data objects, it uses the first wakeup handle to invoke the second stage 402B of the function, whereupon the second stage of the function retrieves a second set of data objects that have not yet been backed up. Subsequently, the second stage 402B of the function saves its state and returns the second wakeup handle of the saved state and the second set of data objects to virtual machine 403 for backup, and terminates. In this example, this process may be repeated until all data objects are backed up.

[0088] Figure 5 An example of a fan-out virtual machine according to one embodiment is shown. Specifically, Figure 5 An example 500 of a system is depicted in which a client 510 causes a virtual machine 503 of a virtual computer system service 505 to utilize fan-out virtual machine continuations in a parallel configuration when executing a specified workflow. In one embodiment, the client 510 is similar to Figure 1 Customers 110 and Figure 4 For example, a customer 510 may be an individual, group of individuals, business entity, or other organization that has a business relationship with a computing resource service provider, and / or a computing device used by the above entities to perform operations under the control of or on behalf of the customer. Customer 510 may communicate with virtual computer system service 505 via one or more communication networks, such as the Internet. In addition, various communications to / from customer 510 may be orchestrated by a browser or other application executing on a client device of customer 510.

[0089] In one embodiment, the virtual computer system service 505 is similar to Figure 4405. In one embodiment, the client 510 communicates with the virtual computer system service 505 through one or more APIs. In some examples, the application programming interface can be a set of subroutine definitions, communication protocols and / or software tools that provide methods for communication from the client 510 and the virtual computer system service 505. In one embodiment, the virtual computer system service 505 includes services that perform various functions, such as serverless computing services. In one embodiment, when the serverless computing endpoint is awakened, the serverless computing function is triggered, and in response to detecting the triggering item, a computing resource in which the function can run is provided. The computing resources can be based on a computing environment suitable for executing the function. The computing resources can be physical, which may include a physical server computer, or virtual, which may include a virtual machine.

[0090] In one embodiment, the client 510 causes the virtual machine 503 managed by the virtual computer system service 505 to invoke the first stage 502A of the function through an API call to perform a specified workflow. For example, the client 510 may be an administrator of the virtual machine 503 and may cause the virtual machine 503 to initiate a workflow (e.g., database operations, etc.) associated with the stages 502A-02BN of the function through a GUI to the virtual machine 503. As another example, the virtual machine 503 may host a web-based online market, and the client 510 may be an individual who conducts transactions through the web-based online market, and one or more interactions with the web-based online market cause the virtual machine 503 to initiate a workflow associated with the stages 502A-02BN of the function to perform a transactional operation.

[0091] In some examples, the invocation of the stages 502A-02BA of the function by the virtual machine 503 includes causing the virtual machines 504A-04BN to be instantiated (e.g., within the virtual computer system service 505 or some other computing system service (such as an event-driven serverless computing service)) to execute the stages 502A-02BN of the function starting from the first stage 502A of the function. The first stage 402A of the function may include instantiating the virtual machine 504A to execute the first stage 502A of the function. In various embodiments, the virtual machines 504A-04BN are not necessarily instantiated on the same physical host.

[0092] In one embodiment, the first stage 502A of the function includes performing one or more operations, which may include interacting with one of one or more services (not shown), including data processing, data storage, applications, interfaces, permissions, security policies, encryption, and / or other such services. In various examples, the results of the first stage 502A of the function may be provided to the virtual machine 503 and / or other services or entities for additional processing. In addition, after performing one or more operations of the first stage 502A of the function, the state of the first stage 502A of the function may be saved and stored.

[0093] Additionally or alternatively, in various examples, the results of the first stage 502 of the function may be stored with its state so that the next stage of the function can access the results when resuming from the stored state. In some examples, the stored state may be stored in a persistent storage device (such as a data storage system accessible to the virtual computer system service 505 and / or a random access memory of the service or host computing device), and may be accessible through a wakeup handle that may be passed from the first stage 502A of the function to the virtual machine 503. After executing one or more operations of the first stage 502A of the function and passing the handle to the virtual machine 503, the virtual machine 504A may be terminated in the manner described in the present disclosure.

[0094] In various embodiments, the result of the first stage 502A of the function may include an indication of executing the remainder of the specified workflow in parallel as a set of second stages 502BA-02BN of the function. Thus, when the next stage of the workflow is to be executed, the client 510 and / or the virtual machine 503 may invoke N functions including the set of second stages 502BA-02BN of the function to execute various aspects of the specified workflow in parallel. Each of the set of second stages 502BA-02BN of the function may resume execution from the point where the state of the first stage 502A of the function is stored, but may be configured to perform their respective operations in parallel on different data, or to perform their respective operations in a different manner from the other in the set of second stages. For example, the virtual machine 503 may invoke each of the set of second stages 502BA-02BN of the function using different parameters, which may indicate different data and / or different ways of processing their respective data. In addition, each of the set of second stages 502BA-02BN of the function may be invoked from the same saved state of the first stage 502A of the function.

[0095] In one embodiment, the N functions invoked using the invoke handle passed from the first stage 502A of the function include instantiating N virtual machines, including virtual machines 504BA to virtual machines 504BN. In some examples, the specified workflow may include various operations that can be made more efficient by using parallel processing. The functions of the set of second stages 502BA-02BN including the function can be configured to operate in parallel to provide more efficient processing of the specified workflow. In some examples, the specified workflow may include operations such as data partitioning, synchronization, load balancing and / or variants thereof; these operations can be configured to be executed more efficiently in parallel. After completing the specified workflow, the results of the specified workflow can be returned to the virtual computer system service 505, and the virtual computer system service 505 can return the results to the client 510 and / or the virtual machine 503. In addition, the virtual machines 504BA to 504BN that are instantiated to execute the functions including functions 502BA to 502BN can be terminated.

[0096] Note also that, depending on the particular workflow, some, all, or none of the set of second stages 502BA-02BN of a function may cause their own state to be stored and pass a handle to an entity that can be used to recall their respective stored state prior to termination. In this way, depending on the particular workflow, members of the set of second stages 502BA-05BN of a function may themselves fan out to a third stage of the function, which in turn may fan out to a fourth stage of the function, and so on, as would apply to the workflow. Additionally or alternatively, some, all, or none of the set of second stages 502BA-02BN of a function may cause their own state to be stored and pass a handle that can be used to recall their respective stored state to an entity prior to termination. In this manner, depending on the particular workflow, members of the set of second stages 502BA-05BN of a function may themselves fan out to a third stage of the function, which in turn may fan out to a fourth stage of the function, and so on, as would apply to the workflow. Additionally or alternatively, some, all, or none of the set of second stages 502BA-02BN of a function may cause their own state to be stored and pass a handle to an entity that can be used to recall their respective stored state prior to termination. Figure 4 The described manner passes handles that can be used to recall their respective stored states. Figure 4 and Figure 5 The illustrated embodiments may combine various sequences as appropriate for performing a particular workflow of a function.

[0097] Figure 6 An example of a fan-out virtual machine according to another embodiment is shown. Specifically, Figure 6 An example 600 of a system is depicted in which a client 610 causes a virtual machine 603 of a virtual computer system service 605 to utilize fan-out virtual machine continuations in a parallel configuration when executing a specified workflow. In one embodiment, the client 610 is similar to Figure 1 Customers 110, Figure 4 Customers 410 and Figure 5510. For example, client 610 may be an individual, group of individuals, business entity, or other organization that has a business relationship with a computing resource service provider, and / or a computing device used by the above entities to perform operations under the control of or on behalf of the client. Client 610 may communicate with virtual computer system service 605 via one or more communication networks, such as the Internet. In addition, various communications to / from client 610 may be orchestrated by a browser or other application executing on client 610.

[0098] In one embodiment, the virtual computer system services 605 are similar to Figure 4 Virtual computer system services 405 and Figure 5 505. In one embodiment, the client 610 communicates with the virtual computer system service 605 through one or more APIs. In some examples, the application programming interface can be a set of subroutine definitions, communication protocols and / or software tools that provide methods for communication from the client 610 and the virtual computer system service 605. In one embodiment, the virtual computer system service 605 includes services that perform various functions, such as serverless computing services. In one embodiment, when the serverless computing endpoint is awakened, the serverless computing function is triggered, and in response to detecting the triggering item, a computing resource in which the function can run is provided. The computing resources can be based on a computing environment suitable for executing the function. The computing resources can be physical, which may include a physical server computer, or virtual, which may include a virtual machine.

[0099] In one embodiment, the client 610 causes the virtual machine 503 managed by the virtual computer system service 505 to invoke the first stage 602A of the function through an API call to perform a specified workflow. For example, the client 610 may be an administrator of the virtual machine 603 and may cause the virtual machine 603 to initiate a workflow (e.g., database operations, etc.) associated with the stages 602A-02BB of the function through a GUI to the virtual machine 603. As another example, the virtual machine 603 may host a web-based online market, and the client 610 may be an individual who conducts transactions through the web-based online market, and one or more interactions with the web-based online market cause the virtual machine 603 to initiate a workflow associated with the stages 602A-02BB of the function to perform a transactional operation.

[0100] In some examples, the call of the first stage 602A of the function by the virtual machine 603 includes instantiating a virtual machine 604A to execute the first stage 602A of the function. In one embodiment, the first stage 602A of the function includes performing one or more operations, which may include one of one or more services, including data processing, data storage, applications, interfaces, permissions, security policies, encryption, and / or other such services. In various examples, the results of the first stage 602A of the function are provided to the virtual machine 603 and / or services or entities of the virtual computer system service 605 for further processing. In addition, after executing one or more operations of the first stage 602A of the function, the state of the first stage 602A of the function may be saved and stored. Figure 6 As depicted, multiple states of the first stage 602A of the function may be saved. In an embodiment, states may be stored at different points in time; for example, a state of the first stage 602A may be saved at a first time (t1), and another state of the first stage 602A of the function may be saved at a second time (t2), thereby representing different states of the first stage 602A of the function. Each of the next stages 602BA-02BB of the function may resume execution of one or more operations from the point at which the corresponding state 602BA-02BB was stored.

[0101] In some examples, the stored state may be stored in a persistent storage device (such as a data storage system and / or random access memory of a service or host computing device accessible to virtual computer system service 605) and may be accessible through a waking handle that may be passed from the first stage 602A of the function to virtual machine 603. In various embodiments, virtual machine 604A may cause virtual computer system service 605 to utilize the waking handle to waking up the second stage 602BA and the third stage 602BB of the function using the different saved states of the first stage 602A of the function; the invocation of the function may include instantiating virtual machine 604BA and virtual machine 604BB.

[0102] In some examples, the specified workflow may include various operations that may be made more efficient by or require the use of parallel processing. The functions of the next stage 602BA-02BB of the function may be configured to operate in parallel to perform various processes of the specified workflow. In some examples, the specified workflow may include operations such as data partitioning, synchronization, load balancing, and / or variants thereof; these operations may be configured in parallel to be more efficiently executed. After completing the specified workflow, the results of the specified workflow may be returned to the virtual machine 603, which may return the results to the client 610. In addition, the virtual machine instantiated to execute the stage of the function including function 602BA and function 602BB may be terminated in the manner described in the present disclosure.

[0103] Note also that, depending on the particular workflow, some, all, or none of the next stages 602BA-02BN of the function may cause their own state to be stored and pass handles that can be used to recall their respective stored state to the entity one or more times (similar to the manner described for the first stage 602A of the function) before terminating. In this way, depending on the particular workflow, members of the next stage 602BA-05BN of the function may themselves fan out to the third stage of the function (similar to Figure 5 502BA-02BN and 602BA-02BN), the third stage can then fan out the fourth stage of the function in a similar manner, and so on, as will apply to the workflow. Additionally or alternatively, some, all, or none of the next stages 602BA-02BN of the function can cause their own state to be stored and combined with Figure 4 The described manner passes handles that can be used to recall their respective stored states. Figures 4 to 6 The illustrated embodiments may combine various sequences as appropriate for performing a particular workflow of a function.

[0104] Figure 7 is a swim lane diagram illustrating an example of a process 700 for linking virtual machines according to various embodiments. Some or all of the process 700 (or any other process described, or variants and / or combinations of those processes) may be executed under the control of one or more computer systems configured with executable instructions and / or other data, and may be implemented as executable instructions that are collectively executed on one or more processors. The executable instructions and / or other data may be stored on a non-transitory computer-readable storage medium (e.g., a computer program permanently stored on a magnetic medium, an optical medium, or a flash memory medium).

[0105] For example, some or all of process 700 may be performed by any suitable system (such as a server in a data center), in conjunction with Fig. 9 Various components of the depicted system 900, such as web server 906 or application server 907, multiple computing devices in a distributed system of computing resource service providers, or any electronic client device, such as electronic client device 902. Process 700 includes a series of operations in which the system utilizes linked virtual machines to process a specified workflow.

[0106] In one embodiment, the client 740 invokes 702 the first generation 742A function through an API call to execute the operations included in the specified workflow 704. In some embodiments, the client 740 may be a computing device operated by a customer of a computing resource service provider or other user interacting with the services of the computing resource service provider. In other embodiments, the client 740 may be a virtual machine under the control of a customer of a computing resource service provider.

[0107] The first generation 742A function may include one or more operations and may require instantiation of a virtual machine instance to perform the function. For example, the first generation 742A function may include analyzing a portion of a large set of data. In one embodiment, the first generation 742A function includes performing one or more operations and storing a continuation or state of the 706 function after performing the one or more operations. The stored state (which may be referred to as a continuation in some examples) may be stored by one or more data storage services and / or system storage, and may be accessible by using a wakeup handle.

[0108] The evoked handle may be returned 708 to the client 740; the client 740 may process 712 the information returned by the first generation 742A function to perform one or more operations as part of the specified workflow. After the handle is returned, the called function may be terminated 710. In some examples, the evoked function may be terminated by terminating the virtual machine instance instantiated for the evoked function.

[0109] In one embodiment, the client 740 calls 716 the handle to resume the terminated function. The terminated function can be resumed by instantiating a virtual machine instance to execute the second generation 742B function. In some examples, the invoked handle can be used to continue 714 the operation of the previously terminated function. For example, the previously terminated function may have included a portion of analyzing a large set of data; the continued operation of the second generation 742B function may continue to analyze another portion of the large set of data. In one embodiment, the continued operation of the second generation 742B function includes performing one or more operations, and storing 718 the continuation or state of the second generation 742B function after performing one or more operations. The stored state (which may be referred to as a continuation in some examples) may be stored by one or more data storage services and / or system storage, and may be able to be accessed by using the invoked handle.

[0110] The evoke handle may be returned 720 to the client 740; the client 740 may process 724 the information returned by the second generation 742B function to perform one or more operations as part of the specified workflow. After returning the handle, the second generation 742B function may be terminated 722. In some examples, the second generation 742B function may be terminated by terminating the virtual machine instance instantiated for the function.

[0111] In one embodiment, the client 740 invokes 726 the handle to resume the terminated function. In some examples, the invoke handle can be used to perform the operation of the function 728 N times. In addition, resuming the function N times may include instantiating N virtual machine instances to execute the function. In one embodiment, the client 740 continues to invoke each generation of functions based on the information returned by the previous function. For example, each generation of functions can be used to analyze a large set of data; each generation of functions can be invoked N times in succession until the large set of data is completely analyzed. After completing the operations included in the specified workflow, the invoke handle can be returned 730, and the final generation 742N function can be terminated 732. In addition, the results of each generation of functions can be returned to the client 740 to end 734 execution. It should be noted that in various embodiments, one or more operations performed in the process 700 can be performed in various orders and combinations (including parallel).

[0112] Figure 8 800 for linking virtual machines according to various embodiments. Some or all of process 800 (or any other process described, or variants and / or combinations of those processes) may be performed under the control of one or more computer systems configured with executable instructions and / or other data, and may be implemented as executable instructions that are collectively executed on one or more processors. The executable instructions and / or other data may be stored on a non-transitory computer-readable storage medium (e.g., a computer program permanently stored on a magnetic medium, an optical medium, or a flash memory medium).

[0113] For example, some or all of process 800 may be performed by any suitable system (such as a server in a data center), in conjunction with Fig. 9 Various components of the depicted system 900, such as web server 906 or application server 908, multiple computing devices in a distributed system of computing resource service providers, or any electronic client device, such as electronic client device 902. Process 800 includes a series of operations in which the system performing process 800 executes a workflow using linked virtual machines.

[0114] In one embodiment, the system performing process 800 obtains 802 function code for executing a workflow. In some examples, the workflow may include various operations to perform a desired task. The tasks may include, but are not limited to, calculations, derivations, data processing, and / or variations thereof. In addition, the function code may include various operations for executing the workflow. In some examples, the function code may include various operations for inputting and determining various outputs. In addition, the function code may be written in various programming languages ​​(such as Java, JavaScript, Python, C, C++, SQL, Ruby, Perl, and / or variations thereof) and may utilize serverless computing services, such as in conjunction with Figure 1 Describes the serverless computing service.

[0115] In one embodiment, the system receives 804 a request to execute a workflow. In some examples, the system receives the request via one or more communication networks (such as the Internet). One or more communication networks may utilize various applications, interfaces, and / or APIs to convey the request to execute the workflow. The system may instantiate 806 a configuration to execute a function. In some examples, the system may instantiate one or more physical systems (such as server computers) and / or one or more virtual systems (such as virtual machines) to execute a function. After instantiating the configuration, the system may cause 808 a configuration to execute a function to execute a workflow. In some examples, the configuration may execute a function to execute a workflow by executing one or more programs that the function may include. The configuration may utilize one or more applications present on the configuration to execute the function to execute a workflow.

[0116] After executing the function, the system may receive 810 information and a handle to the next generation including the current configuration in the most recent state. In some examples, the received information may be information generated as a result of executing the function. The system may then process 812 the information to determine the progress of the execution of the workflow. For example, a workflow may include an analysis of a large set of data. The returned information may be an analysis of a portion of the large set of data; the system may then determine that more information is needed 814 including an analysis of the remainder of the large set of data.

[0117] If more information is needed, the system may instantiate 816 the next generation (as the new current configuration) to execute the function from the most recent state. The next generation may utilize the handle to execute the function to perform additional processes of the workflow. Referring to the above example, the workflow may include analysis of a large set of data. The previous configuration may have analyzed a portion of the large set of data; the next generation may execute the function from the most recent state to resume the analysis of the large set of data, thereby processing the remaining portion of the large set of data.

[0118] If no more information is needed, the system can determine that the execution of the workflow has ended, and process 818 is complete. In some examples, the results of the workflow can be returned to the system for further processing. It should be noted that in various embodiments, one or more operations performed in process 800 can be performed in various orders and combinations (including in parallel). For example, in some embodiments, function code for executing the workflow is received together with a request to execute the workflow, and thus operation 802-4 can be combined.

[0119] Note that in the context of describing the disclosed embodiments, unless otherwise specified, the use of expressions regarding executable instructions (also referred to as code, applications, agents, etc.) that perform operations that the "instructions" would not normally perform without assistance (e.g., data transfer, calculations, etc.) indicates that the instructions are being executed by a machine, causing the machine to perform the specified operations.

[0120] As will be appreciated by those skilled in the art in light of this disclosure, certain embodiments may be able to achieve certain advantages, including some or all of the following: (1) The techniques described and suggested in this disclosure improve the field of computing, particularly virtual computing, by storing the state of functions and virtual machines while they are waiting for responses from other services, thereby not incurring computing costs during idle time. (2) In addition, the techniques described and suggested in this disclosure improve the execution efficiency and functionality of multi-stage computer programs by not constraining the computer program to execute all stages on a single physical host; instead, each stage of the multi-stage computer program can be executed by any available physical host with sufficient resources to execute the stage computer program. In this way, such computer programs can be quickly started and executed in a distributed and load-balanced manner. (3) The techniques described and suggested in this disclosure further improve the field of computing services by improving the scalability of workflows, because each stage of the workflow can be run on a different physical host, which means that workflows can be efficiently balanced across large clusters, thereby avoiding the problem of executing long-running workflows on a single host. (4) Furthermore, the techniques described and suggested in the present disclosure must be rooted in computer technology in order to overcome problems caused in particular by computing resources (e.g., memory and / or processor time) that are unavailable for use even if they are idle because they have been allocated to a virtual machine or other computer program that is waiting for a response to a query, after which the virtual machine or other computer program continues to execute its process.

[0121] Fig. 9Shown are various aspects of an exemplary system 900 for realizing various aspects according to one embodiment. As will be appreciated, although a web-based system has been used for the purpose of explanation, various embodiments may be realized using different systems as appropriate. In one embodiment, system 900 includes an electronic client device 902, which includes any suitable device operable to send and / or receive requests, messages or information through a suitable network 904 and to convey information back to the user of the device. Examples of such client devices include personal computers, cell phones or other mobile phones, handheld messaging devices, laptop computers, tablet computers, set-top boxes, personal data assistants, embedded computer systems, e-book readers, etc. In one embodiment, network 904 includes any suitable network, including intranet, the Internet, cellular networks, local area networks, satellite networks or any other such networks and / or their combinations, and the components for such systems depend at least in part on the type of the selected network and / or system. Many protocols and components for communicating through such networks are well known and will not be discussed in detail. In one embodiment, the communication carried out through network 904 is realized by wired and / or wireless connections and their combinations. In one embodiment, the network 904 comprises the Internet and / or other publicly addressable communications network, as the system includes a web server 906 for receiving requests and serving content in response to the requests, although for other networks, alternative devices serving similar purposes may be used, as will be apparent to one of ordinary skill in the art.

[0122] In one embodiment, the system includes at least one application server 908 and a data store 910, and it should be understood that there may be several application servers, layers or other elements, processes or components that may be linked or otherwise configured, which may interact to perform tasks such as obtaining data from an appropriate data store. In one embodiment, the server is implemented as a hardware device, a virtual computer system, a programming module executed on a computer system, and / or other devices configured with hardware and / or software to receive and respond to communications (e.g., web service application programming interface (API) requests over a network). As used, unless otherwise specified or clear from the context, the term "data store" refers to any device or combination of devices capable of storing, accessing and retrieving data, which may include any combination and any number of data servers, databases, data storage devices, and data storage media in any standard, distributed, virtual or clustered system. In one embodiment, the data store communicates with a block-level and / or object-level interface. The application server 908 may include any appropriate hardware, software, and firmware for integrating with the data store 910 as needed to execute aspects of one or more applications for the electronic client device 902, thereby handling some or all of the data access and business logic of the application.

[0123] In one embodiment, the application server 908 cooperates with the data store 910 to provide access control services and generates content including, but not limited to, text, graphics, audio, video, and / or other content, which is provided by the web server 906 to a user associated with the client device in the form of Hypertext Markup Language (HTML), Extensible Markup Language (XML), JavaScript, Cascading Style Sheets (CSS), JavaScript Object Notation (JSON), and / or another appropriate client-side structured language or other structured language. In one embodiment, the content transmitted to the client device is processed by the electronic client device 902 to provide the content in one or more forms, including but not limited to forms that the user can perceive by hearing, vision, and / or other senses. In one embodiment, the handling of all requests and responses and the delivery of content between the electronic client device 902 and the application server 908 are handled by the web server 906 in this example using PHP: Hypertext Preprocessor (PHP), Python, Ruby, Perl, Java, HTML, XML, JSON, and / or another appropriate client-side structured language. In one embodiment, the operations described as being performed by a single device are performed collectively by multiple devices forming a distributed and / or virtual system.

[0124] In one embodiment, data storage area 910 includes several separate data tables, databases, data files, dynamic data storage schemes and / or other data storage mechanisms and media for storing data related to specific aspects of the present disclosure. In one embodiment, data storage area 910 includes a mechanism for storing generated data 912 and user information 916, which are used to provide content for the generation side. Data storage area 910 is also shown as including a mechanism for storing log data 914, which is used for reporting, computing resource management, analysis or other such purposes in one embodiment. In one embodiment, other aspects such as page image information and access rights information (e.g., access control policies or other permission encodings) are stored in data storage area 910, optionally located in any one of the mechanisms listed above or located in another mechanism in data storage area 910.

[0125] In one embodiment, the data store 910 can be operated by logic associated therewith so as to receive instructions from the application server 908 and obtain data, update data or otherwise process data in response to the instructions, and the application server 908 provides static data, dynamic data or a combination of static data and dynamic data in response to the received instructions. In one embodiment, dynamic data such as data used in web logs (blogs), shopping applications, news services and other such applications are generated by a server-side structured language as described or can be provided by a content management system (CMS) operating on or under the control of the application server 908. In one embodiment, a user submits a search request for a certain type of item through a device operated by the user. In this example, the data store 910 accesses user information 916 to authenticate the identity of the user, accesses directory details to obtain information about items of the type, and returns the information to the user, such as in the form of a result list on a web page viewed by the user through a browser on the electronic client device 902. Continuing with the example, information about a particular item of interest is viewed in a dedicated page or window of the browser. However, it should be noted that embodiments of the present disclosure are not necessarily limited to the context of web pages, but are more generally applicable to processing requests in a general manner, where the request is not necessarily a request for content. Exemplary requests include requests to manage and / or interact with computing resources hosted by system 900 and / or another system (such as to launch, terminate, delete, modify, read, and / or otherwise access such computing resources).

[0126] In one embodiment, each server will typically include an operating system that provides executable program instructions for general management and operation of the server, and include a computer-readable storage medium (e.g., a hard disk, random access memory, read-only memory, etc.) that stores instructions that, when executed by a processor of the server (i.e., as a result of being executed), cause the server or otherwise allow the server to perform its intended functions.

[0127] In one embodiment, the system is a distributed and / or virtualized computing system utilizing several computer systems and components that are interconnected by communication links (e.g., Transmission Control Protocol (TCP) connections and / or Transport Layer Security (TLS) or other cryptographically protected communication sessions) using one or more computer networks or direct connections. However, one of ordinary skill in the art will appreciate that such a system may be implemented in environments with more than Fig. 9 The system can be operated in a system with fewer or more components than those shown. Fig. 9 The depiction of system 900 in should be regarded as illustrative in nature and not limiting the scope of the present disclosure.

[0128] Various embodiments may also be implemented in a variety of operating systems, which in some cases may include one or more user computers, computing devices, or processing devices that can be used to operate any of a number of applications. In one embodiment, the user or client device includes any of the following: a number of computers, such as desktop computers, laptop computers, or tablet computers running standard operating systems, and cellular (mobile), wireless, and handheld devices running mobile software and capable of supporting a number of networking protocols and messaging protocols, and such systems include a number of workstations running a variety of commercially available operating systems and any of other known applications for purposes such as development and database management. In one embodiment, these devices also include other electronic devices, such as virtual terminals, thin clients, gaming systems, and other devices capable of communicating over a network, as well as virtual devices, such as virtual machines, hypervisors, software containers utilizing operating system-level virtualization, and other virtual or non-virtual devices capable of supporting virtualization that can communicate over a network.

[0129] In one embodiment, system 900 utilizes at least one network that may be familiar to those skilled in the art to support communication using any of a variety of commercially available protocols, such as transmission control protocol / Internet protocol (TCP / IP), user datagram protocol (UDP), protocols operating in the layers of the open system interconnection (OSI) model, file transfer protocol (FTP), universal plug and play (UPnP), network file system (NFS), common Internet file system (CIFS), and other protocols. In one embodiment, network 904 is a local area network, a wide area network, a virtual private network, the Internet, an intranet, an extranet, a public switched telephone network, an infrared network, a wireless network, a satellite network, and any combination thereof. In one embodiment, a connection-oriented protocol is used to communicate between network endpoints, so that a connection-oriented protocol (sometimes referred to as a connection-based protocol) can transmit data in an ordered stream. In one embodiment, a connection-oriented protocol can be reliable or unreliable. For example, the TCP protocol is a reliable connection-oriented protocol. Asynchronous transfer mode (ATM) and frame relay are unreliable connection-oriented protocols. Connection-oriented protocols are contrasted with packet-oriented protocols (such as UDP) that transmit packets without ensuring ordering.

[0130] In one embodiment, the system 900 utilizes a web server that runs one or more of a variety of server or middle-tier applications, including a Hypertext Transfer Protocol (HTTP) server, an FTP server, a Common Gateway Interface (CGI) server, a data server, a Java server, an Apache server, and a business application server. In one embodiment, one or more servers are also capable of executing programs or scripts in response to requests from user devices, such as by executing one or more web applications implemented in any programming language (such as C, C# or C++) or any scripting language (such as Ruby, PHP, Perl, Python or TCL) and combinations thereof. In one embodiment, the one or more servers also include a database server, which includes but is not limited to database servers that can be accessed from and Purchased servers and open source servers such as MySQL, Postgres, SQLite, MongoDB and any other server capable of storing, retrieving and accessing structured or unstructured data. In one embodiment, the database server includes a table-based server, a document-based server, an unstructured server, a relational server, a non-relational server, or a combination of these and / or other database servers.

[0131] In one embodiment, the system 900 includes a variety of data storage areas as discussed above, as well as other memories and storage media. These may reside in a variety of locations, such as storage media residing locally in one or more of the computers (and / or residing in one or more computers), or residing in storage media remote from any or all of the computers across the network 904. In one embodiment, the information resides in a storage area network (SAN) familiar to those skilled in the art, and similarly, any necessary files for performing functions belonging to a computer, server, or other network device are stored locally or remotely as appropriate. In one embodiment, where the system includes computerized devices, each such device may include hardware elements electrically coupled via a bus, including, for example, at least one central processing unit (CPU or "processor"), at least one input device (e.g., a mouse, keyboard, controller, touch screen, or keypad), and at least one output device (e.g., a display device, printer, or speaker), at least one storage device (such as a disk drive, optical storage device, or solid-state storage device, such as a random access memory (RAM) or read-only memory (ROM)), and removable media devices, memory cards, flash memory cards, etc., and various combinations.

[0132] In one embodiment, such a device also includes a computer-readable storage medium reader, a communication device (e.g., a modem, a network card (wireless or wired), an infrared communication device, etc.), and a working memory as described above, wherein the computer-readable storage medium reader is connected to or configured to receive a computer-readable storage medium, and the computer-readable storage medium represents a remote, local, fixed and / or removable storage device and a storage medium for temporarily and / or more permanently containing, storing, transmitting and retrieving computer-readable information. In one embodiment, the system 900 and various devices generally also include numerous software applications, modules, services or other elements located in at least one working memory device, including an operating system and applications, such as a client application or a web browser. In one embodiment, custom hardware is used, and / or specific elements are implemented in hardware, software (including portable software, such as applets), or both. In one embodiment, a connection with other computing devices (such as network input / output devices) is used.

[0133] In one embodiment, storage media and computer-readable media for containing code or portions of code include any suitable media known or used in the art, including storage media and communication media, such as but not limited to volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing and / or transmitting information (such as computer-readable instructions, data structures, program modules or other data), including RAM, ROM, electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage device, magnetic cassette, magnetic tape, magnetic disk storage device or other magnetic storage device, or any other medium that can be used to store the desired information and can be accessed by the system device. Based on the disclosure and teachings provided, those of ordinary skill in the art will understand other ways and / or methods to implement various embodiments.

[0134] Fig.10 An exemplary system 1000 is shown in which various embodiments of the present disclosure may be practiced. Fig.10 As shown, the system 1000 may include client code 1020 (also referred to herein as “client-provided software code”) provided by a client 1010 via a network 1032. The client code 1020 may be submitted to an application programming interface 1030 exposed by a storage service 1006 of a computing resource service provider 1002. The client code 1020 may be executed by a virtual machine 1018 instantiated on a host machine 1014 of the storage service 1006. The virtual machine 1018 may be derived from an image 1024 stored in an image repository 1028. When a client virtual machine 1008 running on behalf of the client 1010 under the virtual computer system service 1004 receives a request 1012 (e.g., via an application programming interface 1030), the virtual machine 1018 may execute the client code 1020. The client code 1020 may be configured to perform, for example, a query 1026 against a data store 1016 of the storage service 1006. The results of the query (data 1022) can then be provided back to the client virtual machine 1008 (e.g., via an application programming interface 1030) to satisfy the request 1012. In some embodiments, the dashed line indicates that the data store 1016 is located on the host machine 1014, while in other embodiments, the data store 1016 can be located at a computing device different from the host machine 1014 executing the virtual machine 1018.

[0135] Computing resource service provider 1002 can be an entity that provides one or more computing resource services to its client individually or as a combination of services of a distributed computer system. Examples of the types of computing resources provided by the computing resource service provider include infrastructure as a service (IaaS), platform as a service (PaaS) and / or software as a service (SaaS). One or more computing resource services of the computing resource service provider can be accessed by users through a network, and can include the following services: such as virtual computer system services 1004, block-level data storage services, encryption services, on-demand data storage services (such as storage services 1006), notification services, certification services, policy management services, task services and / or other such services. Not all of the described embodiments include all of the described services, and in addition to the services clearly described or as an alternative to the services clearly described, other services can also be provided.

[0136] In some examples, a "service" refers to an executing computer application that provides functionality to another computer application. In some examples, a "client" or "client device" refers to a computing system that utilizes the aforementioned service. For example, a client 1010 can use a client to send communications to and receive communications from the services of a computing resource service provider 1002.

[0137] The client 1010 of the computing resource service provider 1002 can communicate with one or more services through an interface (e.g., an application programming interface 1030), which can be a web service interface or any other type of client interface. Each service provided by the computing resource service provider can have its own interface, and a subset of services can have corresponding individual interfaces in addition to or as an alternative to the general interface. The client 1010 can communicate with the computing resource service provider 1002 through a network 1032. The network 1032 can be a communication network between the client 1010 and the computing resource service provider 1002. Examples of networks include the Internet, an intranet, an Internet service provider (ISP) network, a local area network, a wide area network, a Wi-Fi network, or other such networks.

[0138] A computing resource service provider may use virtual computer system service 1004 to provide virtual computer system resources to client 1010. Virtual computer system service may provide such computer system resources by instantiating virtual machine instances (such as client virtual machine 1008) on physical hardware. The physical hardware may include a physical host, which may include any device or apparatus configured to execute instructions for performing data computing, manipulation, or storage tasks, such as a computer system similar to a computer system in conjunction with a virtual machine. Fig. 9The depicted electronic client device 902 or application server 908 may be a computer or server. In an embodiment, the virtual computer system service 1004 may include a collection of computer resources (such as a physical host) configured to instantiate a client virtual machine 1008 on behalf of a client 1010 .

[0139] Client 1010 can interact with virtual computer system service 1004 to provide, place and operate virtual machine instances instantiated on physical computer devices hosted and operated by computing resource service providers. Client 1010 can communicate with virtual computer system service 1004 through an application programming interface different from application programming interface 1030 of storage service 1006. Virtual machine instances (such as client virtual machines 1008) hosted by virtual computer system service 1004 can be used for various purposes, such as operating as servers to support websites, operating business applications or generally being used as computing power for clients. Other applications of such virtual machine instances can be to support database applications, e-commerce applications, business applications and / or other applications.

[0140] The storage service 1006 may be an on-demand data storage service that includes a collection of computing resources configured to synchronously process requests for storage and / or access to data. The storage service 1006 may allow data to be provided in response to a data request using computing resources (e.g., a database) that enable the storage service 1006 to quickly locate and retrieve data. For example, the storage service 1006 may maintain the stored data in a manner that provides a data object (or initiates streaming of a data object) in response to a data object request when receiving a data object request. As noted, the data stored in the storage service 1006 may be organized into data objects. Perhaps except for certain constraints on size, the data object may have any size. Therefore, the storage service 1006 may store data objects of many different sizes. The storage service 1006 may operate as a key-value store that associates a data object with an identifier of the data object, and the client 1010 may use the identifier to retrieve or perform other operations in conjunction with the data object stored by the storage service 1006.

[0141] The client virtual machine 1008 may be a virtual machine instance executed under the virtual computer system service 1004 on behalf of the client 1010. In some examples, the term "virtual machine" refers to an emulation in software and / or hardware of a physical computer system, so that the software executed in the virtual machine environment behaves as if the virtual machine is a physical computer. The virtual machine may include various virtual computer components, such as one or more virtual processors, virtual memory, or other virtual devices. The virtual processor, virtual memory, and / or other one or more virtual devices may simulate a physical simulation while utilizing the sharing of one or more of the physical processor, memory, or other devices of the host computing device to perform corresponding virtual functions. The virtual machine may be provided to a client of the computing resource service provider 1002 via the virtual computer system service 1004, and the client may run an operating system, application program, and / or other such computer system entities on the virtual machine.

[0142] In some examples, the term "virtual machine instance" refers to a virtual machine that is instantiated and executed on a host computer system. The virtual machine instance can be used for various purposes, such as operating as a server to support a website, operating a business application, or generally serving as computing power for a client. Other applications of the virtual machine instance can be to support database applications, e-commerce applications, business applications, and / or other applications.

[0143] The customer 1010 may be an individual associated with a customer account of the computing resource service provider 1002, or may be another entity (e.g., an individual, a device, an application, etc.) that is authorized to act on behalf of the individual associated with the customer account. In addition, the resources of the customer 1010 (e.g., the customer virtual machine 1008) may be available to other users. For example, the customer 1010 may utilize the customer virtual machine 1008 to provide a website that other users may access; these other users utilize the website to perform various operations (e.g., to buy / sell goods or services, upload / download data, stream digital media, etc.). The customer 1010 may communicate with the services of the computing resource service provider 1002 via the network 1032.

[0144] Request 1012 may be a request that causes virtual machine 1018 to perform a query on data in data store 1016 using client code 1020. For example, request 1012 may include a set of parameter values ​​that are passed as input to the client code being executed. The set of parameter values ​​may include information such as one or more of the following: a location (e.g., a uniform resource indicator (URI) of data in data store 1016), an identifier of a record, search criteria (e.g., a keyword, a date / time range, mathematical symbols ("<", ">", "=", etc.), wildcards (e.g., "*", "?", "%", etc.), etc.), a field name, a data store name, and the like.

[0145] Host 1014 may be a device or apparatus of one or more such host machines (also referred to as a "cluster" of hosts) of storage service 1006. Host 1014 may be configured to instantiate one or more virtual machine instances. Fig. 9 The electronic client device 902 and the computer or server of the application server 908 are depicted. The computing resource service provider 1002 can provide access to the host machine 1014 through an application programming interface 1030. The client 1010 can interact with the virtual machine 1018 service to execute custom software code to query the data storage area 1016 of the storage service 1006 operated by the computing resource service provider.

[0146] Data storage area 1016 can be a repository of data objects, such as database records, flat files, and other data objects. Examples of data storage areas include file systems, relational databases, non-relational databases, object-oriented databases, comma-delimited files, and other files. In an embodiment, data storage area 1016 is a distributed data storage area, wherein the portion of data stored in the distributed data storage area is distributed and / or replicated across multiple storage devices and / or computing devices. In some embodiments, host machine 1014 is one of the computing devices storing the portion of data. In other implementations, host machine 1014 is a computing device separate from the computing device storing the portion of data.

[0147] Client code 1020 may be a set of computer executable instructions comprising a computer program (also referred to as an "application") that is executed by a computer system, such as virtual machine 1018. In an embodiment, client code 1020 is designed to be executed by a particular system configuration, such as virtual machine 1018, to perform queries, such as query 1026, on data in data store 1016. For example, client code 1020 may be designed to decompress a data object that has been stored compressed using a particular file compression format (e.g., gzip, Lempel-Ziv (LZ), LHA, etc.), recompress the data object using a different file compression format, and write the recompressed data object back to data store 1016. As another example, client code 1020 may be designed to update encrypted data to use a new encryption key (e.g., key rotation) by: reading an encrypted data object from data store 1016; decrypting the encrypted data object using the old key; re-encrypting the decrypted data object using the new key; and writing the re-encrypted data object back to data store 1016.

[0148] Virtual machine 1018 may be a virtual machine similar to client virtual machine 1008, except that virtual machine 1018 executes on host machine 1014 of storage service 106, but is instantiated upon request 1012 to execute client code 1020 and is terminated or paused (depending on the particular implementation) upon completion of execution of client code 1020. Virtual machine 1018 may be one of one or more virtual machines executing concurrently on host machine 1014. In some cases, multiple virtual machines similar to virtual machine 1018 may execute concurrently on host machine 1014 on behalf of client 1010. Each of the multiple virtual machines executing on host machine 1014 may be executing client code 1020 or may be executing different client code.

[0149] In some cases, virtual machine 1018 may be executed concurrently with one or more other virtual machines belonging to another customer on host machine 1014. For example, like the host hosting customer virtual machine 1008, host machine 114 may be multi-tenant, such that the host may allow one or more virtual machines provided by the computing resource service to multiple customers to run concurrently.

[0150] The virtual machine 1018 may be specific to the customer 1010, such that the virtual machine 1018 is dedicated to running on behalf of the customer 1010 rather than being usable by more than one customer of the computing resource service provider. The virtual machine 1018 may be constrained to have a specified number of virtual processors and a specified amount of virtual memory, which may vary based on the type of service level agreement (SLA) signed between the customer 1010 and the computing resource service provider 1002.

[0151] The virtual machine 1018 can be "isolated" from other virtual machines running on the host so that the virtual machine 1018 can only be authorized to access resources (e.g., data storage areas, etc.) that the client 1010 has access to. In some embodiments, processor affinity can be used to help isolate the virtual machine and / or isolate the client code 1020 from other clients to bind the virtual machine process to a specified central processing unit and unbind it. In this way, the data of one client is protected from access by another client or entity. In some embodiments, the virtual machine of the host machine 114 is implemented using hardware virtualization (e.g., Intel VT-x, IntelAPICv, AMD-V, AMD AVIC, Via VT, etc.).

[0152] In some examples, "multitenancy" refers to multiple customers of the computing resource service provider 1002 that run separate virtual machines simultaneously on the same host machine. For example, each host can run a virtualization layer such as a hypervisor or a virtual machine manager, which enables the physical hardware of the host computing system to be used to provide computing resources on which one or more virtual machines can operate. The virtualization layer can be any device, software, or firmware for providing a virtual computer platform for a virtual machine. In some embodiments, the virtualization layer is a kernel-based virtual machine (KVM) infrastructure of the Linux kernel. Therefore, the host machine 1014 can execute the virtual machine 1018 simultaneously with one or more other virtual machines corresponding to other customers of the computing resource service provider 1002.

[0153] Image 1024 can be a snapshot of the state of a system (e.g., virtual machine 1018) at a specific point in time. Image 1024 can be used to restore the system to its state at a specific point in time. Fig.10 In the example shown, virtual machine 1018 is launched from image 1024 retrieved from image repository 1028 .

[0154] Query 1026 may be an operation performed on data stored in data store 1016 initiated by execution of client code 1020. Note that query 1026 may be one or more queries performed by execution of client code 1020. For example, client code 1020 may be designed to read a data object from data store 1016, modify a data object, write a modified data object back to the data store, read another data object from data store 1016, etc. Thus, query 1026 may represent any operation that may be performed on data in data store 1016, such as read, write, insert, delete, etc.

[0155] Data 1022 may be the result of query 1026. Depending on the type of query, in some cases, data 1022 may be a confirmation that the queried data is present or absent in data store 1016. In other cases, query 1026 may have been a get (also referred to as a "get") query, in which case data 1022 may be data retrieved from data store 1016 as a result of successful execution of query 1026. In other examples, in addition to executing query 1026, execution of client code 1020 may also modify data retrieved from data store 1016; for example, execution of client code 1020 may redact or otherwise omit sensitive information from the results of query 1026 of data 1022, such as by replacing a social security number with "xxx-xx-xxxx".

[0156] Image repository 1028 may be a data store that stores one or more images of different virtual machine configurations, such as image 1024. In some embodiments, image repository 1028 is located on the same host machine that hosts virtual machine 1018. In other embodiments, the images may be located on a separate device.

[0157] In some embodiments, the services provided by the computing resource service provider may include one or more interfaces, such as application programming interface 1030, which enables customers to submit requests by, for example, calling an appropriately configured application programming interface (API) for various services. Application programming interface 1030 may be a set of subroutine definitions, communication protocols, and / or software tools that provide methods for communicating with components of storage service 1006. In addition, each service may include one or more service interfaces that enable services to access each other (e.g., enabling the client virtual machine 1008 of virtual computer system service 1004 to store data in storage service 1006 or retrieve data from storage service 1006 and / or access one or more block-level data storage devices provided by block-level data storage service). Each service interface may also provide secure and / or protected access to each other through encryption keys and / or other such secure and / or protected access methods, thereby achieving secure and / or protected access between them. A collection of services that operate in collaboration as a distributed computer system may have a single front-end interface and / or multiple interfaces between the elements of the distributed computer system.

[0158] Embodiments of the present disclosure may be particularly advantageous in situations where the size (e.g., in bytes) of a set of executable software instructions is smaller than the data being accessed, because less data may need to be transmitted over the network. For example, 20 kilobytes of executable software instructions may be used to read, search, and / or modify 5 gigabytes of data stored in the data storage area 1016. If the 20 kilobytes of executable software instructions are executed at the virtual computer system service 1004, 5 gigabytes of data may need to be transmitted between the storage service 1006 and the client virtual machine 1008 of the virtual computer system service 1004 over the network (e.g., a local area network), thereby occupying bandwidth available to other customers of the computing resource service provider 1002. Alternatively, if 20 kilobytes of data are transferred from the client virtual machine 1008 to the storage service 1006 (where they are executed by the host machine 1014 hosting the data storage area 1016), 5 gigabytes of data only need to be transferred between the internal buses of the host 0 itself, which is much faster than having to transfer the data to the client virtual machine 1008 and can save internal network bandwidth for other customers of the computing resource service provider 1002.

[0159] As Fig.10 In an illustrative example of a workflow of a system 1000, a customer 1010 may provide a computing resource service provider 1002 with customer code 1020 that submits a query to obtain a data object from a data store 1016. In the illustrative example, the customer 1010 also has a customer virtual machine 1008 that hosts a website, and the website submits a request 1012 to the storage service 1006 to execute the customer code 1020 based on input from a user of the website. For example, the request 1012 may be to obtain a data object associated with the user (e.g., profile information, account settings, etc.). In the illustrative example, upon receiving the request 1012, the storage service 1006 selects a host machine 1014 and sends a command to cause the host machine 1014 to instantiate a virtual machine 1018 to execute the customer code 1020, thereby causing data 1022 to be obtained from the data store 1016. Then, in the illustrative example, the storage service 1006 provides the data 1022 back to the customer virtual machine 1008 that submitted the request 1012.

[0160] An exemplary use case may be that a customer 1010 may have access to a large number of images stored in a data store 1016, and may be utilizing a customer virtual machine 1008 to execute a machine learning algorithm to identify certain objects (e.g., blue cars) within the images. However, rather than transferring each image from the data store 1016 to the customer virtual machine 1008, the customer 1010 provides a customer code 1020 that executes a splash screen of images. For example, the customer virtual machine 1008 may send a request 1012 to retrieve the images, which may cause the customer code 1020 to execute on the host machine 1014 and retrieve each customer image from the data store 1016, and only transfer images that meet a filter criteria (e.g., rejecting images that contain no more than a certain number of blue pixels) back to the customer virtual machine 1008.

[0161] Fig.11 An example 1100 of an embodiment of the present disclosure is shown. Specifically, Fig.11 Depicted is a base virtual machine 1118 used to create specific virtual machine configurations 1130A-1130N and derived specific virtual machine configurations 1134A-1134M, as shown in reference Fig.14The basic virtual machine 1118 may include a hardware virtualization state that has been started with the kernel and is paused in a state ready to be configured with an operating system and / or other applications and libraries. The basic virtual machine 1118 may be stored as a snapshot image in a paused state and may be restored according to the number of times required to configure a specific virtual machine configuration 1130A-1130N. In some embodiments, the basic virtual machine 1118 may be shared by multiple or all customers of a computing resource service provider. In some embodiments, customers of a computing resource service provider may be provided with their own single basic virtual machine by the computing resource service provider.

[0162] Each of the specific virtual machine configurations 1130A-1130N may be derived from the base virtual machine 1118. For example, for each of the specific virtual machine configurations 1130A-1130N, a virtual machine may be instantiated from a snapshot image of the base virtual machine 1118, an operating system may be installed to the virtual machine, and any software required to execute a specific set of executable software instructions as described in the present disclosure (e.g., a command interpreter, a code library, etc.) may be installed. Each of the specific virtual machine configurations 1130A-1130N may be paused, and the specific virtual machine configuration reaches a stable state. In some examples, a "stable state" refers to an execution state of a virtual machine whereby the software required to execute a specific set of executable software instructions (e.g., an operating system, a compiler, etc.) is booted to a point where it is ready / able to receive and execute a set of executable software instructions (e.g., client code 1020) to execute (referred to as a "stable state" in the present disclosure). For example, for a specific virtual machine configuration 1130A, a virtual machine can be instantiated from the basic virtual machine 1118, and a set of software applications (e.g., a RedHat Linux operating system, a Python command interpreter, an application programming interface configured to receive a set of software instructions and provide the set of software instructions to Python, and other software for a specific configuration) can be installed and executed on the started virtual machine. At the point in time when the set of software applications is ready / able to receive and execute the set of software instructions, it can be said that the virtual machine of the present disclosure is in a stable state at the specific point in time.

[0163] The state of each specific virtual machine configuration may be stored and distributed to one or more hosts of a computing resource service provider, so that each specific virtual machine configuration may be instantiated (e.g., Fig.12 A shared static specific virtual machine configuration 1218) is used to execute a set of executable software instructions. In some examples, a "clone" refers to the state of a specific virtual machine that has been distributed / copied to one or more host machines. Thus, multiple such clones can each be instantiated sequentially or simultaneously to start execution from the (same) state of the specific virtual machine configuration.

[0164] The derived specific virtual machine configurations 1134A-1134M are presented to illustrate that additional virtual machine configurations may be derived from a specific virtual machine configuration (in this illustrative case, specific virtual machine configuration 1130A). For example, specific virtual machine configuration 1130A may be a virtual machine configured with a Linux operating system capable of executing standard Python software code. The derived specific virtual machine configuration 1134A may be Linux capable of executing Python software code with added support for Python cryptographic libraries, the derived specific virtual machine configuration 1134M may be Linux capable of executing Python software code as well as capable of executing C software code, and so on. Thus, virtual machine configurations may be derived from other virtual machine configurations, all growing downward from base virtual machine 1118.

[0165] In an embodiment, specific virtual machine configurations 1130A-1130N and 1134A-1134M derived from a base virtual machine 1118 may be stored as a set of differences between them and the base virtual machine 1118 and / or a parent virtual machine. In this way, specific virtual machine configurations 1130A-1130N and 1134A-1134M may be recreated by applying the differences (deltas) to the base virtual machine 1118. In this way, memory and other storage resources may be saved because the system of the present disclosure does not need to store the entire virtual machine image of the specific virtual machine configurations 1130A-1130N and 1134A-1134M, only their differences from the base virtual machine 1118.

[0166] Fig.12 One aspect of a system 1200 in which embodiments may be practiced is described. Specifically, Fig.12 The Copy-on-Write (CoW) aspect of certain embodiments of the present disclosure is shown, which provides the benefit of being able to quickly and efficiently instantiate and run clone virtual machines 1232 while effectively utilizing memory resources. Fig.12 In the example, the shared static virtual machine-specific configuration 1218 can be used to instantiate any number of running clone virtual machines 1232 under the state of the shared static virtual machine-specific configuration 1218 .

[0167] Shared static specific virtual machine configuration 1218 can be an instantiation of a memory representation of a specific virtual machine configuration (as described in the present disclosure) in its suspended state (e.g., memory contents, processor registers, etc.). In some embodiments, shared static specific virtual machine configuration 1218 is built from a base image and a delta from the base image corresponding to the specific virtual machine configuration. In other embodiments, shared static specific virtual machine configuration 1218 is loaded from a single specific virtual machine configuration image.

[0168] For example, Fig.10The computing resource service provider 1002 of the computing resource service provider may have a number of stored specific virtual machine configurations as increments together with the corresponding base image or as an entire image (e.g., virtual machine 1018) that can be selected by its customers for executing various sets of executable software instructions (such as the set of executable software instructions 1220). The computing resource service provider may distribute the specific virtual machine configuration to one or more host machines of the data storage service of the computing resource service provider. Upon receiving a request to execute the set of executable software instructions 1220 from a customer of the data storage service (such as customer 1010), the host machine 1214 may read the shared static specific virtual machine configuration 1218 into the CoW page of the memory (from the local persistent storage device). Note that if the shared static specific virtual machine configuration 1218 is already in the memory, this operation may not be required. In some embodiments, the shared static specific virtual machine configuration 1218 may be preloaded in the volatile memory in anticipation of receiving a request to instantiate and run the cloned virtual machine 1232 to execute the set of executable software instructions 1220.

[0169] Once in the CoW memory, the shared static virtual machine-specific configuration 1218 can be used to start one or more running clone virtual machines 1232 to execute the set of executable software instructions 1220. In some examples, "copy on write" refers to a technique that makes data read-only ("static") until the data is modified (e.g., "written"). The modified data is then "copied" to a read-write location, and subsequent read and write operations can be performed on the modified data at the read-write location. In this way, the running clone virtual machines 1232 can share and utilize the shared static virtual machine-specific configuration 1218 for their instances in read-only memory, except for the portions they write, which can be copied to a separate read-write memory space specific to the running clone virtual machine. Thus, the running clone virtual machines 1232 Fig.12 12 is depicted as a partial representation of a virtual machine. By sharing the shared static virtual machine-specific configuration 1218 in this manner, the memory of the host machine 1214 can be more efficiently utilized because additional memory can be allocated only to data that is modified from the original configuration of the shared static virtual machine-specific configuration. In some embodiments, VirtIO's kernel-based virtual machine (KVM) shared memory technology is used to allow read and write operations to be performed both inside and outside the management virtual machine.

[0170] The running clone virtual machines 1232 may be N virtual machines instantiated from the shared static specific virtual machine configuration 1218 to execute the set of executable software instructions 1220. Once a clone of a specific virtual machine configuration is instantiated, its state may be different from other instantiated clones of the same specific virtual machine configuration; therefore, such instantiated clones may be referred to herein as "running clones". In some embodiments, the shared static specific virtual machine configuration and the running clone virtual machines 1232 may represent a single customer such as Fig.10 1210. However, because the shared static specific virtual machine configuration 1218 can be CoW, the shared static specific virtual machine configuration 1218 can be shared between different customers' running clone virtual machines 1232 without risk of compromising customer data, because the read-write portions of the memory allocated to the running clone virtual machines 1232 can be isolated from each other. Therefore, each customer can provide a different set of executable software instructions to their respective running clone virtual machines while still sharing the shared static specific virtual machine configuration 1218. In addition, the running clone virtual machines 1232 can each be provided (e.g., by the host 1214) with a copy of the set of executable software instructions 1220 ready to execute upon request (e.g., upon receiving the set of parameter values ​​1212). In this way, because the running clone virtual machines 1232 are already ready to execute the set of executable software instructions 1220, the delay between the request and execution of the set of executable software instructions 1220 can be reduced. In some embodiments, a base image rather than a shared static specific virtual machine configuration 1218 may be loaded into a CoW page as a static base image, and a delta containing differences from the base image specific to the specific virtual machine configuration may be loaded into a non-CoW to create a running clone virtual machine 1232.

[0171] Host 1214 may be a physical computing system similar to host 1014 that is configured to represent another entity (such as Fig.10 As noted, the host 1214 may be multi-tenant, such that the running cloned virtual machine 1232 may be associated with multiple customers of a computing resource service provider that manages the host 1214 or other authorized entity.

[0172] Data storage area 1216 may be similar to Fig.10 In some implementations, the data store 1016 may be a member of a distributed data store that stores data associated with running the cloned virtual machine 1232 (e.g., Fig.10For example, the customer's data may be distributed in multiple data storage areas of multiple host machines of the data storage service. In some embodiments, at least a portion of the customer's data may be stored locally on the host machine 1214, while other portions of the customer's data may be stored on different host machines of the data storage service. Therefore, in such embodiments, the set of executable software instructions 1220 executed by the running clone virtual machine 1232 may access the data storage area 1216 to obtain the locally stored data portion, but may access the data storage area of ​​a different host machine to obtain the portion of the customer's data stored in the different host machine.

[0173] Note, however, that while embodiments of the present disclosure are described as running on a host machine 1214 of a storage service, it is contemplated that the techniques described in the present disclosure may be applied to quickly and efficiently execute the set of executable software instructions 1220 in a running clone virtual machine 1232 on a host machine 1214 of other services provided by a computing resource service provider. For example, using a static specific virtual machine configuration 1218 in a CoW page of memory, one or more running clone virtual machines 1232 may be instantiated using a shared static specific virtual machine configuration 1218 in a virtual computer system service in a few milliseconds or less. Furthermore, once each of the running clone virtual machines 1232 completes its task, it may be quickly terminated and its respective modified memory pages may be wiped / erased (e.g., rewritten with zeros), deallocated from its assigned clone virtual machine, and reused for other purposes. In this way, embodiments of the present disclosure may allow a customer to cause the set of executable software instructions 1220 to execute and exit quickly, thereby freeing up resources (e.g., memory space, processor capacity, etc.) to allow other customers sharing either or both of the host machine 1214 and the shared static specific virtual machine configuration 1218 to execute their own sets of executable software instructions.

[0174] In some embodiments, as noted above, upon completion of execution of the set of executable software instructions 1220, the running clone virtual machine 1232 may be paused and / or stored. Upon a subsequent request to execute the set of executable software instructions 1220, the paused running clone virtual machine may be unpaused and caused to re-execute the set of executable software instructions 1220.

[0175] The set of executable software instructions 1220 may be similar to Fig.10The executable program code of the customer code 1020 of the running clone virtual machine 1232. In an embodiment, the set of executable software instructions 1220 may be provided by a customer associated with the running clone virtual machine 1232 to a computing resource service provider hosting the host machine 1214. In other implementations, the computing resource service provider may provide pre-approved sets of executable instructions for its customers to select for execution in the running clone virtual machine 1232. In some implementations, the set of executable software instructions 1220 may be accompanied by a set of parameter values ​​1212 or may be configured to receive the set of parameter values ​​1212 when executed.

[0176] The set of parameter values ​​1212 may be a set of values ​​that a client passes as input to the set of executable software instructions 1220 for execution. Fig.10 1012. For example, the set of parameter values ​​may include search criteria, filter criteria, values ​​specifying how to modify customer data, or any other parameter values ​​that the set of executable software instructions 1220 would be designed to receive. Note that each running clone virtual machine 1232 may receive the same or different parameter values. For example, a first running clone virtual machine may receive a parameter value indicating a search for last names beginning with the letter "A" in a set of data, while a second running clone virtual machine may receive a parameter value indicating a search for last names beginning with the letter "B" in a set of data, and so on.

[0177] Fig.13 An exemplary interface 1300 of an embodiment of the present disclosure is shown. Fig.13 As shown, exemplary interface 1300 may include a web page 1302 that includes numerous form fields for entering or selecting software code for execution in a cloned virtual machine instance and / or one or more specific virtual machine configurations for running the cloned virtual machine instance.

[0178] Web page 1302 may include a web page that is accessed through a client device (e.g., Fig. 9 Web page 1302 is a web page that is displayed to a display device by a software application (such as a web browser) executed on an electronic client device 902 of a computing resource service provider. Web page 1302 may be obtained from a remote computing device (e.g., web server 906) of a computing resource service provider. Web page 1302 may include dynamically generated content and / or static content from one or more files of a computing resource service provider. The content may be derived from one or more markup languages, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript, Perl, etc. A web page may include a set of form elements and / or graphic elements, such as text boxes, radio buttons, check boxes, drop-down lists, multiple-select lists, images, animations, etc., some of which may be described below.

[0179] File name field 1304 may be a form element used to specify the location (e.g., a local or network location) of a file containing the information to be included in a link such as a link. Fig.12 A set of executable software instructions executed in the cloned virtual machine running the cloned virtual machine 1232 described above. The file name field 1304 can be associated with a browse button 1310, which prompts the client device with a window to allow the customer to browse the local and / or network location of the file containing the set of executable software instructions. The code text box 1306 can be a form field element that allows the customer to type the set of executable software instructions into the box or "paste" the set of executable software instructions into the box.

[0180] Configuration drop-down menu 1308 may be a form field element that lists virtual machine configurations 1314 for the customer to select to execute the set of executable software instructions. The specific virtual machine configuration selected from configuration drop-down menu 1308 may correspond to Fig.12 A shared static virtual machine-specific configuration 1218.

[0181] The virtual machine configuration 1314 may represent a set of virtual machine images that are paused in a particular state and stored by a computing resource service provider, and the set of virtual machine images has been pre-configured by the computing resource service provider and provided to the customer for use when the customer instantiates a virtual machine on behalf of the computing resource service provider. Selecting and submitting a virtual machine configuration from the configuration drop-down menu 1308 may cause the computing resource service provider to distribute one or more copies of the virtual machine image corresponding to the selection to one or more host machines. The virtual machine configuration 1314 may be configured to have the required resources and / or software to support the execution of software code. For example, a customer may paste an executable software code written in Python in the code text box 1306 and select "Linux w / Python" from the configuration drop-down menu to cause the executable software code to be executed by a Linux virtual machine configuration capable of executing Python executable software code.

[0182] The upload button 1312 may be, for example, Fig. 9 The web server 906 of the computing resource service provider submits the form field values ​​of the web page 1302 to the form element of the computing resource service provider. For example, clicking the upload button 1312 can cause the source code of the set of executable software instructions entered through the code text box 1306 or entered through the file name field 1304 indicating the file location and the virtual machine configuration selected from the configuration drop-down menu 1308 to be uploaded to the web server 906 of the computing resource service provider.

[0183] Note that example interface 1300 is intended to be illustrative, and it is contemplated that different implementations may have various types of interfaces for performing similar functions. Fig.13 Different embodiments may include more, fewer, or different form elements than those depicted in FIG.

[0184] A customer of a computing resource service provider may use a separate interface to request execution of software code provided through exemplary interface 1300. In some implementations, the separate interface may further include a form element for specifying parameters to be provided as input to executing the software code. In some implementations, the separate interface may include a form element for specifying the number of cloned virtual machines to be instantiated to simultaneously run the software code. In other implementations, the number of cloned virtual machines may be determined by a host machine hosting the cloned virtual machines based on the parameter (e.g., if the parameter contains multiple search criteria separated by a separator character (such as a comma or a semicolon), the host machine may split the search criteria based on the separator character and instantiate a separate cloned virtual machine to perform the search for each search criterion).

[0185] Fig.14 1400 for creating and distributing a particular virtual machine configuration according to various embodiments. Some or all of process 1400 (or any other process described, or variations and / or combinations of those processes) may be performed under the control of one or more computer systems configured with executable instructions and / or other data, and may be implemented as executable instructions that are collectively executed on one or more processors. The executable instructions and / or other data may be stored on a non-transitory computer-readable storage medium (e.g., a computer program permanently stored on magnetic, optical, or flash media).

[0186] For example, some or all of process 1400 may be performed by any suitable system (such as a server in a data center), in conjunction with Fig. 9 The various components of the described system 900 (such as the web server 906 or the application server 908), a plurality of computing devices in a distributed system of computing resource service providers, or any electronic client device (such as the electronic client device 902). The process 1400 includes a series of operations in which a base virtual machine is prepared and an image of the base virtual machine is stored, a set of virtual machine configurations are created and stored based on the base virtual machine, and the runtime states of the virtual machine configurations are distributed as clones of specific virtual machines to be instantiated in response to customer requests to execute specified code under specific virtual machine configurations.

[0187] In 1402, the system performing process 1400 may instantiate a base virtual machine on a local host. In some implementations, the base virtual machine may include an emulation of the hardware of a physical computer system, but may not include software, such as an operating system. In other implementations, the base virtual machine may include an operating system and / or additional software that will be common to the configurations described in the present disclosure. In some implementations, as expected, there may be multiple base virtual computers (e.g., for different operating systems). For example, in one implementation, there may be a RedHat Linux base virtual machine and a Windows base virtual machine. In 1404, the system performing process 1400 may store a snapshot of the base virtual machine image. In this way, a new virtual machine instance may be instantiated to the state of the base virtual machine image and have software installed according to a specific virtual machine configuration for use with an intended storage service (such as Fig.10 The storage service 1006 may contain as much specific virtual machine configuration as the software code in the storage service 1006).

[0188] In 1406-18, a specific virtual machine configuration may be created. Note that operations 1406-18 may be repeated for each specific virtual machine configuration to make it available for executing client software code. For example, in 1406, specific software may be installed to a base virtual machine image to create a specific virtual machine configuration; for example, the base virtual machine image may be installed with a specific operating system (e.g., any of a variety of Linux distributions or Windows versions) and configured to support the execution of software code written in one or more different languages ​​(e.g., Python, Perl, C, C++, C#, Go, Node.js, etc.). As an illustrative example, a specific virtual machine configuration may be installed with Ubuntu Linux and a Python command interpreter for use when executing client Python code, another specific virtual machine configuration may be installed with a Windows operating system and configured to execute Perl and C code, and yet another specific virtual machine configuration may be installed with RedHat Linux and designed to execute C code using an encrypted C library. In 1408, the system executing process 1400 may pause the specific virtual machine configuration, such as by stopping the system process of the specific virtual machine.

[0189] In 1410, the system performing process 1400 may copy the runtime state of the paused specific virtual machine configuration to a memory representation of the paused state (e.g., memory contents, state of processor registers, etc.). In some examples, "runtime" refers to the time during which a software program (e.g., executable software instructions) is executing. In some examples, "runtime state" refers to the execution state of the software program at a certain point in time. Therefore, in some examples, the runtime state of a virtual machine refers to the execution state of the virtual machine at the time point (e.g., the specific time point when the specific virtual machine is paused) (e.g., virtual memory contents, state of registers of one or more virtual processors, etc.). The system may then store the memory representation of the specific virtual machine state to a persistent storage device, so that the stored memory representation may be used as a source for "cloning" the state of the paused specific virtual machine configuration to one or more host machines. In some examples, "cloning" refers to instantiating one or more virtual machines from a CoW copy of the specific virtual machine configuration. One or more host machines may use the running cloned specific virtual machine configuration to start a new system process with the same state as the original paused specific virtual machine configuration (e.g., so that the stopped virtual machine configuration can be restored to its state at the specific time point when it was stopped).

[0190] In some implementations, the stored state may be a snapshot of the stopped virtual machine configuration. In other implementations, the stored state may be the difference or delta (Δs) between the snapshot of the stopped virtual machine and the base virtual machine image, so that the base virtual machine image may be instantiated and the Δ applied to the instantiated base machine to cause the specific virtual machine configuration to be in its state at the point in time when it was stopped. Note that there are multiple ways to determine the Δ between the stopped virtual machine configuration and the base virtual machine. In one example, a memory comparison between the memory pages of the base virtual machine and the stopped virtual machine configuration may be compared to identify memory pages that have been modified from the state of the base virtual machine ("dirty pages"). In another example, the memory pages of a specific virtual machine configuration are monitored from the host operating system, and the memory pages that have been changed are identified. These changes may be copied to a file representing the Δ to the base virtual machine image.

[0191] At 1414, the system performing process 1400 may distribute / copy files representing the state of a particular virtual machine configuration when it was stopped (eg, snapshot, delta, etc.) to one or more hosts of a storage service, such as Fig.10 The host machine 1014 of the storage service 1006 of the storage service 1006. The copied state of a specific virtual machine configuration when it is stopped can be called a clone of the specific virtual machine. In some embodiments, one or more host machines can load the specific virtual machine configuration into the CoW page of the memory, such as in conjunction with Fig.12As described, when a request to execute client code is received, a running clone of the cloned specific virtual machine configuration (e.g., running clone virtual machine 1232) can be efficiently instantiated to the state of the specific virtual machine configuration (e.g., static specific virtual machine configuration 1218) when it was stopped. In an embodiment where the file is a Δ between the specific virtual machine configuration and the base virtual machine, each host machine may also have a copy of the base virtual machine image, so that any host machine can instantiate the specific virtual machine configuration by applying the Δ to the instantiation of the base virtual machine. In some embodiments, the system executing process 1400 itself can be one of the hosts of the storage service.

[0192] In 1416, the system performing process 1400 may determine whether to create another specific virtual machine configuration when the client code is expected to be executed under a specific virtual machine configuration. For example, the system may receive a selection of a set of configurations from a system administrator or other authorized entity of the data storage service, and the system may perform operations 1406-18 for each configuration specified in the group, and determine that when the operation has been performed on each configuration in the group, no other configuration remains. As another example, the system may perform operations 1406-18 based on historical usage data; for example, the system may determine the top five most popular configurations used by customers of the computing resource service provider to perform queries on the data storage service's data storage area based on historical data (e.g., logs, usage records, etc.), and perform operations 1406-18 to create a specific virtual machine configuration for each of these popular configurations. If additional specific virtual machine configurations are expected, the system performing the process may proceed to 1418. Otherwise, if no additional specific virtual machine configurations are expected, the system may proceed to 1420.

[0193] At 1418, the system performing process 1400 may instantiate a new virtual machine based on the base virtual machine image so as to have a "clean" virtual machine when installing and configuring the next specific software configuration at 1406. The system then returns to 1406 to install and configure the next specific software configuration. At 1420, the system performing process 1400 may wait to receive a request from a customer of a computing resource service provider to execute a set of executable software instructions under one of the specific virtual machine configurations created at 1406-18. Upon receiving such a request (e.g., at 1504), the system may perform Fig.15 The process 1500 of . Note that one or more of the operations performed in 1402-20 may be performed in various orders and combinations (including in parallel).

[0194] Fig.151 is a flow chart illustrating an example of a process 1500 for executing client code within a data storage service according to various embodiments. Some or all of the process 1500 (or any other process described, or variations and / or combinations of those processes) may be performed under the control of one or more computer systems configured with executable instructions and / or other data, and may be implemented as executable instructions that are collectively executed on one or more processors. The executable instructions and / or other data may be stored on a non-transitory computer-readable storage medium (e.g., a computer program permanently stored on magnetic, optical, or flash media).

[0195] For example, some or all of process 1500 may be performed by any suitable system (such as a server in a data center), in conjunction with Fig. 9 The various components of the system 900 described, such as the web server 906 or the application server 908, a plurality of computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as the electronic client device 902. The process 1500 includes a series of operations in which a set of executable software instructions is provided to a customer of a computing resource service provider that provides data storage services to the customer or a set of executable software instructions is selected from a list, the customer requests execution of code, a specific virtual machine configuration suitable for (e.g., capable of executing) the set of executable software instructions is instantiated and the specific virtual machine configuration causes the execution of the set of executable software instructions, and the execution results are provided to the customer.

[0196] At 1502, the system performing process 1500 may obtain a set of executable software instructions to be executed (also referred to in this disclosure as "customer code") in accordance with a request from a customer of a computing resource service provider hosting the system. In some embodiments, the customer provides the set of executable software instructions to be executed (e.g., through an application programming interface, such as a Fig.10 Application programming interface 1030). In other implementations, the computing resource service provider may provide the customer with various sets of executable software instructions to choose from; the customer may select a specific set of executable software instructions to be executed from the set. In some embodiments, such as embodiments in which the set of executable software instructions will be executed when it is stored in a file accessible to one or more hosts, or embodiments in which the customer selects the set of executable software instructions from a group available to the computing resource service provider, the system may receive a reference to the set of executable software instructions (e.g., an identifier or location) and may locate and obtain the set of executable software instructions based on the reference. In some cases, the set of executable software instructions includes an indication of the customer's data that the set of executable instructions is to access and / or the location of the data in the data storage service.

[0197] In various implementations, the set of executable software instructions may be configured to receive as input one or more parameter values ​​that may be included in the request to execute the customer code in 1504. The customer may specify one or more parameter values ​​in the request to execute the set of executable software instructions. In anticipation of the customer request to execute the set of software instructions in 1504, the set of executable software instructions may be stored in association with the customer.

[0198] In 1504, the system performing process 1500 may receive a request from a customer to execute the set of software instructions. In some implementations, a set of executable software instructions obtained from a customer and a request to execute the set of executable software instructions are received in 1502. In some implementations, the request includes one or more parameter values ​​passed as input to the set of executable software instructions. For example, the set of executable software instructions may be configured to perform queries on data to locate data objects that match one or more parameters (e.g., keywords, identifiers, date ranges, data object sizes, etc.) when executed. In some implementations, the customer may instruct the system to execute (e.g., batch and run in parallel) multiple instances of the set of executable software instructions. For example, the customer may desire to perform multiple simultaneous queries on the customer's data, which may be replicated and distributed between one or more hosts of a data storage service. In this case, the system may determine to instantiate multiple virtual machine instances on one or more hosts to execute each set of executable software instructions to execute queries in parallel as instructed by the customer.

[0199] At 1506, the system executing the process may determine a host of a data storage service, such as Fig.10 A host machine 1014 of the storage service 1006 of the computing resource service provider is provided, on which a specific virtual machine configuration is instantiated to execute the set of executable software instructions specified by the customer. In some implementations, it is determined that the host on which the specific virtual machine configuration is instantiated will be a host close to the customer data. For example, the system may determine which of a plurality of servers that host data of customers of the computing resource service provider host the data of the customer who submitted the request in 1504, and the system may select one or more hosts from the servers that host the customer data. In some implementations, the customer may be associated with multiple sets of data, and the system may determine which of the multiple sets of data will be accessed (e.g., read from, written to, etc.) when executing the set of executable software based on the request and / or the set of executable software instructions, and the system may select one or more hosts from the servers that host the data.

[0200] In 1508, the system performing process 1500 may cause the one or more hosts determined in 1506 to launch one or more cloned virtual machine instances of a specific virtual machine configuration suitable for the set of executable software instructions. The appropriate specific virtual machine configuration may be a specific virtual machine configuration specified by the customer in operation 1502 or 1504 as being capable of executing the set of executable software instructions. In some embodiments, the specific virtual machine configuration may be ready to be cloned in the CoW memory, such as in conjunction with Fig.12 For example, one or more hosts that can be used to instantiate a clone of a particular virtual machine configuration can store the clone in memory at Fig.14 Each of the specific virtual machine configurations created in 1408-18 of 1408-18 is a shared static virtual machine similar to the shared static specific virtual machine configuration 1218. In some implementations, the system can analyze the characteristics of the set of executable software instructions (e.g., syntax, symbols, way of declaring variables, etc.) to identify the language in which the set of executable software instructions are written, and determine which specific virtual machine configuration can execute instructions written in the identified language.

[0201] At 1510, the system performing process 1500 may provide the set of executable software instructions to a clone virtual machine and cause the clone virtual machine (also referred to as a virtual machine similar to Fig.14 The data storage service may restrict access to resources and / or data accessed by executing the set of executable software instructions to only those resources and / or data that the customer is authorized to access. In some implementations, execution of the set of executable software instructions may only access resources and / or data local to the host on which the cloned virtual machine is running. In this way, the data storage service may allow a customer to create and execute customized software code on the customer's data while protecting other customers' data from being accessed by the customized software code.

[0202] At 1512, the system performing process 1500 may determine whether execution of the set of executable instructions has been completed (e.g., the task it was designed to perform has been completed). The system may make this determination in any of a variety of ways. For example, the system may request that the results of the execution be sent to the client's computer system (e.g., Fig.10 As another example, the execution program may exit. As yet another example, the execution may send a notification to the system that the system has completed its task. If the system determines that the execution has been completed, the system may proceed to 1516 to provide the results of the execution. Otherwise, the system may proceed to 1514.

[0203] In 1514, the system performing process 1500 may determine whether the execution of the set of executable software instructions has timed out without completing its task. For example, a computing resource service provider may set a time limit (e.g., 5 minutes, 50 minutes, 1 week, etc.) on the time a given set of executable software instructions is allowed to run without completion. The time limit may be designed to prevent executable code that has stopped, finds itself in an infinite loop, or otherwise fails to properly complete its task from running indefinitely. If the execution has timed out, the system may proceed to 1516. Otherwise, the system may return to 1512 to continue checking whether the execution has been completed.

[0204] At 1516, the system performing process 1500 may provide a client computer system (e.g., Fig.10 The result of the execution of the set of executable software instructions is provided to the client virtual machine 1008 of the data storage service. If the execution results in a timeout (e.g., the execution exceeds the time limit), the returned result may be a timeout result (e.g., a notification of the execution timeout). Depending on the set of executable software instructions, the result may be customer data retrieved from the data storage area of ​​the host machine of the data storage service; in some cases, the data may or may not have been filtered, edited, or otherwise modified by the execution. For example, the data may have been cleared to remove any sensitive personal or identifying information, such as credit card numbers, social security numbers, home addresses, etc. Similarly, depending on the set of executable instructions, the result may simply indicate whether the execution was successful, whether any errors occurred during the execution, and / or the duration of the execution. In various embodiments, the result may be provided to an entity other than the client or in lieu of the client, such as a computing resource service provider or a third-party entity. In yet other embodiments, operation 1516 may be omitted because the task may be to perform an operation (e.g., modify data) without providing a result, or may be to provide a result only in the event of a failure (or to provide a result only if the task is successful, and no result indicates that the task was not successfully executed).

[0205] In 1517, the system executing process 1517 can determine whether another request to execute the client code (or different client code) has been received. If so, the system can return to 1510 to cause the running clone to execute the client code according to the request. Otherwise, the system can proceed to 1518.

[0206] In 1518, the system performing process 1500 may terminate the cloned virtual machine. Terminating the cloned virtual machine may include wiping / erasing (e.g., overwriting with zeros or other values) any memory previously allocated / provided to the cloned virtual machine and deallocating the allocated resources back to the host system (e.g., returning memory, processing power, and / or storage space previously allocated to the cloned virtual machine). In some embodiments, the running clone may not be terminated, but may be paused or kept running until another request to execute client code is received. Note that one or more of the operations performed in 1502-18 may be performed in various orders and combinations (including in parallel). For example, in some embodiments, the operations of 1502 may be combined so that the client code is received along with the request to execute the client code.

[0207] Fig.16 1600 for executing software code according to various embodiments. Some or all of process 1600 (or any other process described, or variations and / or combinations of those processes) may be performed under the control of a computer system configured with executable instructions and / or other data, and may be implemented as executable instructions executed on a processor. The executable instructions and / or other data may be stored on a non-transitory computer-readable storage medium (e.g., a computer program permanently stored on magnetic, optical, or flash media).

[0208] For example, some or all of the operations performed by client 1650 may be performed by a computing device such as Fig. 9 Similarly, some or all of the operations performed by provider service 1660 or host 1670 may be performed by any suitable system (such as a server in a data center), in combination with Fig. 9 The various components of the system 900 depicted, such as the web server 906 or the application server 908, a plurality of computing devices in a distributed system of computing resource service providers, or any electronic client device, such as the electronic client device 902. The process 1600 includes a series of operations in which a customer 1650 provides software code to a provider service 1660 and requests execution of the software code, and the provider service 1660 in turn causes the software code to be executed in one or more cloned virtual machines on a host 1670.

[0209] Provider services 1660 may distribute 1602 specific virtual machine configurations to hosts 1670, such as in conjunction with Fig.14 The host 1670 may be similar to Fig.10 Host 1014 or Fig.12The host 1670 may receive 1604 a specific virtual machine configuration. In some embodiments, the specific virtual machine configuration is received as a delta with a base virtual machine configuration of which the host 1670 already has a copy. In this way, in a multi-tenant system of a computing resource service provider, multiple customers of the computing resource service provider may have separate deltas with a common base image stored at the host 1670, which uses much less storage space and memory than if the host 1670 stores the entire specific virtual machine configuration image for each customer, thereby obtaining the benefit of efficient use of storage resources. In addition, in an embodiment, the base image may only need to be loaded ("pre-warmed") into memory once, and thereafter the host 1670 may load the separate deltas into the memory of the host 1670 as needed (e.g., in response to a request), thereby allowing the host 1670 to build the specific virtual machine configuration faster than if the host 1670 must read the entire virtual machine configuration image of the specific virtual machine configuration, because the deltas may be much smaller than the entire image.

[0210] In some embodiments, host 1670 may load (also referred to as "pre-warm") a specific virtual machine configuration into copy-on-write memory as a static shared specific virtual machine configuration, such as shared static specific virtual machine configuration 1218, so that the specific virtual machine configuration can be used to quickly create multiple running clones.

[0211] The customer 1650 may provide 1608 the software code to the provider service 1660, and the provider service 1660 may receive the software code. The software code may be similar to Fig.10 Customer code 1020 or Fig.12 At the same time or at some later time, customer 1650 may submit 1612 a request to execute the software code provided in 1008. The request may be similar to request 1012 and may include a set of parameter values ​​similar to the set of parameter values ​​1212.

[0212] In response to receiving 1614 the request, provider service 1660 may send 1616 a command to host 1670 to instantiate a number of clone virtual machines as specified by customer 1650 or as determined by provider service 1660 to simultaneously execute the software code. In response to receiving 1618 the command, host 1670 may instantiate 1620 a number of clone virtual machines specified by the command. The clone virtual machines may be similar to Fig.12 Run the cloned virtual machine 1232.

[0213] The provider service may provide 1622 the software code to the host 1670. Upon receiving 1624 the software code, the host 1670 may distribute the software code among the cloned virtual machines instantiated 1620. The host 1670 may send commands or otherwise cause the cloned virtual machines to execute 1626 the software code in accordance with the submitted 1612 request (e.g., in accordance with the set of parameter values ​​1212). Upon completion of each execution of the software code, the host 1670 may provide 1628 the results of the execution to the client 1650, and the client 1650 may receive 1630 the provided results. In some implementations, the host 1670 provides 1628 multiple results (e.g., providing 1628 results for each cloned virtual machine as it completes execution). In other implementations, the host 1670 waits until all cloned virtual machines instantiated 1620 have completed and provides 1628 the results in batches. In some implementations, rather than the host 1670 providing 1628 the results directly to the client 1650 , the host 1670 provides 1628 the results to the provider service 1660 , which then provides the results to the client 1650 .

[0214] The task of cloning the virtual machine is now complete, and the host 1670 may deprovision the cloned virtual machine by terminating the cloned virtual machine and deallocating any resources allocated / provided to the cloned virtual machine (e.g., memory, storage, processor shares, etc.). Deprovisioning the cloned virtual machine may allow the resources allocated / provided to the cloned virtual machine to be available for allocation / providing to other processes or other cloned virtual machines.

[0215] Note that one or more of the operations performed in 1602-32 may be performed in various orders and combinations (including in parallel). For example, the provider service 1660 may provide 1622 the software code to the host 1670 at any time after receiving 1610 the software code and before the host 1670 executes 1626 the software code. As another example, the operations of the customer 1650 providing 1608 the software code and submitting 1612 the execution request may be performed in a single operation (e.g., within a single request), and therefore, the provider service 1660 may receive 1610 the software code and receive 1614 the request at the same time. Similarly, the provider service 1660 may instruct 1616 the host 1670 to instantiate 1620 a cloned virtual machine and provide 1622 the software code in a single operation, whereupon the host 1670 may receive 1624 the software code before instantiating 1620 the cloned virtual machine. Note also that in various embodiments, operations performed between the client 1650, the provider service 1660, and the host 1670 may include more, fewer, or different operations than those depicted in the example 1600. For example, in some embodiments, rather than providing 1628 the results to the client 1650, the host 1670 may provide 1628 the results to the provider service 1660 or a third party (not depicted). Additionally or alternatively, in some examples, the host 1670 may not include an operation to terminate 1632 the running clone, but may instead pause the running clone or allow the running clone to continue running.

[0216] Note that in the context of describing the disclosed embodiments, unless otherwise specified, the use of expressions regarding executable instructions (also referred to as code, applications, agents, etc.) that perform operations that the "instructions" would not normally perform without assistance (e.g., data transfer, calculations, etc.) indicates that the instructions are being executed by a machine, causing the machine to perform the specified operations.

[0217] Those skilled in the art will appreciate in light of this disclosure that certain embodiments may be able to achieve certain advantages, including some or all of the following: (1) The techniques described and suggested in this disclosure improve the field of computing, particularly the field of cloud data storage and retrieval, by enabling data storage service customers to quickly execute customized customer code on remote hosts to retrieve and manipulate data stored on remote hosts with minimal cluster provisioning, thereby improving the efficiency of data operations and bandwidth usage by performing local operations on data and avoiding transmitting the entire data across network connections. (2) In addition, the techniques described and suggested in this disclosure improve the efficiency of multi-tenant computer systems by instantiating concurrent virtual machine clones that share copy-on-write memory for a particular virtual machine configuration, thereby enabling virtual machine clones to be instantiated quickly while reducing memory consumption. (3) The techniques described and suggested in this disclosure improve the efficiency of multi-tenant computer systems by allowing a large number of virtual machine images to be stored with a reduced footprint (e.g., as differences ["deltas"] from a base virtual machine image), so that those images can be quickly instantiated from a suspended state to execute software code for each customer without having to provision resources for each customer separately. (4) Furthermore, the techniques described and suggested in the present disclosure are necessarily rooted in computer technology in order to overcome problems arising specifically from preventing unauthorized access to the data of customers of a computing resource service provider by ensuring that concurrently executed cloned virtual machines are only able to access the data of the associated customers.

[0218] Additionally, embodiments of the present disclosure may be described in terms of the following:

[0219] 1. A computer-implemented method comprising:

[0220] receiving, via an application programming interface, a workflow request to execute a workflow;

[0221] Causing the first virtual machine instance to execute the function code to execute the first part of the workflow, wherein executing the first part of the workflow includes:

[0222] storing a first execution state of the function code as a first snapshot;

[0223] receiving a first wakeup handle corresponding to the first snapshot;

[0224] submitting a first service request for first information associated with the workflow to a first service, wherein the first service request includes the first call handle; and

[0225] terminating the first virtual machine instance;

[0226] receiving the first wakeup handle and the first information from the first service through the application programming interface;

[0227] Using the first invocation handle and the first information, causing the second virtual machine instance to resume executing the function code from the first execution state to execute the second part of the workflow, wherein executing the second part of the workflow includes:

[0228] storing a second execution state of the function code as a second snapshot;

[0229] receiving a second wakeup handle corresponding to the second snapshot;

[0230] submitting a second service request for second information associated with the workflow to a second service, wherein the second service request includes the second call handle; and

[0231] terminating the second virtual machine instance;

[0232] receiving the second wakeup handle and the second information from the second service through the application programming interface;

[0233] Using the second invocation handle and the second information, causing the third virtual machine instance to resume executing the function code from the second execution state to execute a third part of the workflow, wherein executing the third part of the workflow includes:

[0234] determining a workflow result based on the second information;

[0235] Returning the workflow result; and

[0236] terminating the third virtual machine instance; and

[0237] The workflow result is provided in response to the workflow request.

[0238] 2. The computer-implemented method of clause 1, wherein the second virtual machine instance executes on a different physical host than the first virtual machine instance.

[0239] 3. The computer-implemented method of clause 1 or 2, wherein the first snapshot is stored in a persistent storage device provided by an on-demand data storage service.

[0240] 4. A computer-implemented method as described in any of clauses 1 to 3, wherein the workflow request includes the function code.

[0241] 5. A system comprising:

[0242] one or more processors; and

[0243] a memory storing computer executable instructions that, when executed, cause the one or more processors to:

[0244] In response to receiving the workflow request, causing the first instance to execute software code to perform a first portion of the workflow, the execution of the first portion resulting in submission of an operation request to an entity;

[0245] A resume workflow request is received from the entity, the resume workflow request comprising:

[0246] a handle corresponding to a snapshot of the execution state of the software code; and

[0247] a response of the entity to the operation request;

[0248] causing a second instance to execute the software code from the state to perform a second portion of the workflow using the handle to the snapshot and the response to the operation request;

[0249] receiving a workflow result from another instance that executed the last portion of the workflow; and

[0250] The workflow result is provided in response to the workflow request.

[0251] 6. The system of clause 5, wherein the entity is a user interface executed on a client device of a user.

[0252] 7. The system of clause 5 or 6, wherein executing an additional instance of the final portion of the workflow further determines the workflow outcome based on the response of the entity to the operation request.

[0253] 8. The system of any one of clauses 5 to 7, wherein the handle is a uniform resource name.

[0254] 9. The system of any one of clauses 5 to 8, wherein the workflow request further comprises the software code to be executed.

[0255] 10. A system as described in clause 5, wherein:

[0256] Executing the second portion of the workflow results in submitting another operation request to another entity; and

[0257] The computer executable instructions also include instructions that cause the system to:

[0258] Another resume workflow request is received from another entity, the another resume workflow request comprising:

[0259] a handle to another snapshot corresponding to another execution state of the software code; and

[0260] a response to another action request; and

[0261] The handle to another snapshot and the response to another operation request are used to cause a third instance to execute the software code from another state to perform a third portion of the workflow.

[0262] 11. The system of any of clauses 5 to 10, wherein the computer-executable instructions further comprise instructions that cause the system to generate the snapshot corresponding to the execution state of the software code.

[0263] 12. The system of clause 11, wherein the computer-executable instructions further comprise instructions that cause the system to terminate the additional instance.

[0264] 13. The system of clause 11 or 12, wherein the entity is a service of a computing resource service provider that maintains the system.

[0265] 14. A non-transitory computer-readable storage medium having executable instructions stored thereon, wherein the executable instructions, when executed by one or more processors of a computer system, cause the computer system to at least:

[0266] receiving a first request from a requester to execute a workflow;

[0267] Instantiating a first virtual machine and causing the first virtual machine to execute software code to at least:

[0268] executing a first part of the workflow;

[0269] storing a first snapshot of a first execution state of the software code; and

[0270] Providing a first handle of the first snapshot to an entity that is to provide first information;

[0271] receiving a second request including the first handle and the first information, and instantiating a second virtual machine using the first information to execute the software code to resume execution of the workflow from the first state;

[0272] In response to receiving a third request including a second handle and second information, instantiating a third virtual machine using the second information to resume execution of the workflow from a second state, wherein the second handle is associated with a second snapshot of a second execution state of the software code;

[0273] receiving a workflow result from the third virtual machine; and

[0274] In response to the first request, the workflow result is provided to the requester.

[0275] 15. The non-transitory computer-readable storage medium of clause 14, wherein the second virtual machine is instantiated on a different physical host than the first virtual machine.

[0276] 16. The non-transitory computer-readable storage medium of clause 14 or 15, wherein:

[0277] The first snapshot represents a set of differences between the first execution state of the software code and a base configuration; and

[0278] The second snapshot represents a set of differences between the first execution state of the software code and the second execution state of the software code.

[0279] 17. The non-transitory computer-readable storage medium of any one of clauses 14 to 16, wherein the computer system is a server of an event-driven serverless computing platform provided as a service by a computing resource service provider.

[0280] 18. The non-transitory computer-readable storage medium of any one of clauses 14 to 17, wherein:

[0281] The computer system is hosted by a computing resource service provider; and

[0282] The entity is provided by a third party outside the control of the computing resource service provider.

[0283] 19. The non-transitory computer-readable storage medium of any of clauses 14 to 18, wherein the software code is received together with the first request.

[0284] 20. The non-transitory computer-readable storage medium of any of clauses 14 to 19, wherein the software code further comprises code causing the first virtual machine to terminate after providing the first handle.

[0285] 21. The non-transitory computer-readable storage medium of clause 20, wherein the software code that causes the first virtual machine to terminate causes computing resources allocated to the first virtual machine to be deallocated and made available for use by another virtual machine.

[0286] 22. A computer-implemented method comprising:

[0287] receiving a request to execute a workflow through an application programming interface; and

[0288] The request is satisfied by at least the following:

[0289] Causing a first virtual machine configuration to be instantiated to execute function code to perform a first portion of the workflow, wherein the first portion of the workflow includes:

[0290] storing a first snapshot of the execution state of the first virtual machine configuration; and

[0291] terminating the first virtual machine configuration;

[0292] receiving, from the first virtual machine configuration, first information and a revoke handle to a stored state of the first virtual machine configuration;

[0293] performing a first operation based on the first information;

[0294] causing a second virtual machine configuration to be instantiated using the invocation handle to execute the function code to perform a second portion of the workflow continuing from the stored state, wherein the second portion of the workflow includes storing a second snapshot of the execution state of the function code and terminating the second virtual machine configuration;

[0295] receiving second information from the second virtual machine configuration;

[0296] performing a second operation based on the second information;

[0297] determining a workflow result based on performing the first operation and the second operation; and

[0298] The workflow result is provided in response to the request.

[0299] 23. The computer-implemented method of clause 22, wherein the wakeup handle is a uniform resource name.

[0300] 24. The computer-implemented method of clause 22 or 23, wherein execution of the second portion of the workflow continues from completion of the first portion of the workflow.

[0301] 25 A computer-implemented method as described in any of clauses 22 to 24, wherein:

[0302] Causing the second virtual machine configuration to be instantiated to execute the function code further comprises: using the invocation handle and a plurality of parameters to cause a plurality of second virtual machine configurations to be instantiated to execute the function code, wherein each of the plurality of second virtual machine configurations is associated with a different parameter of the plurality of parameters;

[0303] Receiving the second information further comprises: receiving a set of second information from the plurality of second virtual machine configurations; and

[0304] Performing the second operation further includes performing the second operation based at least in part on a set of second information received from the plurality of second virtual machine configurations.

[0305] 26. A computer-implemented method as described in any of clauses 22 to 25, wherein:

[0306] The first portion of the workflow including storing the first snapshot further includes: generating and storing the first snapshot corresponding to the execution state of the function code executed by the first virtual machine configuration; and

[0307] The computer-implemented method further includes receiving the function code, the function code being executed by the first virtual machine configuration to further cause the first virtual machine configuration to at least:

[0308] executing the first portion of the workflow to generate the first information; and

[0309] The first information and the call-up handle are returned, wherein the call-up handle corresponds to the first snapshot.

[0310] 27. The computer-implemented method of clause 26, wherein the first snapshot is stored as a set of differences between a current state of the first virtual machine configuration and a previous state of the first virtual machine configuration.

[0311] 28. A system comprising: one or more processors; and a memory storing computer executable instructions, the computer executable instructions, when executed, causing the one or more processors to: receive a request to execute a workflow; cause a first instance to be instantiated to execute a first portion of the workflow; receive first information and a handle associated with a snapshot from the first instance; process the first information to produce a first result; based on the handle, cause a second instance to be instantiated to execute a second portion of the workflow; receive second information from the second instance; process the second information to produce a second result; and

[0312] An operation is performed according to at least the first result or the second result.

[0313] 29. The system of clause 28, wherein the computer-executable instructions further include instructions that further cause the one or more processors to determine whether to store the snapshot in a persistent storage device or a non-persistent storage device based on an estimated delay between execution of the first portion of the workflow and the second portion of the workflow.

[0314] 30. The system of clause 28 or 29, wherein:

[0315] The workflow is executed as a result of executing function code provided to the system by a customer of a computing resource service provider; and

[0316] The request is received via a computing device associated with the client.

[0317] 31. The system of any of clauses 28 to 30, wherein the first instance is terminated as a result of providing the first information to the system.

[0318] 32. The system of any of clauses 28 to 31, wherein the snapshot is a serialized representation of a final state of the first instance at the end of the first portion of the workflow.

[0319] 33. The system of clause 32, wherein the snapshot is stored as a set of differences between a state represented by a previous snapshot and a final state.

[0320] 34. The system of any of clauses 28 to 33, wherein the computer-executable instructions causing the system to cause the second instance to be instantiated are executed as a result of the first result indicating a need for additional execution of the workflow.

[0321] 35. A system as described in clause 34, wherein:

[0322] The computer executable instructions further include instructions that further as a result of indicating that the first result of the additional execution is desired, cause the system to:

[0323] causing a third instance to be instantiated to execute the second portion of the workflow;

[0324] receiving third information from the third instance; and

[0325] processing the third information to produce a third result; and

[0326] The computer executable instructions that cause the system to perform the operations also include instructions that cause the system to further perform the operations based on the third result.

[0327] 36. A non-transitory computer-readable storage medium having executable instructions stored thereon, the executable instructions, when executed by one or more processors of a computer system, causing the computer system to at least:

[0328] receiving a request to execute software code to perform a workflow;

[0329] causing a first virtual machine to be instantiated to execute the software code to at least:

[0330] executing a first portion of the workflow; and

[0331] Returning a first handle to a first snapshot associated with the state of the first virtual machine;

[0332] receiving first information and the first handle from the first virtual machine;

[0333] processing the first information to generate a first result;

[0334] Based on the first handle, causing a second virtual machine to be instantiated to execute the software code to perform at least a second portion of the workflow;

[0335] receiving second information from the second virtual machine;

[0336] processing the second information to produce a second result; and

[0337] An operation is performed based on the first result and the second result.

[0338] 37. The non-transitory computer-readable storage medium of clause 36, wherein the computer system is a server of an event-driven serverless computing platform provided as a service by a computing resource service provider.

[0339] 38. The non-transitory computer-readable storage medium of clause 36 or 37, wherein the executable instructions causing the first virtual machine and the second virtual machine to be instantiated include instructions that:

[0340] causing the first virtual machine to be instantiated on a first computer host; and

[0341] The second virtual machine is caused to be instantiated on a second computer host different from the first computer host.

[0342] 39. The non-transitory computer-readable storage medium of any one of clauses 36 to 38, wherein:

[0343] The executable instructions also include instructions that further cause the computer system to:

[0344] receiving third information and an additional handle from the first virtual machine;

[0345] Based on the additional handle, causing a third virtual machine to be instantiated to execute the software code to perform at least a third portion of the workflow;

[0346] receiving third information from the third virtual machine; and

[0347] processing the third information to produce a third result; and

[0348] The executable instructions that cause the computer system to perform the operations further include instructions that further cause the computer system to perform the operations further based on the third result.

[0349] 40. The non-transitory computer-readable storage medium of any of clauses 36 to 39, wherein the first handle is a reference indicating a location where the first snapshot is stored using a storage service.

[0350] 41. A non-transitory computer-readable storage medium as described in any of clauses 36 to 40, wherein the executable instructions that cause the system to cause the computer system to perform the operation also include instructions that further cause the computer system to provide a response, wherein the response indicates whether the workflow is successful based on at least the first result or the second result.

[0351] 42. The non-transitory computer-readable storage medium of any of clauses 36 to 41, wherein the software code further causes the first virtual machine to terminate after returning the first handle to the computer system.

[0352] 43. The non-transitory computer-readable storage medium of clause 42, wherein the software code that causes the first virtual machine to terminate causes one or more computing resources allocated to the first virtual machine to be deallocated and made available for use by another virtual machine.

[0353] 44. A computer-implemented method comprising:

[0354] Export the virtual machine configuration from the base virtual machine;

[0355] Distributing the runtime state of the virtual machine configuration among a group of host machines provided by a computing resource service provider;

[0356] receiving, from a client device associated with a customer of the computing resource service provider, a request to perform one or more data operations by executing customer-provided software code on one of the set of host machines;

[0357] causing a group of cloned virtual machines based on the virtual machine configuration in the memory to execute on the host machine;

[0358] executing the software code provided by the customer in the set of virtual machines;

[0359] determining that a data operation of the one or more data operations of a virtual machine in the set of virtual machines has completed; and

[0360] A result of the data operation is provided in response to the request.

[0361] 45. The computer-implemented method of clause 44, further comprising selecting the virtual machine configuration from a plurality of different virtual machine configurations based on whether the virtual machine configuration is capable of executing the customer-provided software code.

[0362] 46. ​​A computer-implemented method as described in clause 44 or 45, wherein:

[0363] The computer-implemented method further comprises:

[0364] executing the basic virtual machine to a stable state; and

[0365] storing the base virtual machine as a base virtual machine image in a repository; and

[0366] The virtual machine configuration is derived from the base virtual machine image.

[0367] 47. The computer-implemented method of any of clauses 44 to 46, wherein the set of host machines loads the virtual machine configuration in copy-on-write pages of the memory.

[0368] 48. The computer-implemented method of any of clauses 44 to 47, further comprising stopping the virtual machine upon determining that the data operation has completed.

[0369] 49. A computer-implemented method as described in any of clauses 44 to 48, wherein the host machine is a host machine of a distributed data object storage service provided by the computing resource service provider.

[0370] 50. A computer-implemented method as described in any of clauses 44 to 49, further comprising: before receiving a request to perform the one or more data operations, causing the set of host machines to load the virtual machine configuration into the memory based at least in part on the runtime state.

[0371] 51. A system comprising:

[0372] one or more processors; and

[0373] a memory including executable instructions that, when executed by the one or more processors, cause the system to:

[0374] Loading a set of virtual machine configurations into the memory, each virtual machine configuration in the set of virtual machine configurations being a runtime state of a virtual machine at a specific point in time;

[0375] receiving a set of software instructions from a client device associated with a customer of a service provider hosting the system, the software instructions, when executed, performing data operations;

[0376] receiving a request to execute the set of software instructions using a selected virtual machine configuration from the set of virtual machine configurations;

[0377] executing the set of software instructions in a virtual machine derived from the selected virtual machine configuration; and

[0378] A result of the data operation is provided in response to the request.

[0379] 52. A system as described in clause 51, wherein the executable instructions that cause the system to execute the set of software instructions include executable instructions that cause the system to simultaneously execute copies of the set of software instructions in multiple virtual machines derived from the virtual machine configuration in the set of virtual machine configurations.

[0380] 53. The system of clause 51 or 52, wherein the executable instructions further comprise instructions that cause the system to de-provision the virtual machine upon completion of execution of the set of software instructions.

[0381] 54. The system of any of clauses 51 to 53, wherein executing the set of software instructions in the virtual machine causes the virtual machine to:

[0382] Reading a data object from a data storage area of ​​the system;

[0383] modifying the data object to produce a modified data object; and

[0384] The modified data object is written into the data storage area.

[0385] 55. The system of any of clauses 51 to 54, wherein the virtual machine is derived at least in part as a result of selecting the virtual machine configuration through an interface of the client device.

[0386] 56. The system of any of clauses 51 to 55, wherein the executable instructions that cause the system to load the set of virtual machine configurations into memory further comprise instructions that cause the system to derive the virtual machine configurations based at least in part on:

[0387] A base virtual machine image of a base virtual machine; and

[0388] The difference between the state of the virtual machine configuration and the base virtual machine.

[0389] 57. The system of any of clauses 51 to 56, wherein the request is received from another virtual machine associated with the customer.

[0390] 58. The system of any one of clauses 51 to 57, wherein the system is a host for a data storage service provided as a service by a service provider to the customer.

[0391] 59. A non-transitory computer-readable storage medium having executable instructions stored thereon, the executable instructions, in response to being executed by one or more processors of a computer system, causing the computer system to at least:

[0392] receiving, from a device associated with a customer of a service provider hosting the computer system, a set of software instructions, the software instructions causing the host machine to perform data operations as a result of execution by a virtual machine of the host machine;

[0393] receiving a request to execute the set of software instructions;

[0394] Providing the virtual machine on the host machine based at least in part on:

[0395] A base virtual machine image of a base virtual machine; and

[0396] a difference between the base virtual machine state and the selected virtual machine configuration;

[0397] causing the virtual machine to execute the set of software instructions to cause the host machine to perform the data operation; canceling provision of the virtual machine; and

[0398] A result of the data operation is provided in response to the request.

[0399] 60. The non-transitory computer-readable storage medium of clause 59, wherein the executable instructions further comprise instructions for causing the computer system to:

[0400] creating a set of virtual machine configurations derived from the base virtual machine, wherein the set of virtual machine configurations includes the selected virtual machine configuration;

[0401] pausing the set of virtual machine configurations; and

[0402] The runtime states of the set of virtual machine configurations are distributed among a plurality of host machines, the host machine being a member of the plurality of host machines.

[0403] 61. The non-transitory computer-readable storage medium of clause 59 or 60, wherein the executable instructions to cancel provisioning of the virtual machine include instructions to cause a computer system to:

[0404] terminating execution of the virtual machine;

[0405] erasing memory allocated to the virtual machine; and

[0406] Resources, including the memory, are de-allocated from the virtual machine.

[0407] 62. The non-transitory computer-readable storage medium of any of clauses 59 to 61, wherein the host machine is hosted in a data storage service provided by the service provider to the customer.

[0408] 63. The non-transitory computer-readable storage medium of any one of clauses 59 to 62, wherein the executable instructions that cause the computer system to cancel provisioning of the virtual machine due to execution of the set of software instructions exceeding a time limit cause the computer system to cancel provisioning of the virtual machine.

[0409] 64. The non-transitory computer-readable storage medium of any of clauses 59 to 63, wherein the set of software instructions that cause the host machine to perform the data operation causes the host machine to:

[0410] Reading a first data object from a data storage area of ​​a data storage service;

[0411] determining that the first data object does not match specified criteria; and

[0412] A second data object is read from the data storage area.

[0413] 65. The non-transitory computer-readable storage medium of clause 64, wherein the set of software instructions that cause the host machine to perform the data operation further causes the host machine to:

[0414] determining that the second data object matches the specified criteria; and

[0415] The second data object is provided in response to the request.

[0416] Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the claims.

[0417] Other variations are also within the spirit of the present disclosure. Therefore, while the disclosed technology is susceptible to various modifications and alternative constructions, specific embodiments thereof have been shown in the drawings and described in detail above. However, it should be understood that it is not intended to limit the invention to the specific form or forms disclosed, but on the contrary, the invention is intended to cover all modifications, alternative constructions and equivalents that fall within the spirit and scope of the invention as defined in the appended claims.

[0418] Unless otherwise noted or clearly contradictory to the context, the use of the terms "one", "a kind of" and "the" and similar referents in the context of describing the disclosed embodiments (especially in the context of the appended claims) should be interpreted as covering both the singular and the plural. Similarly, the use of the term "or" should be interpreted as meaning "and / or" unless explicitly contradictory or contradictory to the context. Unless otherwise noted, the terms "comprising", "having", "including" and "containing" should be interpreted as open terms (i.e., meaning "including but not limited to"), unless otherwise noted. Where there is no modification and refers to a physical connection, the term "connected" should be interpreted as partially or completely contained within, attached to, or linked together, even if there is an intervening object. Unless otherwise noted, the enumeration of the range of values ​​is intended only to be used as a shorthand method for individually mentioning each individual value falling within the range, and each individual value is incorporated into this specification as if it were individually described. Unless otherwise noted or contradictory to the context, the use of the term "group" (e.g., "a group of items") or "subset" should be interpreted as a non-empty set including one or more members. Additionally, unless otherwise noted or contradicted by context, the term "subset" of a corresponding group does not necessarily mean a true subset of the corresponding group, but a subset and a corresponding group may be equivalent. Use of the phrase "based on" means "based at least in part on" and is not limited to "based only on," unless explicitly stated otherwise or clear from context.

[0419] Unless specifically stated or otherwise clearly contradicted by context, connective language, such as phrases of the form "at least one of A, B, and C" or "at least one of A, B, and C" (i.e., the same phrase with or without the Oxford comma) is understood in the context of ordinary usage to mean that an item, item, etc. may be any non-empty subset of the group of A or B or C, A and B and C, or any group that includes at least one A, at least one B, or at least one C that is not contradicted by context or otherwise excluded. For example, in the illustrative example of a group with three members, the connective phrases "at least one of A, B, and C" and "at least one of A, B, and C" refer to any of the following groups: {A}, {B}, {C}, {A, B}, {A, C}, {B, C}, {A, B, C}, and any group having {A}, {B}, and / or {C} as a subset (e.g., a group with multiple "A's"), unless expressly contradicted or inconsistent with context. Thus, such connective language is generally not intended to imply that certain embodiments require the presence of at least one of A, at least one of B, and at least one of C, respectively. Similarly, phrases such as "at least one of A, B, or C" and "at least one of A, B, or C" refer to the same as "at least one of A, B, and C" and "at least one of A, B, and C" to any of the following group: {A}, {B}, {C}, {A, B}, {A, C}, {B, C}, {A, B, C}, unless explicitly stated or a different meaning is clear from the context. In addition, the term "plurality" indicates a state of being in plurality (e.g., "plurality items" indicates a plurality of items). The number of plural items is at least two, but may be more if explicitly stated or indicated by the context.

[0420] Unless otherwise noted or otherwise clearly contradicted by the context, the operations of the described processes may be performed in any suitable order. In an embodiment, a process such as the described process (or its variant and / or combination) is performed under the control of one or more computer systems configured with executable instructions, and is implemented by hardware or a combination thereof as a code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors. In one embodiment, the code is stored on a computer-readable storage medium, for example, in the form of a computer program including a plurality of instructions that can be executed by one or more processors. In one embodiment, the computer-readable storage medium is a non-transitory computer-readable storage medium that does not include a transient signal (e.g., a propagating transient electrical or electromagnetic transmission) but includes a non-transitory data storage circuit (e.g., a buffer, a cache, and a queue) in a transceiver of a transient signal. In one embodiment, the code (e.g., executable code or source code) is stored on a set of one or more non-transitory computer-readable storage media, on which executable instructions are stored, which, when executed by one or more processors of a computer system (i.e., due to being executed), cause the computer system to perform the operations described herein. In one embodiment, the set of non-transitory computer-readable storage media includes a plurality of non-transitory computer-readable storage media, and one or more of the individual non-transitory storage media in the plurality of non-transitory computer-readable storage media do not contain all the code, while the plurality of non-transitory computer-readable storage media collectively store all the code. In one embodiment, the executable instructions are executed so that different instructions are executed by different processors, for example, the non-transitory computer-readable storage medium stores instructions, and the main CPU executes some instructions, while the graphics processor unit executes other instructions. In one embodiment, different components of the computer system have separate processors, and different processors execute different subsets of instructions.

[0421] Thus, in one embodiment, a computer system is configured to implement one or more services that individually or collectively perform the operations of the processes described herein, and such computer system is configured with applicable hardware and / or software that enables the operations to be performed. Additionally, a computer system implementing an embodiment of the present disclosure is a single device, and in another embodiment, is a distributed computer system comprising multiple devices that operate in different ways such that the distributed computer system performs the operations described and such that a single device does not perform all the operations.

[0422] The use of any examples or exemplary language (e.g., "such as") provided is intended only to better illustrate embodiments of the invention and will not apply limitations to the scope of the invention unless otherwise required. Language in this specification should not be construed as indicating any non-claimed element as essential to the practice of the invention.

[0423] Embodiments of the present disclosure are described, including the best mode known to the inventor for carrying out the present invention. After reading the above description, variations of these embodiments may become apparent to those of ordinary skill in the art. The inventors hope that the technicians will adopt such variations as appropriate, and the inventors intend to practice the embodiments of the present disclosure in a manner different from that specifically described. Therefore, as permitted by applicable law, the scope of the present disclosure includes all modifications and equivalents of the subject matter recited in the attached claims. In addition, unless otherwise noted or otherwise clearly contradicted by the context, the scope of the present disclosure covers any combination of the above-mentioned elements in all possible variations thereof.

[0424] All references, including publications, patent applications, and patents, cited are hereby incorporated by reference to the same extent as if each reference were individually and specifically indicated to be incorporated by reference and were set forth in its entirety.

Claims

1. A method, comprising: causing a first virtual machine instance to dynamically allocate computing resources to execute a first portion of a workflow, the first virtual machine instance being hosted on a server of an event-driven serverless computing platform; Continued execution of the workflow needs to be determined by one or more data processing operations performed by the entity; requesting the entity to generate a response associated with the workflow, the response being required for continued execution of the workflow; receiving a resume workflow request from the entity, the resume workflow request comprising a handle containing a reference to a snapshot corresponding to an execution state of the workflow; as well as The handle to the snapshot is used to cause a second virtual machine instance to execute a second portion of the workflow.

2. The method according to claim 1, wherein: Execution of the first part and the second part of the workflow includes: storing the respective first and second execution states of the function code as respective first and second snapshots; and Respective first and second call-up handles corresponding to the first and second snapshots are received, the respective first and second call-up handles being respective references to the first and second execution states of the function code.

3. The method according to claim 2, wherein: The corresponding first wake-up handle and second wake-up handle are received through the application programming interface.

4. The method according to claim 1, wherein: In response to a workflow request to execute the workflow, the first portion of the workflow is executed without user input, wherein the workflow includes the first portion and the second portion of the workflow.

5. The method according to claim 4, wherein: The workflow request includes a function code, and wherein the first portion and the second portion of the workflow correspond to execution of the first portion and the second portion of the function code.

6. The method according to claim 1, wherein: The first virtual machine instance executes on a first physical host, and the second virtual machine instance executes on a second physical host that is different from the first physical host used for the first virtual machine instance.

7. A non-transitory computer-readable storage medium having executable instructions stored thereon, wherein the executable instructions, when executed by one or more processors of a computer system, cause the computer system to at least perform the following operations: causing the first virtual machine instance to allocate computing resources to execute the first portion of the workflow; Continued execution of the workflow needs to be determined by one or more data processing operations performed by the entity; requesting the entity to generate a response associated with the workflow, the response being required for continued execution of the workflow; receiving a resume workflow request from the entity, the resume workflow request comprising a handle containing a reference to a snapshot corresponding to an execution state of the workflow; as well as The handle to the snapshot is used to cause a second virtual machine instance to execute a second portion of the workflow.

8. The non-transitory computer-readable storage medium of claim 7, wherein: The workflow includes execution of a set of software codes, and wherein the snapshot represents a set of differences between a first execution state of the set of software codes and a second execution state of the set of software codes.

9. The non-transitory computer-readable storage medium of claim 8, wherein: The set of software codes is received along with a request to execute the workflow, and wherein the first virtual machine instance executes the first portion of the workflow in response to the request to execute the workflow.

10. The non-transitory computer-readable storage medium of claim 8, wherein: The set of software codes also includes code for causing the first virtual machine instance to terminate in response to the first virtual machine instance providing a first handle to the entity, the first handle including a reference to the first execution state of the set of software codes.

11. The non-transitory computer-readable storage medium of claim 10, wherein: The set of software codes that cause the first virtual machine instance to terminate is also responsive to the first virtual machine instance providing the first handle to the entity, causing computing resources allocated to the first virtual machine instance to be deallocated and made available for use by a third virtual machine instance that is different from the first virtual machine instance and the second virtual machine instance.

12. The non-transitory computer-readable storage medium of claim 7, wherein: The computer system is hosted by a computing resource service provider; and The entity is provided by a third party outside the control of the computing resource service provider.

13. A system, comprising: one or more processors; as well as A memory storing computer executable instructions that, when executed, cause one or more processors to perform the following operations: causing the first virtual machine instance to allocate computing resources to execute the first portion of the workflow; Continued execution of the workflow needs to be determined by one or more data processing operations performed by the entity; requesting the entity to generate a response associated with the workflow, the response being required for continued execution of the workflow; receiving a resume workflow request, the resume workflow request comprising a handle containing a reference to a snapshot corresponding to an execution state of the workflow; as well as The handle to the snapshot is used to cause a second virtual machine instance to execute a second portion of the workflow.

14. The system according to claim 13, wherein: The entity is a user interface executed on a user's client device.

15. The system of claim 13, wherein: The third virtual machine instance executes a final portion of the workflow, and wherein the third virtual machine instance determines a workflow result based on a response of the entity to the operation request.

16. The system of claim 13, wherein: The handle is a uniform resource name.

17. The system of claim 13, wherein: Execution of the second portion of the workflow causes submission of an additional operation request to a further separate entity.

18. The system of claim 17, wherein: The computer executable instructions also include instructions that cause the system to: receiving a further resume workflow request from the further independent entity, the further resume workflow request comprising: a further handle containing a reference to a snapshot corresponding to a further execution state of the workflow; and responses to additional operational requests; and The additional handle to the snapshot and the response to the additional operation request are used to cause a third virtual machine instance to perform a third portion of the workflow.

19. The system of claim 13, wherein: The entity is a computing resource service provider that maintains the system.

20. The system of claim 13, wherein: The snapshot is stored in a persistent storage device provided by the on-demand data storage service.