-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async-flow contracts: patterns for shared state and continuing invitations #9796
Comments
Did you consider / try The pattern from sendAnywhere.contract.js seems like it would extend to multiple flows straightforwardly. |
|
I don't understand. It doesn't seem to be global state at all. |
Mark suggested What this issue requires is state used by multiple flow definition, but more importantly not shared between invocations of the flows. To be more clear, flows A, B and C work with some common state such that invocation A-10 shares state with invocations B-35 and C-42. In the makeStateRecord case, you have a flow D, where invocation D-1, D-2, D-3 etc all share the same state record. The endowments mechanism cannot support per invocation objects. |
I'm struggling to understand that. OrchestrationFlows are top-level functions; we don't prepare them, do we? |
These top level orchestrated functions are used with |
Filed #9832 to capture the need to support exo async-flow methods |
refs: #9796 ## Description #10023 started with a series of refactors and cleanup. This separates those into another PR to be reviewed more rapidly. It also includes a new feature to orchestrateAll to ease calling flows from flows. Each flow is available on the context object under `flows`. ### Security Considerations Every flow can call another flow. In the event a developer wants isolate between flows, they won't put them in the same `orchestrateAll`. ### Scaling Considerations n/a ### Documentation Considerations none ### Testing Considerations new tests ### Upgrade Considerations not yet deployed
closes: #9796 ## Description Demonstrates a pattern for creating continuing invitations that have handlers written as orchestration flows. Builds upon the combine-invitation-makers from #9821 ### Security Considerations None ### Scaling Considerations Augmenting an existing exo's invitationMaker requires two new ones: the exo holding the other makers and an exo to wrap them both. ### Documentation Considerations Once this lands it should have an explicit tutorial for developers needing this functionality. ### Testing Considerations new tests ### Upgrade Considerations not yet deployed
What is the Problem Being Solved?
As an orchestration contract developer, I would like to be able to write a contract that uses async-flow for continuing invitation offer handlers. The path for this seems unclear until we've carved out some patterns for sharing state between exos.
In a recently written
restake
contact #9821, it was found that:In a very WIP commit https://github.com/Agoric/agoric-sdk/compare/7df6abefa6460c5ca9a7acc3575f602c53c75960..ca68722f017e7f6ba9c7a9ce4668eb2b5d089239
Restake
andCancelRestake
handlers (and theWakerHandler
)orchAccount
,repeater
) in the context of multiple async-flowsinvitationMaker
Here are some recent explorations composing exos and continuingOffers that are somewhat, but not entirely relevant to the task at hand:
Description of the Design
TBD
Security Considerations
Scaling Considerations
Test Plan
Upgrade Considerations
The text was updated successfully, but these errors were encountered: