Multi-device editing/syncing with CRDTs #250
This is a tracking issue/roadmap/plan for how I'm going to proceed with adding the ability to synchronize documents. The tasks below correspond approximately to PRs I plan on writing and the order I plan on doing them.
Edit 2017/08/04: 📝 👁 I wrote a detailed document describing the CRDT
Edit 2017/05/04: Add more detail.
The text was updated successfully, but these errors were encountered:
I discussed this a bunch with @raphlinus today and now have a much better understanding of the whole CRDT model and how to proceed. I've included some (very high-res page-bloaty) pictures of the whiteboard from our discussion along with some quick notes. I've edited the main issue body based on the discussion with new items.
Example of a revision history, right column is the deletion set at every revision, identical concurrent deletions (last two) necessitate multi-set (each deleted index also has a count) for reversibility so that undoing/reversing one doesn't un-delete a multi-deleted character. Things along the bottom are state in the engine for the head revision:
Thanks for the update!
I have a question to the first image. Why is the deletion set at line three (
Another question regarding the tombstones. Since they are not part of the revision, we only have the most reason tomstone string, right?
I've added the tombstone state to each line of your first example (and also added an additional starting line for the sake of my following question).
Is this the correct way of how tombstones are going to work? If yes, when I undo all of these revision (
The leftmost deletion set, also known as
Let me rewrite your example to be correct. Below the first line is in the revision, and the next line is the contents of
@erlend-sh These two projects aren't particularly related, so I don't think it makes too much sense to think of compatibility; however my understanding is that Memo is designed to be a standalone system that exposes an API that can be used by any consumer, so supporting it in xi at some point in the future should definitely be possibly. It's certainly an interesting project, and I've been following along with interest. :)