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

docs: a set of diagrams on Zoe and Zcf datastores and initialization #6389

Merged
merged 3 commits into from
Oct 19, 2022

Conversation

Chris-Hibbert
Copy link
Contributor

refs: #4383

Description

The datastore diagram was created in Miro:
https://miro.com/app/board/uXjVPR6j4Nc=/?share_link_id=559329933746

The others are .puml rendered to png.

These diagrams show the state of Zoe and ZCF as of 2022/10/1. I expect to update them as I finish the conversion to durability.

The datastore diagram shows which objects and stores are accessible to Zoe or to ZCF, and which are shared.

The sequence diagrams show the order in which the various objects are created, passed between the vats, and when promises are resolved.

Security Considerations

Making the design understandable

Documentation Considerations

Yes

Testing Considerations

None.

refs: #4383

The datastore diagram was created in Miro:
https://miro.com/app/board/uXjVPR6j4Nc=/?share_link_id=559329933746

The others are .puml rendered to png.

These diagrams show the state of Zoe and ZCF as of 2022/10/1. I expect
to update them as I finish the conversion to durability.

The datastore diagram shows which objects and stores are accessible to
Zoe or to ZCF, and which are shared.

The sequence diagrams show the order in which the various objects are
created, passed between the vats, and when promises are resolved.
@Chris-Hibbert Chris-Hibbert added documentation Improvements or additions to documentation Zoe package: Zoe labels Oct 4, 2022
@Chris-Hibbert Chris-Hibbert self-assigned this Oct 4, 2022
Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time I see one of these diagrams I wish we could also have arrows that slope downward, i.e., where the arrowhead is below the arrowtail. Then we could use the horizontal lines only for synchronous intravat calls and the diagonal lines for eventual sends. Though if I did get my wish, I'd then want to be able to chain the diagonals to reflect promise pipelining ;)

No change yet suggested. Just venting.

@erights erights self-requested a review October 7, 2022 02:22
Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's something very basic I don't understand.

  • What turns the .puml files into .png files? I scanned package.json / "scripts": and didn't see anything plausible.
  • Why are the .png filenames not obviously derived from the .puml filenames?

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the miro diagram, are your arrow directions consistent? Specifically the arrow connecting a far object to its remote presence. For the zoe service, the arrow points from the service to its remote presence, which seems weird to me. For the InvitationMaker, it points from the remote presence to the far object it designates, which makes sense to me.

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the miro diagram, is "zcfSeatToSeatHand" a truncation by miro? Can you do anything reasonable to avoid such truncations?

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miro diagram: What is the "adminNode"? I'd expect to see nounAdminNode. If it is the vat adminNode, then it is confusing to show it in the vat it is adminning, since it is not reified as an object in that vat.

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miro diagram: perhaps add to legend in the lower left what a cylinder means?

As you probably already know, I really like the stacked rectangles to represent multiple instantiation. It also like seeing these stacked within their maker function, so that spatial containment reflects lexical scope. Just graphically, stacked cylinders look weird, but I have no better suggestion. No change suggested unless you think of something better.

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the "Zoe startup" slide illustrate only what happens in the first crank? Is it intended to cover all of the first crank?

When you go for full upgradability, it will be interesting to see if you need different diagrams for the initial vs the revivify cases. (Hoping not, of course)

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between Invitations,Offers,Seats.png and ZoeZCFInvitations,Offers,Seats.png? From eyeballing the two casually, they seem the same.

@Chris-Hibbert
Copy link
Contributor Author

What turns the .puml files into .png files? I scanned package.json / "scripts": and didn't see anything plausible.

In governance/docs/gen.sh, there's a script that can do that. In this case, I generated the .png files from VSCode directly.

Why are the .png filenames not obviously derived from the .puml filenames?
The names generated by VSCode match the title on the startUML line, but since that often has spaces and different capitalization than makes for good file names, I moved the files. That's probably suboptimal.

I'll copy gen.sh and make it mechanical.

@Chris-Hibbert
Copy link
Contributor Author

On the miro diagram, are your arrow directions consistent? Specifically the arrow connecting a far object to its remote presence.

Fixed.

@Chris-Hibbert
Copy link
Contributor Author

On the miro diagram, is "zcfSeatToSeatHand" a truncation by miro? Can you do anything reasonable to avoid such truncations?

MIro truncates the text with margins, so I have to manually shrink/stretch the boxes or change font sizes. Eternal vigilance is the only solution I know of.

@Chris-Hibbert
Copy link
Contributor Author

Miro diagram: What is the "adminNode"? I'd expect to see nounAdminNode. If it is the vat adminNode, then it is confusing to show it in the vat it is adminning, since it is not reified as an object in that vat.

Good point. I moved it outside.

@Chris-Hibbert
Copy link
Contributor Author

miro diagram: perhaps add to legend in the lower left what a cylinder means?

I put the already-started legend in a box and added cylinders and tables.

@erights erights self-requested a review October 7, 2022 18:35
@erights
Copy link
Member

erights commented Oct 7, 2022

Have you pushed these changes yet?

@Chris-Hibbert
Copy link
Contributor Author

Does the "Zoe startup" slide illustrate only what happens in the first crank? Is it intended to cover all of the first crank?

I wasn't thinking about that distinction. I think the answer is that this all happens during the first crank, but I was only looking at data stores. I'll see whether anything else interesting happens.

@Chris-Hibbert
Copy link
Contributor Author

Have you pushed these changes yet?

No. Usually I'd add all these responses before pushing them all at once with the new commit. Since your comments were all top-level, I couldn't reply to them directly, and AFAICT, I can only have one top-level comment open at a time. Perhaps I should have replied in one long scroll, which would have made it possible to not release them until I was done.

@Chris-Hibbert
Copy link
Contributor Author

What's the difference between Invitations,Offers,Seats.png and ZoeZCFInvitations,Offers,Seats.png?

Oops! that's just an extra copy. I'll drop one.

@Chris-Hibbert
Copy link
Contributor Author

Okay, I pushed those changes.

@erights
Copy link
Member

erights commented Oct 8, 2022

Perhaps I should have replied in one long scroll, which would have made it possible to not release them until I was done.

No worries. Now that I know, the way you replied was fine. I will also sometimes reply to a comment based on not-yet-pushed state.

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These diagrams gave me the great pleasure of seeing how things I already "know" become visual. I did not see any discrepancies against my memory of what I know. Since this is just documentation that'll be revised anyway as you proceed with zoe-upgrade, I did not check it against the actual code, only my memories. I'm happy to see this merge on that basis.

LGTM

@Chris-Hibbert Chris-Hibbert added the automerge:squash Automatically squash merge label Oct 19, 2022
@mergify mergify bot merged commit c62dfb4 into master Oct 19, 2022
@mergify mergify bot deleted the ZoeDatastoreDocs branch October 19, 2022 19:49
dtribble pushed a commit that referenced this pull request Oct 24, 2022
…6389)

* docs: a set of diagrams on Zoe and Zcf datastores and initialization

refs: #4383

The datastore diagram was created in Miro:
https://miro.com/app/board/uXjVPR6j4Nc=/?share_link_id=559329933746

The others are .puml rendered to png.

These diagrams show the state of Zoe and ZCF as of 2022/10/1. I expect
to update them as I finish the conversion to durability.

The datastore diagram shows which objects and stores are accessible to
Zoe or to ZCF, and which are shared.

The sequence diagrams show the order in which the various objects are
created, passed between the vats, and when promises are resolved.

* docs: updates to Zoe-ZCF dataStores miro diagram

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge documentation Improvements or additions to documentation Zoe package: Zoe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants