Trade-offs between Different CRDTs
interjectedfuture.com
interjectedfuture.com
They implemented lots of algorithms - CRDTs and OT algorithms and stuff.
What’s an “OT” algorithm in this context?I ended up using y.js in my personal react native notes app and it works wonderfully.
But I don't think it's accurate enough. For example, the article claims delta based CRDTs don't use vector clocks. But even to decide if a set of events are concurrent it's necessary to attach vector stamps to every event. Maybe the author meant something else when he says vector clocks are not needed for op based CRDTs.
Also as mentioned in article it's true evergrowing event log is not such a bad idea with compression techniques and cheaper disks. But the problem with evergrowing datastructures is not just disk space. This data has to be loaded onto main memory to do anything useful with it. This data has to be transmitted across network to power SaaS apps. So stating that disks are cheaper hence evergrowing datastructures are fine - is an oversimplification.
To do so requires that the patch function is a reversible function, which for git is not hard to achieve. I wonder how many CRDTs that is true for.
There are ways to transmit only a partial history for git, there should be ways to do the same for most CRDTs.
I’ll post the paper when it’s ready. I think it’s a great approach - file sizes end up smaller. You don’t need the crdt in memory during editing and you can prune old operations.
In our case we have a central server which periodically creates snapshots. Although we don't do that right now, if needed, it could delete older operations from the log for space reasons. Except for the fact that replicas encrypt their ops before they send it to the server (e2ee), the server is pretty much like any other replica, so if there is no central server I guess any or multiple replicas could also create snapshots instead.
"Normal" replicas which have been offline for a while can then get the last snapshot state S' with all operations since S'. Other than that, they simply broadcast operations and only keep their own latest version to which they apply incoming operations.
https://interjectedfuture.com/lab-notes/lab-note-030-the-tri...
(btw I really love your masthead graphics)
Architecture - https://use-fireproof.com/docs/architecture CRDT file format - https://fireproof.storage/posts/remote-access-crdt-wrapped-m...