by LAC-Tech · 4y ago · 0 comments
Anyone have any good war stories? The general impression I get is that anything more than a state delta two-phase set is an open research problem to implement efficiently - the papers make it sound pretty straight forward but there's a whole garbage collection problem to deal with, there was another research paper dealing with just that IIRC.
https://raphlinus.github.io/xi/2020/06/27/xi-retrospective.h...
In fact, Yjs - a CRDT implementation- is the most downloaded solution for collaborative applications. Even more than ShareDB (the most popular OT-based solution).
Yjs ~90k/week - https://www.npmjs.com/package/yjs
ShareDB ~13k/week - https://www.npmjs.com/package/yjs
My solution for garbage collection was pretty boring. Occasionally, a JSON file was rsynced to each service node with the 'true' state of the system at some time in the past, and the CRDT maintained the new state on top of that JSON file, until the next file got rsynced.