We've implemented Yjs some time ago for documents #720. But the rest of AtomicServer still kind of assumes that there is one server in control. Even though we now have a local-first setup (using did:ad #1148 #1145) our commits are pretty linear by design. At some point, we're gonna need true conflict resolution. And I would prefer to have a system where we don't have to replay all of history to reconstruct the current state.
Some of my goals:
- Multiplayer where conflicts are resolved automatically
- History, potentially for all transactions / changes
- Signatures for each change
- Option to do all messages encrypted.
- Keep JSON-AD for those who need it
- Sync efficiently, no need to replay all events to reconstruct state
I think we have a couple of paths to achieve this:
Roll our own CRDT, update Atomic Commits
- Takes a lot of time
- Hard to make efficient
- Seems like a bad idea
Use Loro
- Fast!
Doesnt work with tiptap it actually does
- Rust / Wasm (native on server)
JSON-Joy
- Even faster!!!
- Less document-focused, lower quality interleaving
- TS based
Use Yjs / Yrs for everything
- We already use it for documents it works
- Not very fast, requires history playback
We've implemented Yjs some time ago for documents #720. But the rest of AtomicServer still kind of assumes that there is one server in control. Even though we now have a local-first setup (using
did:ad#1148 #1145) our commits are pretty linear by design. At some point, we're gonna need true conflict resolution. And I would prefer to have a system where we don't have to replay all of history to reconstruct the current state.Some of my goals:
I think we have a couple of paths to achieve this:
Roll our own CRDT, update Atomic Commits
Use Loro
Doesnt work with tiptapit actually doesJSON-Joy
Use Yjs / Yrs for everything