-
Notifications
You must be signed in to change notification settings - Fork 212
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
try rewriting issuer.js with Representatives/Containers (virtual objects) #1830
Comments
Ah, I would have really liked to be in this meeting to learn more about what might be happening to ERTP in the future! |
Design plans as of 2/23:
It looks like purses and payments are good candidates for virtual objects, and that they should both use Plan
|
Payments are now virtual objects as of #2526. |
...
We don't use I suppose I should be able to figure this out by reading some code... but last time I tried, I got as far as |
The wallet has its own version of a depositFacet per brand rather than per purse. This depositFacet is not used in the wallet. |
Is making |
See #2841 for the next step, making purses virtual objects. This is needed by the stress test phase. |
#455 describes a plan for moving large state (made of millions of small JS objects) from RAM to disk. This trades off the clarity of a simple Map-based ocap style against performance gains that will probably be necessary to support our target volume.
One component of that plan is to rewrite the vats that create+manage this state to use the newly proposed API:
(note: the
c
argument topurse
may or may not be the samec
as returned bycreateContainer
, we need to decide)The object returned by
purse()
orc.create()
is called a "representative", and it is a short-lived stand-in for the long-lived virtual Purse object. The representative knows that it is short-lived, and all its state must live in secondary storage (accessed withc.get
andc.update
).@dtribble has agreed to make an initial pass at rewriting
issuer.js
to use this new scheme. To be clear, this won't run yet: we haven't implementedcreateContainer
. The goal of this first step is to decide whether the proposed API is even suitable for the Issuer'spurseLedger
andpaymentLedger
tables (replacing theStore
which currently holds that data).A separate step will be to offer
createContainer
so his code can actually run. We could fake this within liveslots (without actually adding the new syscalls) as an intermediate step, or move directly to disk-backed tables.The questions we want to answer are:
c.get
, the second argument toc.update
) be limited to flat JSON-able objects, or do we need a full marshalling step that can serialize pass-by-presence objects as well as other representatives? We expect to need the full marshalling step eventually (e.g. for Zoe offers/seats), but it would be nice to know what specific patterns provoke this requirement, and which can be accomodated by something simplerme
/other
object to be? We think it needs to be the representative itself, to facilitate thetargetPurse.deposit(otherPurse)
pattern (which uses rights-amplification to access the internals ofotherPurse
), but we could use experience with it. @FUDCo described it as a "new flavor of Presence", which I quite like.The text was updated successfully, but these errors were encountered: