2 ms·
Author here. Its because I've been focussing on collaborative text editing first, and a fair few of the articles which pop up on HN were written by me. There's
by josephg 5y ago
Author here. Its because I've been focussing on collaborative text editing first, and a fair few of the articles which pop up on HN were written by me.
There's more great CRDT writing which deserves some attention. For example, this series by Bartosz Sypytkowski is long but excellent:
https://bartoszsypytkowski.com/the-state-of-a-state-based-crdts/ https://bartoszsypytkowski.com/the-state-of-a-state-based-cr...
He talks about CRDTs from the ground up, from much more of a mathematical / FP point of view. I learned a lot reading this series!
Why have I been focussing on collaborative text editing? Because I think performance has been the #1 blocker stopping us from using CRDTs in most software. And text CRDTs are a canary in the coal mine for performance. Uh, thats a tortured metaphor. I mean, If we can make text CRDTs fast, we can make everything fast.
And JSON editing (what everyone actually wants) needs to embed text editing anyway. So we've sort of gotta do that first anyway.
Smart people have also been working on the JSON editing problem. I'm a big fan of Greg Little's Shelf algorithm[1] for last-writer-wins JSON editing (which is what people usually want). Shelf is simple enough you can implement it in less than 100 lines of code. But shelf doesn't support collaborative list or text editing (text is a list of characters). We need all of these pieces, then we need to mush them all together in a sensible way. And thats something Yjs and automerge both already do, and do quite well.