ASYNCHRONOUS EXECUTION FLOW
First Claim
1. A method for developing a task that, when the task is executed comprises asynchronous logic flow execution, the method comprising:
- developing sequential code for a task comprising task code, wherein the task code is defined at a first time t1 to comprise a first concurrency of at least one task instance, wherein the execution of a concurrency of the task code comprising a task instance is performed with a processing thread assigned to the task instance sequentially for a first time period tp1, and wherein during execution of the task instance the executing task instance invokes the execution of at least one time consuming operation that causes the task instance to thereafter be managed asynchronously for a second time period tp2 that is subsequent to the first time period tp1 and is the time period wherein the time consuming operation is performed; and
developing a callback wrapper, wherein the callback wrapper comprises a callback to a task instance and wherein the callback wrapper is executed for the task instance when the task instance can resume sequential processing for a third time period tp3 that is subsequent to the execution of the time consuming operation during the second time period tp2.
2 Assignments
0 Petitions
Accused Products
Abstract
Tasks can be developed and maintained with synchronous code while concurrently being asynchronously executed, e.g., during time consuming operations. The tasks need not include asynchronous flow callbacks within the task framework. The callbacks can be transparently incorporated within the execution flow utilizing a callback wrapper(s) which transparently maintains and manages the necessary callbacks for asynchronous execution of the tasks. Thus a generic solution can be easily and effectively implemented for, e.g., production/request work item processing, that can be applied to both backend services and/or client software.
-
Citations
20 Claims
-
1. A method for developing a task that, when the task is executed comprises asynchronous logic flow execution, the method comprising:
-
developing sequential code for a task comprising task code, wherein the task code is defined at a first time t1 to comprise a first concurrency of at least one task instance, wherein the execution of a concurrency of the task code comprising a task instance is performed with a processing thread assigned to the task instance sequentially for a first time period tp1, and wherein during execution of the task instance the executing task instance invokes the execution of at least one time consuming operation that causes the task instance to thereafter be managed asynchronously for a second time period tp2 that is subsequent to the first time period tp1 and is the time period wherein the time consuming operation is performed; and developing a callback wrapper, wherein the callback wrapper comprises a callback to a task instance and wherein the callback wrapper is executed for the task instance when the task instance can resume sequential processing for a third time period tp3 that is subsequent to the execution of the time consuming operation during the second time period tp2. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. An asynchronous logic flow execution method for a consumer-producer model comprising at least one consumer task comprising at least one instance, at least one producer task comprising at least one instance, a shared queue for storing items produced by the producer task and retrieved for consumption by the consumer task, a callback queue for a consumer task comprising a consumer callback queue, and a callback queue for a producer task comprising a producer callback queue, the asynchronous logic flow execution method comprising:
-
initiating the execution of a consumer task instance that invokes an operation for dequeuing an item from the shared queue comprising a dequeuing operation; initiating the execution of a producer code instance that invokes an operation for enqueuing an item to the shared queue comprising an enqueuing operation; initiating the execution of a callback wrapper associated with the shared queue, comprising a shared queue callback wrapper, when a consumer task instance invokes the dequeuing operation; utilizing the shared queue callback wrapper to determine if there are any items in the shared queue that are available to be dequeued subsequent to the shared queue callback wrapper being initiated for execution when a consumer task instance invokes the dequeuing operation; utilizing the shared queue callback wrapper to dequeue an item from the shared queue when there is at least one item stored in the shared queue and the shared queue callback wrapper has been initiated for execution by a consumer task instance invoking the dequeuing operation; utilizing the shared queue callback wrapper to return an item dequeued from the shared queue to a consumer task instance that invoked the dequeuing operation; utilizing the shared queue callback wrapper to initiate the resumption of execution for the consumer task instance that invoked the dequeuing operation subsequent to dequeuing an item from the shared queue for the consumer task instance; utilizing the shared queue callback wrapper to queue the consumer task instance that invoked the dequeuing operation to the consumer callback queue when there are no items stored in the shared queue to be dequeued; utilizing the shared queue callback wrapper to determine if there is room available in the shared queue to enqueue an item subsequent to the callback wrapper dequeuing an item from the shared queue; utilizing the shared queue callback wrapper to determine if there is a producer task instance queued to the producer callback queue subsequent to the shared queue callback wrapper determining there is room available in the shared queue to enqueue an item; utilizing the shared queue callback wrapper to dequeue a producer task instance from the producer callback queue subsequent to the shared queue callback wrapper determining there is room available in the shared queue to enqueue an item; utilizing the shared queue callback wrapper to enqueue an item produced by a dequeued producer task instance to the shared queue; and
,utilizing the shared queue callback wrapper to initiate the resumption of execution for a dequeued producer task instance subsequent to enqueuing an item to the shared queue for the dequeued producer task instance. - View Dependent Claims (8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A method for asynchronous logic flow execution comprising execution of at least one concurrency of a task comprising a task instance, the method comprising:
-
initiating the execution of a task instance at a first time t1, wherein the task has been developed with sequential task code logic, and wherein initiating the execution of the task instance comprises obtaining a processing thread for the task instance and further comprises referencing the task instance in memory; upon the task instance invoking the execution of a time consuming operation at a second time t2, invoking a callback wrapper to execute, wherein the callback wrapper manages an asynchronous temporary execution termination for the task code instance; utilizing the callback wrapper to manage the execution of the time consuming operation invoked by the task instance; upon the termination of the execution of the time consuming operation, utilizing the callback wrapper to callback the task instance, wherein the callback comprises obtaining a processing thread for the task instance and the callback further comprises re-referencing the task instance in memory; and upon the execution of the callback, reinstituting processing of the task code instance.
-
Specification