I've spent a lot of time studying CRDTs & order theory in the last year & will publish an article too. Local-first apps are not easy to build, complex data structures (say, calendar repetitions with exceptions) become harder to model. Everything must converge automatically while clients can branch off. In general, you don't really get to compact tombstones meaningfully without consensus so you really are pushing at l…
An Interactive Intro to CRDTs (2023)
31–36 of 36 posts
Re: An Interactive Intro to CRDTs (2023)
#32Earlier quoted context omitted.
Thank you for your work. Diamond Types is probably my favorite piece of programming, transliterating the algo for line edits for a situation where I needed a a different algo for the line management itself, is probably the most rewarding deep dive on a algorithm I've ever done.
I’m glad you enjoyed it! What did you build?
So its like the human facing side of an OS where time, space (structure) and minds are all the only first class types and any apps exist as apptributes on the data itself.
It's basically a document editor, cal, feed, chat app, etc. in one interface where temporal search and retrieve is built in.
Re: An Interactive Intro to CRDTs (2023)
#33Re: An Interactive Intro to CRDTs (2023)
#34Earlier quoted context omitted.
Interesting! Do you mind explaining the idea in more detail?
As far as I understand, libraries like Automerge use the Merkle DAG to encode a document as an immutable bundle of state changes aka operation log + the causal ordering which enables conflict free merging between multiple peers. The final document is reconstructed by combining the state transitions. So the Merkle DAG is both the state and the causal relationship between mutations which allows the merge "magic". Proll…
You might also be interested in Alex Good's Beelay algorithm: https://www.youtube.com/watch?v=neRuBAPAsE0
Re: An Interactive Intro to CRDTs (2023)
#35Earlier quoted context omitted.
As far as I understand, libraries like Automerge use the Merkle DAG to encode a document as an immutable bundle of state changes aka operation log + the causal ordering which enables conflict free merging between multiple peers. The final document is reconstructed by combining the state transitions. So the Merkle DAG is both the state and the causal relationship between mutations which allows the merge "magic". Proll…
Those are lovely data structures and I know about them. But how are you planning on using those data structures? What CRDT are you building? You might also be interested in Alex Good's Beelay algorithm: https://www.youtube.com/watch?v=neRuBAPAsE0
So my initial comment merely tried to make the point that there is a design space where you’re not stuck with the tradeoff of carrying the full Merkle DAG history just to be able to reconstruct the latest version of your document.
Thanks for the video, will check it out!
Re: An Interactive Intro to CRDTs (2023)
#36Earlier quoted context omitted.
Thank you for your work. Diamond Types is probably my favorite piece of programming, transliterating the algo for line edits for a situation where I needed a a different algo for the line management itself, is probably the most rewarding deep dive on a algorithm I've ever done.
I’m glad you enjoyed it! What did you build?