DISPATCH MECHANISM FOR COORDINATING APPLICATION AND COMMUNICATION MEDIUM STATE
First Claim
1. At a computer system including one or more processors and system memory, the computer system also including a communication medium, a dispatcher, and an application, the dispatcher and the communication medium supporting a state coordination pattern to coordinate state transitions between the communication medium and any accessible applications, a method for coordinating state between the communication medium and the application in accordance with the state coordination pattern, the method comprising:
- an act of the dispatcher sending a message request to the communication medium, the message request requesting a next available message from the communication medium on behalf of the application;
an act of the dispatcher receiving a view of the content of a message from the communication medium, receiving the content view indicative of the communication medium having locked the message for access by the dispatcher;
an act of the dispatcher offering the content view to the application;
an act of the application attempting to update application state for the application based on the content view;
an act of the dispatcher observing a signal related to the attempted application state update from the application; and
an act of the dispatcher sending a further signal to signal the communication medium how to update communication medium state on behalf of the application, the further signal based on the observed signal and in accordance with the state coordination pattern.
2 Assignments
0 Petitions
Accused Products
Abstract
The present invention extends to methods, systems, and computer program products for coordinating application state and communication medium state. Embodiments of the invention provide mechanisms by which a dispatcher can enable application code to coordinate changes in application state with the consumption of messages from a communication medium. The coordination can be automatic where the dispatcher performs the coordination, or manual, where the coordination is performed more expressly by application code. Embodiments also include mechanisms by which applications targeting an execution (e.g., continuation based) runtime may compose alternative state transitions in the application with a peek lock protocol.
88 Citations
20 Claims
-
1. At a computer system including one or more processors and system memory, the computer system also including a communication medium, a dispatcher, and an application, the dispatcher and the communication medium supporting a state coordination pattern to coordinate state transitions between the communication medium and any accessible applications, a method for coordinating state between the communication medium and the application in accordance with the state coordination pattern, the method comprising:
-
an act of the dispatcher sending a message request to the communication medium, the message request requesting a next available message from the communication medium on behalf of the application; an act of the dispatcher receiving a view of the content of a message from the communication medium, receiving the content view indicative of the communication medium having locked the message for access by the dispatcher; an act of the dispatcher offering the content view to the application; an act of the application attempting to update application state for the application based on the content view; an act of the dispatcher observing a signal related to the attempted application state update from the application; and an act of the dispatcher sending a further signal to signal the communication medium how to update communication medium state on behalf of the application, the further signal based on the observed signal and in accordance with the state coordination pattern. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. At a computer system including one or more processors and system memory, the computer system also including a communication medium, a dispatcher, and an application, the dispatcher, the application, and the communication medium supporting a state coordination pattern to coordinate state transitions between the communication medium and the applications, a method for coordinating state between the communication medium and the application in accordance with the state coordination pattern, the method comprising:
-
an act of the dispatcher sending a message request to the communication medium, the message request requesting a next available message from the communication medium on behalf of the application; an act of the dispatcher receiving a view of the content of a message from the communication medium, receiving the content view indicative of the communication medium having locked the message for access by the dispatcher in accordance with the state coordination pattern; an act of the dispatcher offering the content view along with a communication proxy to the application, the communication proxy providing sufficient information for the application to communicate with the communication medium in accordance with the state coordination pattern; an act of the application attempting to update application state for the application based on the content view; an act of the application communicating the results of the attempted application state update to the communication proxy; and an act of the communication proxy signaling the communication medium with an intended update to the communication medium state based on the result of the attempted application state update, the intended update to the communication state selected from among deleting the message from the communication medium and unlocking the message at the communication medium. - View Dependent Claims (9, 10, 11)
-
-
12. At a computer system including one or more processors and system memory, the computer system also including a communication medium, a dispatcher, and an application, the dispatcher, the application, and the communication medium supporting a state coordination pattern to coordinate state transitions between the communication medium and the applications, the application using a scheduler and shared storage to provide an execution runtime, a method for coordinating state between the communication medium and the application in accordance with the state coordination pattern, the method comprising:
-
an act of the application providing to the scheduler a plurality of executable activities, the plurality of executable activities including a receive activity and one or more state update activities; an act of the scheduler scheduling the receive activity for execution; an act of receiving a content view of a message along with a communication proxy at the receive activity, the content view and communication proxy received from the dispatcher, the message being a message the dispatcher accessed on behalf of the application in accordance with the state coordination pattern, the communication proxy providing sufficient information for the application to communicate with the communication medium in accordance with the state coordination pattern; an act of initializing a shared storage location with a receive context to communicate with the communication medium based on the communication proxy, the shared storage location accessible by other activities of the application to communicate with the communication medium; an act of initializing one or more of the plurality of executable activities configured to update the application state of the application from the content view, the initialized executable activities having access to the shared storage location with the receive context; an act of the scheduler scheduling a first state update activity for execution, the first state update activity included in the plurality of executable activities; an act of attempting to update the application state of the application from the content view through execution of the first state update activity; an act of sending a signal to the receive context, the signal indicating how the communication medium state is to be updated based on the results of attempting to update the application state and in accordance with the state coordination pattern; and an act of the receive context forwarding the signal for delivery to the communication medium. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20)
-
Specification