Language-based model for asynchronous operations
First Claim
1. A method for providing asynchronous operations comprising:
- defining a runtime environment including a syntax for synchronous operations to create asynchronous operations in a language-based model from a synchronous syntax, wherein the syntax for synchronous operations is distinguishable from an asynchronous pattern;
defining at least one keyword in the language-based model for use with programming in the syntax for the synchronous operations to define the asynchronous operations from the synchronous syntax prior to compilation; and
compiling in the runtime environment the synchronous operations programmed in the syntax associated with the at least one keyword into an asynchronous operation having an asynchronous pattern configured for the runtime environment, wherein a first asynchronous method calls a second asynchronous method from a linked stack;
wherein the synchronous operation associated with the keyword to define the asynchronous operation is represented during compilation as a plurality of declarations including a name of the asynchronous operation used to call the operation synchronously, and a begin declaration and an end declaration used as implementations of an asynchronous programming model for the asynchronous operation.
3 Assignments
0 Petitions
Accused Products
Abstract
A language-based model to support asynchronous operations set forth in a synchronous syntax is provided. The asynchronous operations are transformed in a compiler into an asynchronous pattern, such as an APM-based pattern (or asynchronous programming model based pattern). The ability to compose asynchronous operations comes from the ability to efficiently call asynchronous methods from other asynchronous methods, pause them and later resume them, and effectively implementing a single-linked stack. One example includes support for ordered and unordered compositions of asynchronous operations. In an ordered composition, each asynchronous operation is started and finished before another operation in the composition is started. In an unordered composition, each asynchronous operation is started and completed independently of the operations in the unordered composition.
45 Citations
20 Claims
-
1. A method for providing asynchronous operations comprising:
-
defining a runtime environment including a syntax for synchronous operations to create asynchronous operations in a language-based model from a synchronous syntax, wherein the syntax for synchronous operations is distinguishable from an asynchronous pattern; defining at least one keyword in the language-based model for use with programming in the syntax for the synchronous operations to define the asynchronous operations from the synchronous syntax prior to compilation; and compiling in the runtime environment the synchronous operations programmed in the syntax associated with the at least one keyword into an asynchronous operation having an asynchronous pattern configured for the runtime environment, wherein a first asynchronous method calls a second asynchronous method from a linked stack; wherein the synchronous operation associated with the keyword to define the asynchronous operation is represented during compilation as a plurality of declarations including a name of the asynchronous operation used to call the operation synchronously, and a begin declaration and an end declaration used as implementations of an asynchronous programming model for the asynchronous operation. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A computer readable storage medium storing computer executable instructions for controlling a computing device to perform a method comprising:
-
defining a runtime environment including a syntax for synchronous operations to create asynchronous operations from a synchronous syntax, wherein the syntax for synchronous operations is distinguishable from an asynchronous pattern; defining at least one keyword for use with programming in the syntax for the synchronous operations, wherein synchronous operations associated with the keyword define asynchronous operations from the synchronous syntax prior to compilation; compiling in the runtime environment the synchronous operations programmed in the syntax associated with the keyword into an asynchronous operation having an asynchronous pattern configured for the runtime environment, wherein a first asynchronous method calls a second asynchronous method from a linked stack; wherein the keyword defining the asynchronous operation is represented during compilation as a plurality of declarations including a name of the asynchronous operation used to call the operation synchronously, and a begin declaration and an end declaration used as implementations of an asynchronous programming model for the asynchronous operation; providing support for ordered compositions, wherein the ordered compositions include a first set of at least two asynchronous operations wherein calls to the first set of operations are serialized so that each operation is completed for a current call before a next call is performed; and providing support for unordered compositions, wherein the unordered compositions include a second set of at least two asynchronous operations wherein each of the unordered compositions start and continue independently of the other asynchronous operations in the second set. - View Dependent Claims (17, 18, 19)
-
-
20. A system to provide asynchronous operations from a synchronous syntax comprising:
-
a processor and memory configured to; define a runtime environment including a syntax for synchronous operations to create asynchronous operations in a language-based model from a synchronous syntax, wherein the syntax for synchronous operations is distinguishable from an asynchronous pattern; define at least one keyword in the language-based model for use with programming in the syntax for the synchronous operations to define the asynchronous operations prior to compilation from the synchronous syntax; provide support for ordered compositions, wherein the ordered compositions include a first set of at least two asynchronous operations wherein calls to the first set of operations are serialized so that each operation is completed for a current call before a next call is performed; and provide support for unordered compositions, wherein the unordered compositions include a second set of at least two asynchronous operations wherein each of the unordered compositions start and continue independently of the other asynchronous operations in the second set; and compile in the runtime environment the synchronous operations programmed in the syntax associated with the at least one keyword and the construct into an asynchronous operation having an asynchronous pattern with pattern-matching identification configured for the runtime environment, wherein a first asynchronous method calls a second asynchronous method from a linked stack.
-
Specification