You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
Some thoughts on the CRDT. We can establish a few things:
text document will need to be synchronized between clients
Clients will only have access to AST ids
FE state will become out of date with the BE
I think this is okay. If FE makes a change to an AST that doesn't exist anymore, then it will be a no-op
BE will need to keep a record of what state FE has in order to make edits
Possible high-level solutions:
Store AST as CRDT documents
will need to diff text & patch AST documents with new IDs
When edits are coming from the FE, we can just modify the node associated with the ID in the tree
Store virtual elements as CRDT documents
Diffing already occurs here
virtual objects can contain additional information about source ASTs that's stored locally. Edits to virtual elements can be redirected to AST / element
virtual objects are basically a 1:1 map with AST. for cases where they're not, we can include additional metadata about original AST and how things were computed to arrive at virtual object.
If FE deletes a virtual object that's missing, that results in a no-op
virtual objects (and their IDs) are sent to the front-end
(problem) If a child is inserted somewhere in the document, all proceeding siblings will have new IDs. This should be okay.
☝️ I think editing virtual objects is the winner
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Need to create paperclip editor package which handles all of the funcitonality around editing Paperclip source code. This includes:
This should basically be the engine for editors. Emitted data from this engine should be immutable so that it can be connected to a deterministic UI.
The text was updated successfully, but these errors were encountered: