Skip to content
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

Pipelining support #13

Closed
michaelfig opened this issue Jun 24, 2019 · 6 comments
Closed

Pipelining support #13

michaelfig opened this issue Jun 24, 2019 · 6 comments
Assignees
Labels
eventual-send package: eventual-send

Comments

@michaelfig
Copy link
Member

For proper pipelining, we will need to create a BasePromise class that has the necessary hooks to forward messages from one ERelay to another.

Look at https://github.com/ysmood/yaku/blob/master/src/yaku.core.js for how this can be done minimally, and all we'll require is the ES5-compatible BasePromise constructor function with its prototype.

@michaelfig
Copy link
Member Author

Also, under what circumstances would something be passed as the unresolvedRelay in Agoric/eventual-send#4? IIUC, it's just a placeholder that needs to postpone the operations on the Presence until it is resolved. Would it be better to remove that argument (or make it optional), for this default behaviour?

If that's too magical, another possibility I thought of was to have another unresolvedRelay method that would be called when the presence is resolved, something like TRANSFER_PIPELINE(resolvedPresence) (for lack of a better name). That would give the unresolvedRelay the option of replaying messages on the new presence.

Am I misunderstanding or oversimplifying what the pipelining issue is?

@erights
Copy link
Member

erights commented Jun 25, 2019

Misunderstanding. Messages sent to an unresolved remote promise must be sent towards the decision point --- the vat which will decide what that promise resolves to. Otherwise, we have way too many round trips. See Promise Pipelining chapter of my thesis.

@michaelfig
Copy link
Member Author

Okay, thanks. That helps a lot. I will read your thesis.

The second part of my question is whether we can supply a default unresolvedRelay, if it is not specified? That default would be too round-trippy for remote use, but it might simplify the case where you just want to intercept local eventual-sends while protecting the target object from being exposed with presenceP.then(p => ...manipulate p directly...).

This would be somewhat like a Proxy, but without the full range of operations.

@erights
Copy link
Member

erights commented Jun 25, 2019

Don't know. Worth exploring.

@michaelfig
Copy link
Member Author

Don't know. Worth exploring.

FWIW, I've implemented this default in Agoric/eventual-send#7 and used it in one of the tests. If it turns out to be something that doesn't get accepted as part of the TC39 eventual-send proposal, I can easily remove it.

@warner warner transferred this issue from Agoric/eventual-send Dec 1, 2019
@warner warner added the eventual-send package: eventual-send label Dec 1, 2019
dckc pushed a commit to dckc/agoric-sdk that referenced this issue Dec 5, 2019
…c#13)

* Result of npm run lint-fix and manual eslint fixes
dckc added a commit to dckc/agoric-sdk that referenced this issue Dec 5, 2019
* document ERTP by way of Miller @ SFBW presentation

* fix contractHost demo invocation
dckc pushed a commit to dckc/agoric-sdk that referenced this issue Dec 5, 2019
dckc pushed a commit to dckc/agoric-sdk that referenced this issue Dec 5, 2019
Other miscellaneous fixes.

closes Agoric#10
closes Agoric#11
closes Agoric#13
closes Agoric#14
closes Agoric#15
Chris-Hibbert added a commit that referenced this issue Apr 24, 2020
in the wallet, only subscribe to notifications if the offer becomes active.
in the contract, don't save offers that are immediately consummated to the book

It used to always update the counter-offers by asking zoe for fresh
getOfferStatuses(). Now it knows which offer was consumed, so it
directly removes that offer.

A little refactoring to pull out common cases.

This fixes the second problem described in #13 that included a stack trace.
Chris-Hibbert added a commit that referenced this issue Apr 24, 2020
in the wallet, only subscribe to notifications if the offer becomes active.
in the contract, don't save offers that are immediately consummated to the book

It used to always update the counter-offers by asking zoe for fresh
getOfferStatuses(). Now it knows which offer was consumed, so it
directly removes that offer.

A little refactoring to pull out common cases.

This fixes the second problem described in #13 that included a stack trace.
Chris-Hibbert added a commit that referenced this issue Apr 24, 2020
in the wallet, only subscribe to notifications if the offer becomes active.
in the contract, don't save offers that are immediately consummated to the book

It used to always update the counter-offers by asking zoe for fresh
getOfferStatuses(). Now it knows which offer was consumed, so it
directly removes that offer.

A little refactoring to pull out common cases.

This fixes the second problem described in #13 that included a stack trace.
@erights
Copy link
Member

erights commented Feb 26, 2021

@michaelfig I'm assigning both of us and closing. If I'm missing something, please let me know or reopen.

@erights erights closed this as completed Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eventual-send package: eventual-send
Projects
None yet
Development

No branches or pull requests

3 participants