Idempotent task execution in on-demand network code execution systems
First Claim
1. A computer-implemented method comprising:
- obtaining a first request to cause execution of a task, wherein the task is associated with code executable by an on-demand code execution system to implement functionality corresponding to the task, and wherein execution of the task is dependent on a set of resources;
generating an execution environment for the task on the on-demand code execution system at least partly by provisioning the execution environment with the code;
initiating a first execution of the task at least partly by executing the code within the execution environment;
determining states of respective resources, within the set of resources, at a time of the first execution of the task;
obtaining a second request to cause execution of the task;
for individual resources of the set of resources, comparing updated current states of the individual resources and the states of the respective resources at the time of the first execution of the task to determine that the current states of the individual resources match the states of the respective resources at the time of the first execution of the task; and
declining to initiate a second execution of the task in response to the second request.
0 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods are described for handling requests to execute idempotent code in an on-demand code execution system or other distributed code execution environment. Idempotent code can generally include code that produces the same outcome even when executed multiple times, so long as dependencies for the code are in the same state as during a prior execution. Due to this feature, multiple executions of idempotent code may inefficiently use computing resources, particularly in on-demand code execution system (which may require, for example, generation and provisioning of an appropriate execution environment for the code). Aspects of the present disclosure enable the on-demand code execution system to process requests to execute code by verifying whether dependency states associated with the code have changed since a prior execution. If dependency states have not changed, no execution need occur, and the overall computing resource us of the on-demand code execution system is decreased.
-
Citations
21 Claims
-
1. A computer-implemented method comprising:
-
obtaining a first request to cause execution of a task, wherein the task is associated with code executable by an on-demand code execution system to implement functionality corresponding to the task, and wherein execution of the task is dependent on a set of resources; generating an execution environment for the task on the on-demand code execution system at least partly by provisioning the execution environment with the code; initiating a first execution of the task at least partly by executing the code within the execution environment; determining states of respective resources, within the set of resources, at a time of the first execution of the task; obtaining a second request to cause execution of the task; for individual resources of the set of resources, comparing updated current states of the individual resources and the states of the respective resources at the time of the first execution of the task to determine that the current states of the individual resources match the states of the respective resources at the time of the first execution of the task; and declining to initiate a second execution of the task in response to the second request. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system comprising:
-
a data store including computer-executable instructions; and a physical processor configured to execute the computer-executable instructions, wherein execution of the computer-executable instructions causes the system to; obtain a first request to cause execution of a task, wherein the task is associated with code executable by an on-demand code execution system to implement functionality corresponding to the task, and wherein execution of the task is dependent on at least one resource; generate an execution environment for the task on the on-demand code execution system at least partly by provisioning the execution environment with the code; initiate a first execution of the task at least partly by executing the code within the execution environment; determine a state of the at least one resource at a time of the first execution of the task; obtain a second request to cause execution of the task;
determine that a current state of the at least one resource matches the state of the at least one resource at the time of the first execution; andend processing of the second request to cause execution of the task without initiating a second execution of the task. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15)
-
-
16. Non-transitory computer-readable media comprising computer-executable instructions that, when executed, cause a system to:
-
obtain a first request to cause execution of a task, wherein the task is associated with code executable by an on-demand code execution system to implement functionality corresponding to the task, and wherein execution of the task is dependent on at least one resource; generate an execution environment for the task on the on-demand code execution system at least partly by provisioning the execution environment with the code; initiate a first execution of the task at least partly by executing the code within the execution environment; determine a state of the at least one resource at a time of the first execution of the task; obtain a second request to cause execution of the task; determine that a current state of the at least one resource matches the state of the at least one resource at the time of the first execution; and end processing of the second request to cause execution of the task without initiating a second execution of the task. - View Dependent Claims (17, 18, 19, 20, 21)
-
Specification