On-demand code execution with limited memory occupancy

By introducing on-demand code execution environment and scheduler into the coordinator, the execution location and resource allocation of tasks are optimized, and the problem of low task execution efficiency is solved in the case of limited memory usage, and efficient task management and execution is achieved.

CN119718673APending Publication Date: 2025-03-28AMAZON TECH INC
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510145919.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2018-04-03
Filing Date
2019-04-01
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Under the condition of limited memory usage, it is difficult for the coordinator to effectively manage and execute multiple on-demand code tasks, resulting in insufficient memory resources and affecting the efficiency and ability of task execution.

Method used

By introducing a coordinator, using an on-demand code execution environment, the coordinator can manage the execution location of tasks, and optimize the execution priority and resource allocation of tasks through schedulers and resource managers to reduce memory usage.

Benefits of technology

It realizes efficient execution of on-demand code tasks under limited memory usage, improves the management capabilities and task execution efficiency of the computing system, and reduces privacy risks and communication delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718673A_ABST
    Figure CN119718673A_ABST
Patent Text Reader

Abstract

Systems and methods are described for managing a coordinated environment to execute on-demand code with reduced memory footprint provided. A coordinator receives an individual on-demand code execution request or task from a coordinating device. The coordinator may process the on-demand code execution request to associate at least a subset of the on-demand code execution with one or more groups of shared executable code. The coordination device may enable the execution of the individual tasks without separately loading and executing the on-demand executable code. Accordingly, the coordination device may be implemented on a computing device with more limited computing resources by reducing the memory footprint required to execute the on-demand task.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with application number 2019800247607, application date April 1, 2019, and invention name “On-demand code execution with limited memory usage”. Background Art

[0002] In general, computing devices utilize a communication network or a series of communication networks to exchange data. Companies and organizations operate computer networks that interconnect many computing devices to support operations or provide services to third parties. Computing systems may be located in a single geographic location or in multiple different geographic locations (e.g., interconnected via private or public communication networks). Specifically, a data center or data processing center (generally referred to herein as a "data center") may include many interconnected computing systems to provide computing resources to users of the data center. A data center may be a private data center operated on behalf of an organization, or may be a public data center operated on behalf of the public or for the public interest.

[0003] In order to facilitate the improved utilization of data center resources, virtualization technology allows a single physical computing device to host one or more instances of virtual machines that appear and operate as independent computing devices for users of the data center. Through virtualization, a single physical computing device can dynamically create, maintain, delete, or otherwise manage virtual machines. In turn, users can request computer resources from the data center, including configurations of a single computing device or a network of computing devices, and various quantities of virtual machine resources can be provided to users.

[0004] In some environments, a computing device that communicates via a communications network may correspond to a computing device with a primary function, such as a desktop personal computer. In other environments, at least some portions of a computing device that communicates via a communications network may correspond to an embedded device or a thin device with at least one alternative primary function, such as a household appliance (e.g., a thermostat or a refrigerator) that has a single primary purpose while also providing at least limited computing functionality. In some cases, the local user interface of these embedded devices or thin devices is limited, so remote management may be required to implement some of the functions of these devices. However, due to communication delays with the remote management device and the possibility of inadvertent disclosure of private information at the remote management device or during communication with the remote management device, remote management may be problematic in some cases. These problems may be more prevalent when the embedded device or thin device and the remote management device exist on separate communications networks or communicate over a public communications network. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] Reference numerals may be reused throughout the drawings to indicate correspondence between referenced elements.The drawings are provided to illustrate example embodiments described herein and are not intended to limit the scope of the present disclosure.

[0006] Figure 1 is a block diagram depicting an illustrative environment in which a coordinator is operable to locally manage and coordinate operations of coordination devices within a coordination environment;

[0007] Figure 2 Describes the provision Figure 1 A general architecture of a computing device of a coordinator;

[0008] Figure 3A and Figure 3B Depicted by Figure 1 The general architecture of the coordination device managed by the coordinator;

[0009] Figure 4 depicts a general architecture of a client device that can be used to generate and submit configuration information related to managing configuration of authentication and authorization services in an edge device;

[0010] FIG. 5A to FIG. 5B yes Figure 1 depicting illustrative interactions for configuring and performing group-based tasks; and

[0011] Figure 6 is a flow chart illustrating a routine for receiving and processing group-based tasks. DETAILED DESCRIPTION

[0012] In general, the present application corresponds to the management of computing devices in a communication network. More specifically, aspects of the present application correspond to the management of memory resources for executing on-demand code in a coordinated environment. According to aspects of the present disclosure, the coordinated environment includes a coordinator present in the coordinated environment for controlling the operation and function of the coordinated device within the coordinated environment. In some cases, the coordinator and the coordinated device may correspond to an embedded device or a streamlined device having at least one alternative primary function, such as a household appliance with a single primary purpose. In some cases, such devices may be referred to as "Internet of Things" devices or "IoT" devices. The coordinated device may include limited local user interface capabilities and may therefore benefit from remote management. In addition, the coordinator may include a device (such as a tablet computing device) that is associated with more limited computing resources (such as processing, memory, or communications) relative to a server-based computing device.

[0013] The coordinator disclosed herein is capable of such remote management of the coordinating device locally in an environment including the coordinator and the coordinating device (such as a local area network or "LAN" environment). In some embodiments and as will be described below, the use of the coordinator is therefore capable of managing the coordinating device without communicating outside the local environment, thereby allowing the reduction of privacy risks and the increase of communication speed compared to the use of an external or public communication network. In addition, the coordinator disclosed herein can be used as a localized on-demand code execution system, so that portable code segments can be quickly executed to implement functions on the coordinator. These portable code segments may be referred to as "tasks" herein. In some cases, tasks can be used to coordinate the functions of the coordinating device, such as by changing the state of the device. For example, in the case where the coordinating device is a network-enabled lamp, the task can be used to change the state of the lamp (e.g., to "on" or "off") according to input to the coordinator (such as the current time, user input, or the state of another coordinating device). The coordinator can further enable communication coordination devices and tasks according to many different protocols, and in some cases, conversion functions can be provided between such protocols.

[0014] Furthermore, in some cases, the coordinator can manage the execution location of the task, so that the task can be executed on the coordinator, on the coordinating device, or on a device in a remote environment (e.g., a remote network computing environment) according to the capabilities of the candidate devices and the requirements for the task execution. In some cases, these tasks can be user-defined, so that the user can implement various functions on the coordinator or the coordinating device according to the user-submitted code corresponding to the task. Therefore, the coordinator can provide localized management of the coordinating device that can be quickly reconfigured.

[0015] The coordinator may be associated with a network-based service instantiated on one or more components on the edge node of the service, which is different from centralized authentication and authorization. Illustratively, the service provider environment may be operated by the provider of the coordinator, and may enable a user to specify various configuration parameters of the coordinator, such as the location of the coordination environment of the coordinator; the coordination devices within the environment; the tasks that can be performed by the coordinator; the manner in which the communication between the coordinator management devices, between tasks, or between devices and tasks should be adopted; the security information of the coordinator; or other parameters of the coordinator (such as, metrics to be monitored at the coordinator or logging to be performed at the coordinator). In some cases, since the coordinator itself may be associated with a limited localized user interface, the service provider environment may enable a user to submit the configuration of the coordinator via a client device and cause the configuration to be automatically provided to the coordinator. The service provider environment may further enable a single client device to manage multiple coordinators via a unified interface, and to quickly change the configuration of the coordinator by deploying a new configuration or by rolling back or undoing a previous deployment of the configuration to the coordinator. More details regarding a coordinator for implementing on-demand code may be found in co-pending U.S. patent application Ser. No. 15 / 362,696, entitled “ON-DEMAND CODE EXECUTION IN A LOCALIZED DEVICE COORDINATOR” and filed on Nov. 28, 2016, the entire contents of which are hereby incorporated by reference.

[0016] In some cases, the service provider environment may provide functions similar to or identical to those of the coordinator. For example, the coordinator may function based at least in part on the execution of a portable code segment or "task". Similarly, the service provider environment may include an on-demand execution code environment for performing the same or similar tasks. More details about this on-demand code execution environment may be found in U.S. Patent No. 9,323,556 ("the '556 patent"), entitled "PROGRAMMATIC EVENT DETECTION AND MESSAGE GENERATION FORREQUESTS TO EXECUTE PROGRAM CODE" and filed on September 30, 2014, the entire contents of which are hereby incorporated by reference. In short, in order to perform tasks, the on-demand code execution environment may maintain a pool of pre-initialized virtual machine instances that can be used immediately upon receiving a user request. Due to the pre-initialized nature of these virtual machines, the delays (sometimes referred to as latency) associated with executing user code (e.g., instance and language runtime startup time) may be significantly reduced, typically to less than 100 milliseconds.

[0017] Illustratively, the on-demand code execution environment can maintain a pool of virtual machine instances on one or more physical computing devices, each of which has one or more software components (e.g., operating system, language runtime, library, etc.) loaded thereon. When the on-demand code execution environment receives a request to execute a user's program code ("task") (the request specifies one or more computing constraints for executing the user's program code), the on-demand code execution environment can select a virtual machine instance for executing the user's program code based on the one or more computing constraints specified by the request and can cause the user's program code to be executed on the selected virtual machine instance. The program code can be executed in an isolated container created on the virtual machine instance. Since the virtual machine instances in the pool have been started and loaded with specific operating systems and language runtimes before receiving the request, the delay associated with finding computing power that can process the request (e.g., by executing the user code in one or more containers created on the virtual machine instance) is significantly reduced.

[0018] The on-demand code execution environment may include a virtual machine instance manager, as described in more detail in the '556 patent, which is configured to receive user code (threads, programs, etc., composed of any of a variety of programming languages) and execute the code in a highly scalable, low-latency manner without requiring the user to configure the virtual machine instance. Specifically, the virtual machine instance manager may create and configure the virtual machine instance according to a predetermined set of configurations before receiving the user code and before receiving any information from the user about any particular virtual machine instance configuration, each configuration corresponding to any one or more of a variety of runtime environments. Thereafter, the virtual machine instance manager receives a user-initiated request to execute code and identifies a preconfigured virtual machine instance to execute the code based on the configuration information associated with the request. The virtual machine instance manager may also allocate the identified virtual machine instance to at least partially execute the user's code by creating and configuring a container within the allocated virtual machine instance. Various embodiments for implementing the virtual machine instance manager and executing user code on the virtual machine instance are described in more detail in the '556 patent.

[0019] As discussed above, in some cases, the coordinator may be configured to perform tasks locally (e.g., on the coordinator). Each task submitted by the coordinating device may include a handler that facilitates the coordinator to perform the task and generate a processing result in response to the submitted task request. However, as described above, in some embodiments, the coordinating device may submit multiple tasks that share at least a portion of the executable code for execution at the coordinator. For coordinators implemented with more limited computing resources, as the number of tasks to be performed increases, the computing resource requirements as memory may exceed availability. Therefore, the coordinator may not be able to correctly execute all submitted tasks, or may execute the submitted tasks in a less efficient manner. Further, for coordinators including computing devices (e.g., tablet computing devices) with alternative functions, the execution of extended tasks may limit the ability of the coordinator to perform alternative functions. Therefore, the operation of the coordinator and the coordination network may be affected based on the available computing resources.

[0020] Because the on-demand code execution environment implemented by the coordinator may be associated with more limited computing resources than the on-demand code execution environment described in the '556 patent (which may be implemented, for example, in a data center), the coordinator may implement a scheduler to assist in prioritizing the execution of tasks. Specifically, the scheduler receives calls to execute tasks and queues the calls, such as work items, into a work item queue. The scheduler may then selectively dequeue calls from the work item queue based on a scheduling algorithm. The scheduler may utilize any number of scheduling algorithms, such as first-in-first-out scheduling, minimum deadline priority scheduling, shortest remaining time scheduling, fixed priority preemptive scheduling, and round-robin scheduling.

[0021] Illustratively, each scheduling algorithm may be implemented based on the amount of available computing resources of the coordinator and the amount of resources required to complete the task call (e.g., which may be set by the creator of the task or the administrator of the coordinator, or may be estimated based on static or dynamic analysis of the task). In some cases, the scheduling algorithm may also be based at least in part on the priority assigned to the task by the creator of the task, the administrator of the coordinator, the calling entity, etc. The scheduler may process the work item queue according to the scheduling algorithm, and when a task call is selected to be dequeued, the task call is completed by executing the task corresponding to the call (e.g., according to the parameters of the call). As further discussed, according to aspects of the present application, the coordinator may facilitate the execution of additional tasks by replacing at least a portion of the individual tasks provided by one or more coordination devices with multiple iterations of group-based tasks.

[0022] To assist in the execution of tasks, the coordinator may also include a resource manager to monitor the computing resource usage at the coordinator and manage the generation, destruction and maintenance of the execution environment in which the tasks will be executed. The execution environment may include any part of the memory logically allocated to the task execution. Illustratively, the execution environment may correspond to a "container", an operating system-level virtualization environment, or a "sandbox" environment such as a "chroot jail" or a Python virtual environment "virtualenv". In other cases, the execution environment may correspond to a virtual machine environment (e.g., a JAVA virtual machine, a virtualized hardware device with different operating systems, etc.). In yet other cases, the execution environment may be a memory space allocated to the execution of the task without having to utilize virtualization. Illustratively, the resource manager may enable the scheduler to retrieve the current computing resource availability information of the coordinator, such as the amount of available memory, (e.g., processor cycles of a central processing unit, a graphics processing unit, etc.), network bandwidth or other computing resources, so as to enable the scheduler to determine which task calls are to be dequeued from the work item queue.

[0023] In some cases, the resource manager may provide other information to the scheduler, such as a list of current task executions occurring at the coordinator. The resource manager may also receive and process requests from the scheduler to obtain an execution environment to which the task call is to be passed. Illustratively, in the case where each task (individual or group-based) is executed in a separate execution environment and no execution environment exists for a given task, the resource manager may determine the resources required to execute a given task (e.g., in terms of basic computing resources such as processor capacity and memory, and in terms of software resources such as drivers, runtimes, utilities, dependencies, etc.) and may generate an execution environment to provide such resources. The resource manager may then return identification information for the execution environment to the scheduler so that the scheduler may pass the call to execute the task to the execution environment. In some cases, the resource manager may also realize the reuse of an existing execution environment. For example, some tasks (including group-based tasks) may be "pinned" so that an execution environment is pre-generated for the task. Therefore, when the resource manager receives a request to generate an execution environment for a task, identification information for a pre-generated environment may be returned, thereby reducing the time and computing resources required to generate the execution environment. In some cases, the execution environment may be reused across tasks, such as when two different tasks require the same or similar resources to execute. In such cases, the resource manager may "clean up" the execution environment between different task executions to ensure security between executions. As will be described in more detail below, the resource manager may also be able to suspend and resume the execution environment, so that the execution environment of a low priority task may be suspended to release computing resources to a high priority task, and resume the execution environment of a low priority task according to a scheduling algorithm.

[0024] As described above, according to various aspects of the present disclosure, a coordination environment for executing on-demand code with reduced memory usage is provided. More specifically, a coordinator receives individual on-demand code execution requests or tasks from a coordination device. The coordinator may process on-demand code execution requests to associate at least a subset of on-demand code execution with one or more groups of shared executable code. For example, a coordination device may transmit tasks related to system-level tasks with common executable code. The coordinator may maintain a main process (or task) associated with a common executable code for task grouping, rather than maintaining executable code for each received task and scheduling and managing tasks as described above. In addition, the coordinator may then maintain an individual work item queue, which maintains state information about individual tasks. The coordinator may implement the execution of individual tasks without separately loading and executing on-demand executable code. Therefore, the coordinator may be implemented on a computing device with more limited computing resources by reducing the memory usage required to execute on-demand tasks while maintaining individual states and configurations for multiple iterations of the execution of the requested on-demand tasks.

[0025] Although for illustrative purposes, aspects of some embodiments described in this disclosure will focus on processing authentication and authorization information and generating processing results, those skilled in the relevant art will appreciate that these examples are merely illustrative and are not necessarily intended to be limiting. As those skilled in the art will appreciate based on this disclosure, the embodiments disclosed herein improve the ability of computing systems, particularly computing systems with limited localized user interfaces, to be coordinated and managed by external devices.

[0026] The foregoing aspects of the present disclosure and many of the attendant advantages may be better understood by reference to the following detailed description in conjunction with the accompanying drawings, whereby the aspects and advantages will be more readily appreciated. Figures 1 to 6 Various embodiments and aspects of the present application are described. Any content in the present application should not be interpreted in a manner that requires any specific combination of embodiments or examples. In addition, those skilled in the relevant art will recognize that one or more aspects or embodiments of the present application can be easily combined, and other inventive aspects of the present application can be produced.

[0027] Figure 1 is a block diagram of an illustrative operating environment 100, which includes: one or more coordination environments 110, in which a coordinator 114 can be operated to control a coordination device 112; and a client device 102, which can interact with the coordination environment 110 (for example, to request a change in the state of the coordination device 112); and a service provider environment 120, which can assist in communication with the coordinator 114 or configuration of the coordinator in various coordination environments 110.

[0028] The coordination environment 110, the client device and the service provider environment 120 may communicate via a network 104, which may include any wired network, wireless network or a combination thereof. For example, the network 104 may be a personal area network, a local area network, a wide area network, an air broadcast network (e.g., for radio or television), a cable network, a satellite network, a cellular telephone network or a combination thereof. As another example, the network 104 may be a publicly accessible network of linked networks that may be operated by various different parties, such as the Internet. In some embodiments, the network 104 may be a private or semi-private network, such as a company or university intranet. The network 104 may include one or more wireless networks, such as a global system for mobile communications (GSM) network, a code division multiple access (CDMA) network, a long term evolution (LTE) network or any other type of wireless network. The network 104 may use protocols and components for communicating via any of the Internet or other aforementioned types of networks. For example, the protocols used by the network 104 may include a hypertext transfer protocol (HTTP), HTTP security (HTTPS), MQTT, a constrained application protocol (CoAP), etc. The protocols and components for communicating via the Internet or any of the other aforementioned types of communication networks are well known to those skilled in the art and are therefore not described in further detail herein. Figure 1 All components of network 104 are shown in , but one or more components, such as routers, may be used as message processing services.

[0029] Each coordination environment 110 may include a network of execution environments (the network may be Figure 1 10 and 110. The coordination devices 112 and coordinators 114 in a given coordination environment may be considered "local" to each other in terms of the communication network due to their association within the coordination environment 110. For example, the coordination devices 112 and coordinators 114 in a given coordination environment may be connected via a LAN or other localized communication network.

[0030] Each coordination device 112 may correspond to a computing device configured to communicate with the coordinator 114 to manage the functions of the coordination device 112. In some cases, the coordination device 112 may correspond to a full-featured computing device with robust localized user interface capabilities, such as a laptop computer, a desktop computer, a stand-alone media player, etc. In other cases, the coordination device 112 may correspond to a streamlined device or embedded device associated with another primary function, such as a device embedded in a household appliance or device or attached as an accessory to a household appliance or device (such as a refrigerator, a washing machine, a hot water heater, a stove, a door lock, a light bulb, an electrical socket, an electrical switch, etc.). In some cases, such appliances or devices are referred to as "smart" devices, IoT devices, or "connected" devices. As such, the coordination device 112 may include a limited local user interface and may be configured for remote management. In some cases, the coordination device 112 may be stateful and may operate in response to instructions to change their state (e.g., by changing from "off" to "on", etc.).

[0031] As described in more detail below (e.g., with respect to Figure 2 ), the coordinator 114 may correspond to a computing device that executes instructions for coordinating, managing, or controlling the operation of the coordination device 112 without requiring the instructions to be transmitted to the coordination device 112 traveling outside the coordination environment 110 (thereby increasing the security of such instructions and increasing their transmission speed). Similar to the coordination device, in some cases, the coordinator 114 may correspond to a computing device with robust localized user interface capabilities, such as a laptop computer, a desktop computer, a server computing device, a tablet computer, etc. In other cases, the coordination device 112 may correspond to a streamlined device or embedded device associated with another primary function, such as a device embedded in a household appliance or device or attached as an accessory to a household appliance or device (such as a refrigerator, a washing machine, a hot water heater stove, a door lock, a light bulb, an electrical socket, an electrical switch, etc.). As described above, in at least some embodiments, the coordinator 114 can be resource-constrained or can operate in a resource-constrained manner. Illustratively, when the coordinator is resource-constrained or otherwise operates in a resource-constrained manner, the coordinator 114 may maintain a main process associated with common executable code for groupings of tasks to facilitate execution of the tasks by the coordinating device 112 .

[0032] Specifically, the coordinator 114 may include a processor and a memory that are collectively configured to manage communications between any combination of the coordinating device 112, the client device 102, and the devices of the service provider network 121. The coordinator may also be configured to enable the execution of tasks in a manner similar to the on-demand code execution environment 140 of the service provider environment 120. These tasks may implement various user-defined or non-user-defined functions, including communicating with the coordinating device 112, the client device 102, and the devices of the service provider network 121. Illustrative examples of how the coordinator 114 may schedule the execution of tasks in an on-demand execution environment are disclosed in the '696 application, which has been incorporated herein by reference. In this way, the coordinator 114 may be configured to allow manual, automatic, or semi-automatic control of the coordinating device 112. For example, the coordinator 114 may enable the client device 102 to transmit a request to change the state of the coordinating device 112 and cause such a change in state to occur. As another example, the coordinator 114 may enable a user to specify criteria under which the state of the coordinating device 112 should be changed, and then automatically operate when the criteria are met to change the state of the coordinating device 112. As will be discussed below, many of the functions of the coordinator 114 may be established via tasks so that they can be quickly changed as desired by the user.

[0033] The client device 102 may include various computing devices that enable a user to communicate with the coordination environment 110, the service provider environment 120, or both. In general, the client device 102 may be any computing device, such as a desktop, laptop or tablet computer, a personal computer, a wearable computer, a server, a personal digital assistant (PDA), a hybrid PDA / mobile phone, a mobile phone, an e-book reader, a set-top box, a voice command device, a camera, a digital media player, etc. The service provider environment 120 may provide the client device 102 with one or more user interfaces, command line interfaces (CLIs), application programming interfaces (APIs), and / or other programming interfaces for interacting with the service provider environment 120, such as for: submitting configurations for the orchestrator 114 and controlling the deployment of the configurations; submitting code corresponding to tasks to be executed on the orchestrator 114 or the on-demand code execution environment 140 of the service provider environment 120; viewing logging or monitoring information related to the orchestrator 114; and the like. Similarly, the coordinator 114 may provide the client device 102 with one or more user interfaces, command line interfaces (CLIs), application programming interfaces (APIs), and / or other programming interfaces for interacting with the coordinator 114, such as for: reading the state of the coordinating device 112, requesting a change in the state of the coordinating device 112, requesting the coordinator 114 to cause the performance of a task, etc. Although one or more embodiments may be described herein as using a user interface, it should be understood that such embodiments may additionally or alternatively use any CLI, API, or other programming interface.

[0034] The service provider environment 120 may include a number of elements for enabling configuration, management, and communication with the orchestrator 114. Specifically, the service provider environment 120 includes a management and deployment service 130 for enabling registration of the orchestrator 114 with the service provider environment 120, configuration of such orchestrator 114, and an on-demand code execution environment 140 that provides on-demand dynamic execution of tasks, as well as deployment and provision of tasks on the orchestrator 114. The service provider environment 120 may also include Figure 1 Additional components or services not shown.

[0035] like Figure 1As shown, the management and deployment service 130 includes a client and data interface 132 and a configuration data storage device 134, which can operate together to enable the registration of the orchestrator 114 to the management and deployment service 130, the generation of the configuration of the orchestrator 114, and the transmission of the configuration data to the orchestrator 114. Illustratively, the client and data interface 132 can provide one or more user interfaces (e.g., API, CLI, GUI, etc.) through which a user can generate or submit a configuration for the orchestrator 114 via the client device 102 for storage in the configuration data storage device 134. The client and data interface 132 can also provide one or more interfaces through which the orchestrator 114 can obtain the configuration so that the orchestrator 114 is reconfigured according to the obtained configuration. The configuration data storage device 134 can correspond to any persistent or substantially persistent data storage device, such as a hard disk drive (HDD), a solid state drive (SDD), a network attached storage device (NAS), a tape drive, or any combination thereof.

[0036] The on-demand code execution environment 140 may include multiple devices that provide on-demand execution of tasks (e.g., portable code segments). Specifically, the on-demand code execution environment 140 may include a front end 142, through which a user may submit tasks to the on-demand code execution environment 140 via the client device 102 and request that the tasks be performed on the on-demand code execution environment 140. Such tasks may be stored, for example, in a task data storage device 154, which may correspond to any persistent or substantially persistent data storage device, such as a hard disk drive (HDD), a solid state drive (SDD), a network attached storage device (NAS), a tape drive, or any combination thereof. Although in Figure 1 1, but the on-demand code execution system 150 may include a variety of additional components to enable the execution of tasks, such as: multiple execution environments (e.g., containers or virtual machines executed on the physical host device of the on-demand code execution environment 140); a worker manager to manage such execution environments; and a warm pool manager to assist in quickly (e.g., within 10 ms) providing execution environments to the worker managers. More details on the on-demand code execution environment can be found in the '556 patent, which is incorporated by reference.

[0037] As noted above, tasks can be utilized at the on-demand code execution environment 140 at the coordinator 114. As noted above, tasks correspond to individual sets of user codes (e.g., to implement specific functions). References to user codes as used herein may refer to any program code (e.g., programs, routines, subroutines, threads, etc.) written in a specific programming language. In the present disclosure, the terms "code," "user code," and "program code" are used interchangeably. For example, such user codes may be executed in conjunction with a specific web application or mobile application developed by a user to implement a specific function. The specific execution of the code is referred to herein as "task execution" or simply "execution." By way of non-limiting example, tasks may be written in JavaScript (e.g., node.js), Java, Python, and / or Ruby (and / or another programming language). As further noted in the present application, group-based tasks correspond to executable codes associated with a common executable code for task grouping, and may be executed by the coordinator 114 instead of individual tasks. Such execution reduces the memory constraints of the coordinator by reducing the storage of individual tasks for execution.

[0038] Tasks can be "triggered" to perform tasks on the on-demand code execution system 150 or the coordinator 114 in various ways. In one embodiment, the client device 102 or other computing device can transmit a request to perform a task, which can generally be referred to as a "call" to perform a task. Such a call may include the user code to be executed (or its location) and one or more parameters for executing the user code. For example, the call can provide the user code of the task and the request to perform the task. In another example, the call can identify the previously uploaded task by its name or identifier. In another example, the code corresponding to the task can be included in the call of the task and can be uploaded in a separate location (e.g., a storage device of the coordinator 114, a network-accessible storage service, or a task data storage device 144), and then the request is received by the coordinator 114 or the on-demand code execution system 150. The request interface of the coordinator 114 or the on-demand code execution system 150 can receive a call to perform a task as a hypertext transfer protocol secure (HTTPS) request from a user. Similarly, when executing a task, any information (e.g., headers and parameters) contained in the HTTPS request can also be processed and utilized. As discussed above, any other protocol, including, for example, HTTP, MQTT, and CoAP, may be used to transmit the message containing the task call to the request interface 122 .

[0039] The call to perform a task may specify one or more third-party libraries (including native libraries) to be used with the user code corresponding to the task. In one embodiment, the call may provide a ZIP file to the coordinator 114 or the on-demand code execution system 150, the ZIP file containing the user code and any library (and / or an identification of its storage location) corresponding to the task requested to be performed. In some embodiments, the call includes metadata indicating the program code of the task to be performed, the language in which the program code is written, the user associated with the call, and / or the computing resources (e.g., memory, etc.) reserved for executing the program code. For example, the program code of the task may be provided with a call previously uploaded by a user, provided by the coordinator 114 or the on-demand code execution system 150 (e.g., a standard routine), or provided by a third party.

[0040] In some embodiments, such resource-level constraints (e.g., the amount of memory to be allocated for executing a particular user code) are specified for a particular task and do not change each time the task is executed. In such cases, the coordinator 114 or the on-demand code execution system 150 may access such resource-level constraints before receiving each individual call, and the individual call may not specify such resource-level constraints. In some embodiments, the call may specify other constraints such as permission data, which indicates the kind of permission or authorization that the call enables to execute the task. Such permission data can be used by the on-demand code execution system 150 to access private resources (e.g., on a private network).

[0041] In some embodiments, the call may specify the behavior that should be adopted to process the call. In such embodiments, the call may include an indicator for enabling one or more execution modes, in which the task referenced in the call may be executed. For example, the call may include a flag or header for indicating whether the task should be executed in debug mode, in which the debugging and / or logging output generated in relation to the execution of the task may be provided back to the user (e.g., via a console user interface). In such examples, the coordinator 114 or the on-demand code execution system 150 may check the call and look for a flag or header, and if present, the coordinator 114 or the on-demand code execution system 150 may modify the behavior of the execution environment in which the task is executed (e.g., a logging function), and cause the output data to be provided back to the user. In some embodiments, the behavior / mode indicator is added to the call by a user interface provided to the user by the coordinator 114 or the on-demand code execution system 150. Based on the indication provided in the call, other features, such as source code analysis, remote debugging, etc., may also be enabled or disabled.

[0042] Service Provider Environment 120 Figure 1is depicted as operating in a distributed computing environment that includes the use of one or more computer networks ( Figure 1 The service provider environment 120 may also be a plurality of computer systems interconnected by a plurality of computer systems (not shown). Figure 1 The computing environment may be operated within a fewer or greater number of devices as shown. Figure 1 The depiction of the service provider environment 120 in FIG. 1 should be considered illustrative and not limiting of the present disclosure. For example, the service provider environment 120 or its various components may implement various Web service components, hosted or "cloud" computing environments, and / or peer-to-peer network configurations to implement at least a portion of the processes described herein.

[0043] In addition, the service provider environment 120 may be implemented directly in hardware or software executed by a hardware device, and may include, for example, one or more physical or virtual servers implemented on physical computer hardware configured to execute computer executable instructions for performing various features described herein. The one or more servers may be geographically dispersed or geographically co-located, such as in one or more data centers. In some cases, the one or more servers may operate as part of a system of rapidly provisioned and released computing resources, often referred to as a "cloud computing environment."

[0044] Figure 2 Depicted is the general architecture of a computing system that manages a coordination device 112 within a given coordination environment, generally referred to as a coordinator 114. References to the coordinator 114 may include functionality performed by software modules or tasks or one or more devices. Figure 2 The general architecture of the coordinator 114 depicted in FIG. 1 includes an arrangement of computer hardware and software modules that can be used to implement various aspects of the present disclosure. The hardware modules can be implemented using physical electronic devices, as discussed in more detail below. The coordinator 114 may include more than Figure 2 More (or fewer) elements are shown. However, in order to provide an enabling disclosure, it is not necessary to provide all of these generally conventional elements. In addition, Figure 2 The general architecture shown in can be used to implement Figure 1 One or more of the other components shown in .

[0045] As shown, the coordinator 114 includes a processing unit 204, a network interface 206, a computer-readable medium drive 207, and an input / output device interface 208, all of which can communicate with each other via a communication bus. The network interface 206 can provide connectivity to one or more networks or computing systems. Therefore, the processing unit 204 can receive information and instructions from other computing systems or services via the network 104. The processing unit 204 can also communicate to and from the memory 250 and can also provide output information for an optional display (not shown) via the input / output device interface 208. The input / output device interface 208 can also accept input from an optional input device (not shown).

[0046] The memory 250 may contain computer program instructions (which are grouped into modules in some embodiments), and the processing unit 204 executes the computer program instructions to implement one or more aspects of the present disclosure. The memory 250 generally includes a random access memory (RAM), a read-only memory (ROM), and / or other persistent, auxiliary or non-transitory computer-readable media. The memory 250 may store an operating system 252, which provides computer program instructions for use by the processing unit 204 in the general management and operation of the coordinator 114. The memory 250 may also include computer program instructions and other information for implementing various aspects of the present disclosure. For example, in one embodiment, the memory 250 includes a process manager 254, a scheduler 256, a deployment agent 258, and a communication manager 260.

[0047] The scheduler 256 and the deployment agent 258 may be executed by the processing unit 204 to select tasks for execution by the processing unit 204 and to manage such task execution. Specifically, the scheduler 256 may include instructions for selecting a task for execution at a given point in time; and suspending execution of a task (e.g., in the event that resources at the coordinator 114 are constrained). The deployment agent 258 may include instructions for selecting an appropriate execution environment 270 in which to execute the task; providing the execution environment 270 with appropriate access to resources required during task execution; and causing the execution of the task within the execution environment 270. As applied to the present application, the scheduler may execute group-based tasks in an execution environment instead of individual task execution requests received from the coordination device 112.

[0048] As used herein, execution environment 270 refers to a logical portion of memory 250 in which a task is executed. In one embodiment, execution environment 270 is programmatically separated so as to prohibit execution of code in a first execution environment 270 from modifying memory associated with another execution environment 270. Illustratively, execution environment 270 may correspond to a "container", an operating system-level virtualization environment, or a "sandbox" environment such as a "chroot jail" or a Python virtual environment "virtualenv". In other cases, execution environment 270 may correspond to a virtual machine environment (e.g., a JAVA virtual machine, a virtualized hardware device with a different operating system, etc.). In yet other cases, execution environment 270 may be a memory space allocated to task execution without having to utilize virtualization.

[0049] The communication manager 260 can facilitate communication between tasks executing on the coordinator and between the coordinator 114 and other devices (e.g., client devices 102 and coordination devices 112). Specifically, the communication manager 260 can be configured to obtain messages directed to the coordinator 114 and forward the messages to the appropriate destination. For example, the communication manager 260 can route messages between any combination of tasks, coordination devices 112, client devices 102, and devices of the service provider environment 120.

[0050] The tasks performed by the coordinator 114 are shown as being logically grouped within a task memory space 280, which may correspond to a logical unit of the memory 250 configured to store code corresponding to each task. Figure 2 As shown, the task memory space 280 may include multiple tasks that can be executed by the processing unit 204 to implement the functions of the coordinator 114, including a router task 282, one or more communication manager tasks 286, a shadow service task 288, and one or more client-provided tasks 290.

[0051] The router task 282 may correspond to a portion of code that can be executed to assist in routing messages within, to, and from the coordinator. In one embodiment, the router task 282 implements a "routing table" to determine the appropriate destination of the message. For example, the communication manager 260 may forward messages obtained at the coordinator 114 (e.g., messages generated due to task execution or reception at the input / output interface 208) to the router task 282, which may use the routing table to determine that messages addressed to a specific identifier should be routed to a given task, a given client device 102, or a given coordination device 112. The routing table may also indicate that messages addressed to the identifier should be transmitted to the service provider environment 120 (e.g., to a device shadow service or an on-demand code execution system 150). In one embodiment, the routing table may use a "topic" as an identifier so that messages associated with a specific topic are routed according to the routing specified for the topic. The routing table may also include information about how to route messages based on the source of those messages. For example, messages addressed to a given topic may be routed in different ways based on whether the message is received from a first task, a second task, a first coordination device 112, etc. By utilizing a routing table, the router task 282 enables messages to be redirected without changing the operation of the sender of such messages (e.g., without rewriting code for the task that generated the message, without modifying the software of the coordination device 112 that generated the message, etc.).

[0052] The communication manager tasks 286 may enable communication between the coordinator 114 and a plurality of different external devices (e.g., the coordinating device 112) according to the protocol for such communications. For example, the first communication manager task 286 may be configured to use BLUETOOTH TM The first communication manager task 286 may be configured to manage communications using a TCP protocol, the second communication manager task 286 may be configured to manage communications using an HTTP protocol, and so on. In some cases, multiple communication manager tasks 286 may work together to enable communications. For example, a first communication manager task 286 may enable communications via a TCP protocol, while a second communication manager task 286 may enable communications via an MQTT protocol (which utilizes the TCP protocol and therefore may utilize the first communication manager task 286). Because different communication manager tasks 286 may change the ability of the coordinator 114 to communicate via different protocols, and because the tasks of the coordinator 114 may be changed via reconfiguration of the coordinator 114, the coordinator 114 may be quickly reconfigured to utilize a variety of different communication protocols.

[0053] The work manager task 288 may facilitate management and interaction of the execution of the shared on-demand code by the coordinator 114. Illustratively, the work manager task 288 may associate incoming tasks with group-based shared on-demand code (generally referred to as group-based on-demand code) to maintain a work queue to hold state information about tasks associated with the execution of the group-based on-demand code.

[0054] In addition to the above tasks (each of which may be illustratively provided by an entity associated with the service provider environment 120), the task memory space 280 may include any number of group-based on-demand codes or group-based tasks 290, which may correspond to executable code for deployment to the coordinator 114. In this way, the functionality provided by the task 290 provided by the client may vary according to the expectations of the submitting user. In some cases, the task 290 provided by the client may be written in a coding language in which the memory 250 includes a language runtime. For example, in the case where the coordinator 114 supports languages ​​such as node.js, Go, JAVA, and Python, the task 290 provided by the client may include executable code written in any of those languages. As described above, group-based on-demand code is associated with organizational standards (such as functions, creators, resources accessed, results, etc.). In some embodiments, the task memory space 280 may include individual tasks that are not included as group-based on-demand code or have been explicitly excluded as group-based on-demand code.

[0055] Additionally, the memory 250 includes a configuration data portion 272, which represents a logical portion of the memory 250 in which configuration data for the coordinator 114 is stored. The configuration data may include, for example, a currently deployed version of the coordinator 114, data stored by tasks in the task memory space 280, or other data used in the operation of the coordinator 114.

[0056] To enable configuration (and reconfiguration) of the orchestrator 114, the memory 250 also includes a deployment agent 258. The deployment agent 258 may correspond to code executable to: register the orchestrator with the service provider environment 120; determine a desired configuration for the orchestrator 114; and, in the event that the current configuration of the orchestrator 114 does not match the desired configuration, obtain configuration data for the orchestrator 114 and modify the memory 250 to achieve the desired configuration.

[0057] Figure 3A One embodiment of the architecture of an illustrative coordination device 112A in accordance with the present application is depicted. Figure 3AThe general architecture of the coordination device 112A depicted in the figure includes an arrangement of computer hardware and software components that can be used to implement various aspects of the present disclosure. As shown, the coordination device 112A includes a processing unit 304, a network interface 306, a computer-readable medium drive 307, an input / output device interface 320, an optional display 302, and an input device 324, all of which can communicate with each other via a communication bus. Illustratively, the coordination device 112A may have more limited functions and components, such as input or output, embedded devices.

[0058] The network interface 306 can provide communication to one or more networks or computing systems such as Figure 1 The processing unit 304 may also communicate to and from the memory 310 and may also provide output information for the optional display 302 via the input / output device interface 320. The input / output device interface 320 may also accept input from an optional input device 324 such as a keyboard, mouse, digital pen, touch screen, etc. In some embodiments, the coordination device 112A may include a processor, ... Figure 3A 306. For example, some embodiments of coordination device 112 may omit display 302 and input device 324, while providing input / output capabilities through one or more alternative communication channels (e.g., via network interface 306). Alternatively, coordination device 112A may omit input / output device interface 320 entirely.

[0059] Memory 310 may include computer program instructions that processing unit 204 executes to implement one or more embodiments. Memory 310 generally includes RAM, ROM, or other persistent or non-transitory memory. Memory 310 may store an operating system 314 that provides computer program instructions for use by processing unit 304 in the general management and operation of coordination device 112A. Memory 310 may also include computer program instructions and other information for implementing various aspects of the present disclosure. For example, in one embodiment, memory 310 includes a browser application 316 for accessing content. Illustratively, browser application 316 may include a complete software browser application, a portion of a browser application, or may simply be a software application (or executable instructions) that provides data connectivity.

[0060] Figure 3B One embodiment of an alternative architecture for an illustrative coordination device 112B in accordance with the present application is depicted. Figure 3BThe general architecture of the coordination device 112B depicted in FIG. 1 includes an arrangement of computer hardware and software components that can be used to implement various aspects of the present disclosure. However, the coordination device 112B may be associated with a reduced number of components, which may limit the computing functionality and operation of the coordination device 112B. As shown, the coordination device 112B includes a processing unit 350 and a network interface 352 that communicate with a communication bus. Figure 3A Unlike coordination device 112A, coordination device 112B may not have a computer-readable media drive, input / output device interface, optional display, or input device.

[0061] The network interface 352 can provide communication to one or more networks or computing systems such as Figure 1 104). Thus, processing unit 350 may receive information and instructions from other computing systems or services via the network. Memory 354 may include computer program instructions that processing unit 350 executes to implement one or more embodiments. Memory 354 generally includes RAM, ROM, or other persistent or non-transitory memory. In this embodiment, memory 354 may necessarily store a complete operating system that provides computer program instructions for use by processing unit 350 in the general management and operation of coordination device 112B. Rather, in one embodiment, memory 354 includes an interface software component 356 for accessing received and processed instructions.

[0062] Figure 4 One implementation of the architecture of an illustrative client device 102 in accordance with the present application is depicted. Figure 4 The general architecture of the client device 102 depicted in the figure includes an arrangement of computer hardware and software components that can be used to implement various aspects of the present disclosure. As shown, the client device 102 includes a processing unit 404, a network interface 406, a computer-readable medium drive 407, an input / output device interface 420, an optional display 402, and an input device 424, all of which can communicate with each other via a communication bus.

[0063] Network interface 406 can provide communication to one or more networks or computing systems such as Figure 1 The processing unit 404 may also communicate to and from the memory 410 and may also provide output information for the optional display 402 via the input / output device interface 420. The input / output device interface 420 may also accept input from an optional input device 424 such as a keyboard, mouse, digital pen, etc. In some embodiments, the client device 102 may include a computer system such as a computer, a computer, or a computer program product. Figure 4For example, some embodiments of the coordination device 112 may omit the display 402 and the input device 424, while providing input / output capabilities through one or more alternative communication channels (e.g., via the network interface 406). In addition, the client device 102 may also omit the input / output device interface 420 entirely.

[0064] Memory 410 may include computer program instructions that processing unit 204 executes to implement one or more embodiments. Memory 410 generally includes RAM, ROM, or other persistent or non-transitory memory. Memory 410 may store an operating system 414 that provides computer program instructions for use by processing unit 404 in general management and operation of client device 102. Memory 410 may also include computer program instructions and other information for implementing various aspects of the present disclosure. For example, in one embodiment, memory 410 includes a browser application 416 for accessing content. Illustratively, browser application 416 may include a complete software browser application, a portion of a browser application, or may simply be a software application (or executable instructions) that provides data connectivity. For purposes of the present application, client device 102 may facilitate configuration of group-based on-demand code or selection criteria for group-based on-demand code.

[0065] Now go to FIG. 5A to FIG. 5B , illustrative interactions between components of a content management system will be described to process task execution requests using group-based on-demand code or group-based on-demand tasks. More specifically, FIG. 5A to FIG. 5B The description will be made with respect to the interactions between the coordination device 112, the coordinator 114, the client device 102, and the service provider environment 120. As previously indicated, in one embodiment, the coordinator 114 may be configured to perform tasks related to receiving and maintaining authorization and authentication information and processing authentication and authorization requests from the coordination device 112 to generate processing results. However, even if used for illustrative purposes, references to the interactions should not be limited to any particular device or combination of devices. Additionally, in some embodiments, one or more of the client device 102 or the service provider environment 120 may be omitted.

[0066] refer to Figure 5A, the initial configuration of the coordinator 114 will be described. Illustratively, the service provider environment 120 or the client device may facilitate the configuration and coordination of group-based on-demand codes. Illustratively, the working components of the coordinator 114 configure a set of group-based on-demand codes. At (1), the coordinator 114 receives a configuration for one or more group-based on-demand codes. In one aspect, the configuration may include identification of specific tasks (such as system-level tasks) that are considered to be group-based on-demand codes. In another aspect, the configuration of the tasks is a matching criterion for allowing the coordination device to determine which task requests correspond to group-based on-demand codes. In other aspects, the configuration may include other search criteria or processing instructions for allowing the coordination device to evaluate tasks that may be group-based on-demand codes, or to dynamically process tasks to determine whether a task corresponds to a group-based task.

[0067] At (2), the coordinator 114 processes the configuration information. In one aspect, the coordinator 114 may parse and store various configuration information and standards. In another aspect, the coordinator 114 may request and receive tasks or on-demand codes that form group-based on-demand codes. At (3), the coordinator 114 initiates the execution of the group-based on-demand code. As described above, the execution of the group-based on-demand code includes the initiation of a manager component for registering a new implementation of the group-based on-demand code and for maintaining state information about each iteration of the group-based on-demand code. More specifically, the manager component may maintain an instance of a work node or worker manager, which includes state information required or generated for the execution of the group-based task for each iteration of the execution of the group-based task. The work node or worker manager allows the manager component of the coordinator 114 to manage multiple executions of the group-based task based on requests from one or more coordination devices 112. In addition, in some embodiments, the manager component may also manage multiple executions of the group-based on-demand code and make modifications when one execution of the group-based on-demand code may affect other executions. For example, if the execution of an instance of the group-based on-demand code does not proceed or does not produce an error, the manager component may terminate the task so as not to affect other executions of the group-based on-demand code.After configuration is complete, the coordination device is ready to begin execution.

[0068] refer to Figure 5B, the processing of the task will be described. At (1), one or more coordination devices 112 transmit a request to be executed at the coordinator 114. Illustratively, the coordination device 112 transmits the request to the coordinator 114 using a communication protocol. For example, the coordination device may utilize the MQTT protocol to identify the request and provide information that can be used to evaluate the request, such as a provided login name, password, biometric information, etc. The interaction between the coordination device 112 and the coordinator 114 may require a large amount of communication. Depending on the type of request, the information included in the request may include an identifier, a previously issued token, security information, etc.

[0069] At (2), the coordinator 114 determines whether the task execution request corresponds to a group-based task. If so, the coordinator can associate the request with a group-based on-demand code. In one embodiment, the coordinator 114 can look for various identifiers included in the request or task identifier. In another embodiment, the coordinator 114 can process the request, such as by applying criteria, to determine whether the request corresponds to a group-based on-demand code.

[0070] At (3), if the coordinator determines that the request corresponds to a group-based on-demand code, the coordinator 114 begins an iteration of the execution of the group-based on-demand code. As described above, the work manager can generate a work queue that tracks the status or state of multiple executions of the group-based on-demand code. Each instance of the task execution can be represented as a separate worker task or component that manages the input provided in the request, maintains the state, and generates the output. In addition, in some embodiments, the handler of the group-based on-demand code is used as a master handler that can interact with the local handler for each corresponding request task, process the execution of the group-based on-demand code, and provide the processing results to the individual handlers. As described above, by utilizing the group-based on-demand code, the coordinator 114 can improve the processing of tasks submitted by the coordination device 112 in situations where the memory resources of the coordinator 114 are constrained or operated in a constrained manner. Alternatively, the coordinator 114 can also increase the number of tasks that can be processed for execution by executing the group-based on-demand code multiple times and tracking the state.

[0071] At (4), the coordinator 114 generates a processing result and transmits the processing result to the requesting client device 102 .

[0072] Now go to Figure 6, a routine 600 for processing tasks for execution will be described. The routine 600 will be illustratively described with respect to the coordinator 114. As previously indicated, in one embodiment, the coordinator 114 may be configured to perform tasks related to one or more group-based on-demand codes. However, even if used for illustrative purposes, references to interactions should not be limited to any particular device or combination of devices.

[0073] At block 602, the coordinator 114 receives a configuration of one or more group-based on-demand codes. In one aspect, the configuration may include identification of specific tasks (such as system-level tasks) that are considered to be group-based on-demand codes. The identification of the group-based on-demand code may include the reception of the group-based task to be executed. In another embodiment, the configuration may include information that can be used to identify the location or source of the group-based task, such as a library of pre-stored task information, one or more coordination devices, or a service provider network 121. On the other hand, the configuration of the task is a matching criterion for allowing the coordination device to determine which task requests correspond to group-based on-demand codes. The matching criterion may include an identifier to be used in the transmission of the task execution request, an identifier of the content of the task (e.g., a checksum or hash), a creator or distributor of the group-based task, and the like. In other aspects, the configuration may include other search criteria or processing instructions for allowing the coordination device to evaluate tasks that may be group-based on-demand codes, or dynamically process tasks to determine whether a task corresponds to a group-based task.

[0074] At box 604, the coordination device processes the configuration information to configure and instantiate one or more group-based tasks. On the one hand, the coordinator 114 can parse and store various configuration information and standards. On the other hand, the coordinator 114 can request and receive tasks or on-demand codes that form group-based on-demand codes. In addition, the coordinator 114 initiates the execution of group-based on-demand codes. As described above, the execution of group-based on-demand codes includes the initiation of manager components for registering new implementations of group-based on-demand codes and for maintaining state information for each iteration of group-based on-demand codes. More specifically, the manager component can maintain an instance of a work node or worker manager, which includes state information required for the execution of group-based tasks or generated state information for each iteration of the execution of group-based tasks. The work node or worker manager allows the manager component of the coordinator 114 to manage multiple executions of group-based tasks based on requests from one or more coordination devices 112. As described below, in some embodiments, the manager component can also manage such multiple executions of group-based on-demand codes, and modify them when one execution of group-based on-demand codes can affect other executions. For example, if the execution of an instance of the group-based on-demand code does not proceed or does not produce an error, the manager component can terminate the task so as not to affect other executions of the group-based on-demand code. In another example, the manager component can cause the modification of the task, such as changing the parameters of the input, processing the output, or replacing another group-based task. After configuration is complete, the coordination device is ready to start executing the group-based task.

[0075] At block 606, the coordinator 114 receives a request for execution at the coordinator 114. Illustratively, the coordinating device 112 transmits the request to the coordinator 114 using a communication protocol. For example, the coordinating device may utilize the MQTT protocol to identify the request and provide information that may be used to evaluate the request, such as a provided login name, password, biometric information, etc. The interaction between the coordinating device 112 and the coordinator 114 may require a large amount of communication. Depending on the type of request, the information included in the request may include an identifier, a previously issued token, security information, etc.

[0076] At decision block 608, coordinator 114 determines whether the task execution request corresponds to a group-based task. In one embodiment, coordinator 114 may look for various identifiers included in the request or task identifier. In another embodiment, coordinator 114 may process the request, such as by applying a standard, to determine whether the request corresponds to a group-based on-demand code. At block 610, if the coordinator determines that the request corresponds to a group-based on-demand code, coordinator 114 begins iteration of the execution of the group-based on-demand code. As described above, a work manager may generate a work queue that tracks the status or state of multiple executions of the group-based on-demand code. Each instance of task execution may be represented as a separate worker task or component that manages the input provided in the request, maintains state, and generates output. In addition, in some embodiments, a handler for the group-based on-demand code is used as a master handler that interacts with the local handler for each corresponding request task, handles the execution of the group-based on-demand code, and provides the processing result to the individual handler. However, through multiple executions of the group-based on-demand code, the execution of multiple tasks performed by the coordinator uses fewer memory resources than if the coordinator 114 performed all tasks separately. At block 612 , the coordinator 114 generates a processing result and transmits the processing result to the requesting client device 102 .

[0077] Alternatively, at decision block 608 , if the coordinator determines that the request does not correspond to a group-based on-demand code, then at block 614 , the coordinator 114 begins iterations of execution of individual tasks. At block 616 , the coordinator 114 generates and transmits processing results to the requesting client device 102 .

[0078] At block 618 , the coordinator 114 transmits the processing results, and the routine 600 terminates at block 620 .

[0079] All methods and processes described above may be embodied in and fully automated via software code modules executed by one or more computers or processors. The code modules may be stored in any type of non-transitory computer-readable medium or other computer storage device. Some or all of the methods may alternatively be embodied in dedicated computer hardware.

[0080] Unless otherwise specifically stated, conditional language, such as, inter alia, "can," "may," "might," or "might," should generally be understood in context to mean that certain embodiments include certain features, elements, and / or steps, but other embodiments do not include the certain features, elements, and / or steps. Thus, such conditional language is generally not intended to imply that the features, elements, and / or steps are required by one or more embodiments in any way, or that one or more embodiments must include logic for deciding, with or without user input or prompting, whether to include the features, elements, and / or steps or whether to implement the features, elements, and / or steps in any particular embodiment.

[0081] Unless otherwise specifically stated, disjunctive language such as the phrase "at least one of X, Y, or Z" should be understood in context as commonly used to indicate that an item, term, etc. can be X, Y, or Z, or any combination thereof (e.g., X, Y, and / or Z). Thus, such disjunctive language is generally not intended to, and should not, imply that certain embodiments require that at least one of X, at least one of Y, or at least one to each of Z be present.

[0082] Unless expressly stated otherwise, articles such as "a" or "an" are generally interpreted to include one or more of the described items. Thus, phrases such as "a device, the device being configured to" are intended to include one or more of the listed devices. Such one or more listed devices may also be collectively configured to perform the stated statements. For example, "a processor configured to perform statements A, B, and C" may include a first processor configured to perform statement A working together with a second processor configured to perform statements B and C.

[0083] Any routine description, element or box described in this article and / or shown in the drawings should be understood to potentially represent a module, segment or code portion that includes one or more executable instructions for implementing specific logical functions or elements in the program. Alternative implementations are included within the scope of the embodiments described herein, where, as understood by those skilled in the art, elements or functions may be deleted, or executed out of the order shown or discussed, including substantially synchronously or in reverse order, depending on the functions involved.

[0084] It should be emphasized that many changes and modifications may be made to the above-described embodiments, and the elements therein should be understood to belong to other acceptable examples. In this document, all such modifications and changes are intended to be included within the scope of this disclosure and protected by the accompanying claims.

[0085] Examples of embodiments of the present disclosure may be described in view of the following clauses.

[0086] Clause 1. A system for managing access to a computing device, the system comprising: at least one computing device, the at least one computing device having a processor and a memory, the computing device corresponding to a coordination device, wherein the coordination device transmits a request to execute on-demand code to a coordinator service; and a coordinator service, the coordinator service being implemented on at least one computing device having a processor and a memory, wherein the service is configured to: receive configuration information for a set of group-based on-demand codes; cause instantiation of at least one of the group-based on-demand codes based on the configuration information; receive the request to execute the on-demand code from the coordination device; associate the request to execute the on-demand code with the at least one of the group-based on-demand codes; cause the execution of the instantiated group-based on-demand code; and generate a processing result corresponding to the instantiated group-based on-demand code.

[0087] Clause 2. The system of clause 1, wherein the coordinator service associates the request with the group-based on-demand code based on organizational criteria.

[0088] Clause 3. The system of any of Clauses 1 or 2, wherein the coordinator service is further configured to maintain a work queue regarding state information for the execution of the instantiated group-based on-demand code.

[0089] Clause 4. The system of any of clauses 1 to 3, wherein the group-based on-demand code corresponds to a system-level task.

[0090] Clause 5. A method for managing the execution of on-demand code in a coordinated environment, the method comprising: receiving a request to execute on-demand code from one or more coordination devices; associating individual requests to execute the on-demand code with group-based on-demand code; causing the execution of the instantiated group-based on-demand code; and generating a processing result corresponding to the instantiated group-based on-demand code.

[0091] Clause 6. The method of Clause 5, further comprising receiving configuration information for the group-based on-demand code.

[0092] Clause 7. The method of Clause 6, further comprising causing the instantiation of at least one of the group-based on-demand codes based on the configuration information.

[0093] Clause 8. The method of any one of Clauses 5 to 7, wherein associating the individual request to execute the on-demand code with a group-based on-demand code comprises associating the request to the group-based on-demand code based on organizational criteria.

[0094] Clause 9. The method of any one of clauses 5 to 8, further comprising managing the execution of the group-based on-demand code.

[0095] Clause 10. The method of Clause 9, wherein managing the execution of the group-based on-demand code comprises maintaining a work queue regarding state information for the execution of the instantiated group-based on-demand code.

[0096] Clause 11. The method of any of Clauses 9 or 10, wherein managing the execution of the group-based on-demand code comprises causing modification of at least one execution of the group-based on-demand code.

[0097] Clause 12. A method as described in any of clauses 5 to 11, further comprising: receiving a second request to execute on-demand code from one or more coordination devices; causing the execution of the on-demand code that is not associated with the group-based on-demand code; and generating a processing result corresponding to the execution of the on-demand code that is not associated with the group-based on-demand code.

[0098] Clause 13. A method for managing task execution in a coordinated environment, the method comprising: associating individual requests to execute on-demand code with group-based on-demand code; causing the execution of the instantiated group-based on-demand code; and generating processing results corresponding to the instantiated group-based on-demand code.

[0099] Clause 14. The method of Clause 13, further comprising receiving configuration information for a group-based on-demand code set.

[0100] Clause 15. The method of Clause 14, further comprising causing the instantiation of at least one of the group-based on-demand codes based on the configuration information.

[0101] Clause 16. The method of any of Clauses 13 to 15, wherein associating the individual request to execute the on-demand code with a group-based on-demand code comprises associating the request to the group-based on-demand code based on organizational criteria.

[0102] Clause 17. A method as described in any of Clauses 13 to 16, further comprising managing the execution of the group-based on-demand code by maintaining a work queue regarding status information for the execution of the instantiated group-based on-demand code, wherein the authorization and authentication information of the request includes processing information.

[0103] Clause 18. The method of any of Clauses 13 to 17, further comprising managing the execution of the group-based on-demand code by causing termination of at least one execution of the group-based on-demand code.

[0104] Clause 19. A method as described in any of clauses 13 to 18, further comprising: receiving a second request to execute on-demand code from one or more coordination devices; causing the execution of the on-demand code that is not associated with the group-based on-demand code; and generating a processing result corresponding to the execution of the on-demand code that is not associated with the group-based on-demand code.

[0105] Clause 20. The method of any one of Clauses 13 to 19, wherein the group-based on-demand code corresponds to a system-level task.

Claims

1. A computer-implemented method comprising: receiving, by the coordinator device, a request from a first coordinating device among the plurality of coordinating devices to execute a first task, the first task corresponding to code executable on demand in an on-demand computing environment; obtaining information about available computing resources of a plurality of on-demand computing environments, wherein the plurality of on-demand computing environments include a local on-demand computing environment associated with the coordinator device and a remote on-demand computing environment associated with a service provider; identifying, based at least in part on the information regarding the available computing resources, whether the local on-demand computing environment has an amount of available computing resources required to perform the first task; causing the identified local on-demand computing environment to perform the first task by executing the on-demand code on the coordinator device based on a determination that the local on-demand computing environment has an amount of available computing resources required to perform the first task; Obtaining a processing result corresponding to the execution of the first task from the identified local on-demand computing environment; and The processing result is transmitted to the coordination device.

2. The computer-implemented method of claim 1, wherein: Identifying whether the local on-demand computing environment includes determining that the local on-demand computing environment does not have the amount of available computing resources required to perform the first task, and causing a remote on-demand computing environment to perform the first task based on determining that the local on-demand computing environment does not have the amount of available computing resources required to perform the first task.

3. The computer-implemented method of claim 1, wherein: The local on-demand computing environment is associated with a second coordination device among the plurality of coordination devices.

4. The computer-implemented method of claim 3, wherein: Causing the identified local on-demand computing environment to perform the first task includes transmitting at least a portion of the request to the second coordination device.

5. The computer-implemented method of claim 1, wherein: Identifying the local on-demand computing environment is also based at least in part on a priority of the first task.

6. A coordinator device, comprising: a data storage device configured to store computer-executable instructions; as well as a processor in communication with the data storage device, wherein when the computer executable instructions are executed by the processor, the computer executable instructions configure the coordinator device to perform operations comprising: receiving a request from a coordination device to execute a first task, the first task corresponding to code executable on demand in an on-demand computing environment; identifying whether a local on-demand computing environment has an amount of available computing resources required to perform the first task based at least in part on the information regarding available computing resources of the plurality of on-demand computing environments; in response to identifying that the local on-demand computing environment has an amount of available computing resources required to perform the first task, causing the identified local on-demand computing environment to perform the first task by executing the on-demand code on the coordinator device; Obtaining a processing result corresponding to the execution of the first task from the identified local on-demand computing environment; and The processing result is transmitted to the coordination device.

7. The coordinator device according to claim 6, wherein: The coordinator device at least provides the local on-demand computing environment.

8. The coordinator device according to claim 6, wherein: The identified local on-demand computing environment is the remote on-demand computing environment.

9. The coordinator device according to claim 6, wherein: Identifying whether the local on-demand computing environment has an amount of available computing resources required to perform the first task is also based at least in part on a performance metric associated with performing the first task.

10. The coordinator device according to claim 6, wherein: Identifying whether the local on-demand computing environment has an amount of available computing resources required to perform the first task is also based at least in part on a work item queue of an on-demand computing environment associated with the coordinator device.

11. The coordinator device according to claim 6, wherein: The coordination device is a first coordination device among a plurality of coordination devices.

12. The coordinator device according to claim 11, wherein: The identified local on-demand computing environment is provided by a coordination device among the plurality of coordination devices.

13. The coordinator device according to claim 11, wherein: The data storage device is configured to store further computer executable instructions, which when executed by the processor configure the coordinator device to perform further operations, the further operations comprising: receiving a request to perform the first task from a second coordination device; obtaining, from the identified local on-demand computing environment, a second processing result corresponding to a second execution of the first task; and The second processing result is transmitted to the second coordination device.

14. The coordinator device according to claim 13, wherein: Obtaining the second processing result includes resetting the identified local on-demand computing environment between executions of the first task.

15. The coordinator device according to claim 6, wherein: The identified local on-demand computing environment is pre-generated for the first task.

16. A computer-implemented method comprising: obtaining, by the coordinator device, from the coordinating device, a request to execute a first task, the first task corresponding to code executable on demand in the local on-demand computing environment; in response to determining that the local on-demand computing environment has an amount of available computing resources required to perform the first task, causing the local on-demand computing environment to perform the first task by executing the on-demand code on the coordinator device; obtaining, by the coordinator device, a processing result from a first local on-demand computing environment among a plurality of on-demand computing environments, the processing result corresponding to execution of the first task, wherein the first local on-demand computing environment is identified based at least in part on information about available computing resources of the plurality of on-demand computing environments; as well as The processing result is transmitted to the coordination device through the coordinator device.

17. The computer-implemented method of claim 16, further comprising identifying, by the coordinator device, the first local on-demand computing environment.

18. The computer-implemented method of claim 16, wherein: The first local on-demand computing environment is also identified based at least in part on a priority of the first task relative to other tasks in a work item queue.

19. The computer-implemented method of claim 16, further comprising scheduling, by the coordinator device, execution of the first task based at least in part on a scheduling algorithm.

20. The computer-implemented method of claim 19, wherein: The scheduling algorithm includes one or more of first-in-first-out scheduling, minimum deadline scheduling, shortest remaining time scheduling, fixed priority preemptive scheduling or round-robin scheduling.

Citation Information

Patent Citations

  • On-demand code execution in a localized device coordinator

    US20180150325A1

  • Programmatic event detection and message generation for requests to execute program code

    US9323556B2

  • Methods and systems for providing access to a computing environment

    CN101410803A

  • System and method for managing energy consumption in a compute environment

    CN102016748A

  • Cross-domain colony computing resource gathering and distributing method

    CN104461740A