Asynchronous task management in an on-demand network code execution environment
First Claim
1. A system to manage asynchronous execution of tasks in an on-demand code execution system, the system comprising:
- a non-transitory data store configured to store a queue of operations awaiting execution on the on-demand code execution system, wherein individual operations are associated with code executable to implement functionality corresponding to the individual operations; and
one or more processors configured with computer-executable instructions to;
obtain instructions to execute a first task associated with first executable code;
begin execution of the first executable code, wherein execution of the first executable code calls for execution of a first dependency operation;
determine a deadline for the first dependency operation based at least in part on historical data regarding prior executions of the first executable code;
determine that the deadline for the first dependency operation satisfies a threshold value, wherein the deadline indicates an expected point in time at which the execution of the first executable code will reach a state in which a result of the first dependency operation is required by the execution of the first executable code;
enqueue the first dependency operation into the queue based at least in part on the deadline;
process the queue based at least in part on an available capacity of the on-demand code execution system to execute operations, wherein processing the queue comprises executing the first dependency operation; and
notify the execution of the first executable code that the first dependency operation has completed.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods are described for managing asynchronous code executions in an on-demand code execution system or other distributed code execution environment, in which multiple execution environments, such as virtual machine instances, can be used to enable rapid execution of user-submitted code. When asynchronous executions occur, a first execution may call a second execution, but not immediately need the second execution to complete. To efficiently allocate computing resources, this disclosure enables the second execution to be scheduled accordingly to a state of the on-demand code execution system, while still ensuring the second execution completes prior to the time required by the first execution. Scheduling of executions can, for example, enable more efficient load balancing on the on-demand code execution system.
428 Citations
24 Claims
-
1. A system to manage asynchronous execution of tasks in an on-demand code execution system, the system comprising:
-
a non-transitory data store configured to store a queue of operations awaiting execution on the on-demand code execution system, wherein individual operations are associated with code executable to implement functionality corresponding to the individual operations; and one or more processors configured with computer-executable instructions to; obtain instructions to execute a first task associated with first executable code; begin execution of the first executable code, wherein execution of the first executable code calls for execution of a first dependency operation; determine a deadline for the first dependency operation based at least in part on historical data regarding prior executions of the first executable code; determine that the deadline for the first dependency operation satisfies a threshold value, wherein the deadline indicates an expected point in time at which the execution of the first executable code will reach a state in which a result of the first dependency operation is required by the execution of the first executable code; enqueue the first dependency operation into the queue based at least in part on the deadline; process the queue based at least in part on an available capacity of the on-demand code execution system to execute operations, wherein processing the queue comprises executing the first dependency operation; and notify the execution of the first executable code that the first dependency operation has completed. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer-implemented method to manage asynchronous code executions in an on-demand code execution system, the computer-implemented method comprising:
-
initiating execution of first executable code on the on-demand code execution system, wherein execution of the first executable code calls for execution of a first dependency operation; determining a deadline for the first dependency operation based at least in part on historical data regarding prior executions of the first executable code on the on-demand code execution system, wherein the deadline indicates an expected point in time at which the execution of the first executable code will reach a state in which a result of the first dependency operation is required by the execution of the first executable code; enqueuing the first dependency operation into an execution queue based at least in part on the deadline; processing the execution queue based at least in part on an available capacity of the on-demand code execution system to execute operations, wherein processing the execution queue comprises executing the first dependency operation; and notifying the execution of the first executable code that the first dependency operation has completed. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. Non-transitory computer-readable storage media including computer-executable instructions that, when executed by a computing system, cause the computing system to:
-
initiate execution of first executable code on the on-demand code execution system, wherein execution of the first executable code calls for execution of a first dependency operation; determine a deadline for the first dependency operation, wherein the deadline indicates an expected point in time at which the execution of the first executable code will reach a state in which a result of the first dependency operation is required by the execution of the first executable code; enqueue the first dependency operation into an execution queue based at least in part on the deadline; process the execution queue based at least in part on an available capacity of the on-demand code execution system to execute operations, wherein processing the execution queue comprises executing the first dependency operation; and notify the execution of the first executable code that the first dependency operation has completed. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24)
-
Specification