3 ms·
I was desktop client lead for Syncplicity (major Dropbox competitor) for almost a decade. Some thoughts: Most important: Git (the protocol) kinda-sorta does t
by gwbas1c 2y ago
I was desktop client lead for Syncplicity (major Dropbox competitor) for almost a decade.
Some thoughts:
Most important: Git (the protocol) kinda-sorta does this already. I personally don't know if git is CRDT; but the .git folder is a database that contains the entire history of the repos. The "git" command can be used to sync a repository among different computers. You don't need to use Github or set up a git server. (But everyone does it that way because it's much, much easier.)
Secondly: The proposal made assumes that everyone will rewrite their software to be CRDT-based and fit into this schema. Writing software this way is hard, and then we need to convince the general public to adopt versions of software that are based around this system. Could you port LibreOffice to writing out documents this way?
Thirdly: Resolving conflicts when computers are disconnected from the network is always a mess for end users. (This was a huge pain point for Syncplicity's users, and is a huge pain point in other "sync" products.) CRDTs don't "solve" the problem for users: The best you can hope for is something like git where it identifies merge conflicts, and then the user has to go in and clean them up.
For example: Two computers are disconnected from the network. Edits are made to the same sentence in a document while disconnected. What happens? The CRDT approach might result in "consistent data," but it cannot "read minds" and know what is the correct result.
----
IMO, some things I would consider:
Try to somehow replicate the desired workflows with git or a similar tool. (Remember Mercurial?) See what kind of problems pop up.
Consider writing a "git aware" word processor that is based around Markdown; and is somewhat aware of how git behaves around conflicts.
Try "bolting on" a sync protocol (or git) to LibreOffice as a way to understand just how easy / hard a project like this is.
Consider encapsulating the entire database in a SQLite file, instead of using the filesystem.
- vlovich123 2y agoGit is obviously not a CRDT because merge conflicts have to be manually resolved whereas CRDTs require this to happen automatically. A less interesting subset of Git can be viewed as CRDT (e.g. mirrors).
- gwbas1c 2y agoYour users will still need to manually merge in a CRDT application; because computers can not read minds. The best a CRDT application can do is spit out garbage when changes conflict. IE, start with: The quick brown fox jumped over the fence. We both disconnect. At the same exact time... I change it to: The quick brown fox ran around the fence. You change it to: The quick brown fox dug under the fence. The best you can do is make a data structure that is consistent and identifies the conflict. CRDT can't "read our minds" and decide between "ran around" or "dug under".
- Groxx 2y agoIt can't decide human intent flawlessly, but the point of a CRDT is that it does choose one, and all others choose the same one regardless of how they got there. Git does not do this, so it is not a CRDT. The content-addressable-database portion of git sorta fits this though (as does any other content-addressable system).
- kaba0 2y agoThis is basically git automatically doing “accept theirs” or “yours” for any fork. You can see that it will not generally be what you want, so whether such a strategy could work is domain-dependent.
- vlovich123 2y agoNo that’s not accurate. If I merge branch X and then branch Y and someone else merges branch Y and then branch X, with CRDT the result should also be the same whereas with git it won’t be if you’re strategy is always “accept theirs” or “accept yours”. CRDT is also order invariant - it doesn’t matter which ordering of edit operations you accept, the end result is consistent across all nodes. You may want to read up on the Wikipedia page rather than taking 1 thing I said and extrapolating. https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type https://en.wikipedia.org/wiki/Conflict-free_replicated_data_...
- 2y ago