Asynchronous programming system
First Claim
1. A system for developing distributed programs, the system comprising tangible computing hardware configured to execute a workflow processing system comprising:
- a workflow application comprising;
a program routine; and
a secondary routine called by the program routine, wherein the program routine and the secondary routine are configured to execute asynchronously;
a data storage module configured to;
define a storage area for an asynchronous variable, wherein the data module raises an exception in response to an attempt to access the storage area being made prior to a data value for the asynchronous variable being placed in the storage area;
determine that the secondary program routine to be executed will access the storage area to use the asynchronous variable; and
in response to determining that the secondary program routine will access the storage area to use the asynchronous variable, schedule the secondary program routine to be executed in response to a data value for the asynchronous variable being placed in the storage area;
an error handling module configured to;
catch an exception from the secondary routine; and
in response to catching the exception, schedule for execution an error handling routine associated with the program routine; and
a reconstruction module configured to;
reconstruct the state of the workflow application, wherein reconstructing the state comprises returning the application to a previous application state without causing a change outside of the application.
1 Assignment
0 Petitions
Accused Products
Abstract
Various embodiments are disclosed herein including systems and methods for managing the asynchronous and parallel execution of computer programs. Embodiments implement asynchronous execution in a distributed environment. Single-threaded execution of multiple routines can proceed without thread blocking. Asynchronous variable and routine classes are provided to facilitate development of asynchronous systems using substantially the same development techniques as used for synchronous systems. In some embodiments, the systems and methods for managing asynchronous execution of programs are applied to workflow processing systems.
31 Citations
24 Claims
-
1. A system for developing distributed programs, the system comprising tangible computing hardware configured to execute a workflow processing system comprising:
-
a workflow application comprising; a program routine; and a secondary routine called by the program routine, wherein the program routine and the secondary routine are configured to execute asynchronously; a data storage module configured to; define a storage area for an asynchronous variable, wherein the data module raises an exception in response to an attempt to access the storage area being made prior to a data value for the asynchronous variable being placed in the storage area; determine that the secondary program routine to be executed will access the storage area to use the asynchronous variable; and in response to determining that the secondary program routine will access the storage area to use the asynchronous variable, schedule the secondary program routine to be executed in response to a data value for the asynchronous variable being placed in the storage area; an error handling module configured to; catch an exception from the secondary routine; and in response to catching the exception, schedule for execution an error handling routine associated with the program routine; and a reconstruction module configured to; reconstruct the state of the workflow application, wherein reconstructing the state comprises returning the application to a previous application state without causing a change outside of the application. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system for developing distributed programs, the system comprising tangible computing hardware configured to execute a program library comprising:
-
a promise module configured to; reserve a memory block for an asynchronous variable, wherein the memory block is permitted to be accessed only after the asynchronous variable has been set; throw a program exception in response to an attempt to access the memory block being made before a value is placed in the memory block; determine that a workflow routine to be executed will access the memory block to use the asynchronous variable; and schedule for execution a callback in response to determining that the workflow routine will access the memory block, wherein the callback to the workflow routine is to be executed in response to a value for the asynchronous variable being placed in the memory block; an execution queue configured to; receive the callback; store the callback in the execution queue; and place the callback on a call stack in response to the callback being dequeued; and an error handling module configured to; catch an exception from a secondary routine, wherein the secondary routine is initiated by the workflow routine, and wherein execution of the workflow routine does not wait for execution of the secondary routine after the workflow routine initiates the secondary routine; and in response to catching the exception, schedule for execution an error handling routine associated with the workflow routine and cancel execution of the secondary routine and any routines that are a descendant of the workflow routine; wherein the library facilitates development of distributed asynchronous or multi-threaded systems using synchronous coding constructs, and wherein the development utilizes the promise module, the error handling module, and the execution queue. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A computer-implemented method for developing distributed systems, the method comprising:
-
reserving a memory block for an asynchronous variable, wherein the memory block is permitted to be accessed only after the asynchronous variable has been set; controlling access to the memory block, wherein controlling access comprises throwing an exception in response to an attempt to access the memory block being made before a value for the asynchronous variable is placed in the memory block; determining that a program routine to be executed will access the memory block to use the asynchronous variable; in response to determining that the program routine will access the memory block to use the asynchronous variable, scheduling for execution a callback to the program routine, the callback to the program routine to be executed in response to a value for the asynchronous variable being placed in the memory block; terminating execution of a workflow application in response to encountering a blockage to further advancement of a workflow executed by the workflow application, wherein the workflow application comprises the program routine; and in response to an event unblocking further progress of the workflow application, reconstructing the program state of the workflow application, wherein reconstructing the program state of the workflow application comprises returning the internal state of the workflow application to an internal state of the workflow application before the workflow application encountered the blockage, and wherein reconstructing the program state does not result in duplicating effects outside of the workflow application; wherein said method is implemented by a computer system comprising computer hardware configured with a program library, and wherein said library facilitates development of asynchronous or multi-threaded systems using synchronous coding constructs. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24)
-
Specification