Very interesting blog post about offline first col...
# thinking-together
o
Very interesting blog post about offline first collaborative editing of tree structures, as it is done at Figma. https://www.figma.com/blog/how-figmas-multiplayer-technology-works/
👍 2
It uses a central authority, which relaxes some constraints, but there are very interesting technical considerations also applicable to decentralization (which I am more interest in).
In particular I am happy to see that fractional indexing is used to manage children order. I have planned to use it as well and seeing it in a product like Figma makes me confident about it.
More precisely, I have played a bit with CRDT (Casual Trees, in particular) with the objective to use it for offline first collaborative editing of tree structures, and this article makes me confident in some of my findings (CRDT, fractional indexing and hierarchy as parent id in children) and spots some important points (warn about cycles, and undo strategy).
e
Centralized authorities are the way to go to make things like this easy to implement. The Figma people have done a really great job and i predict great success for that firm.
o
In fact, CRDT is a way to manage concurent editing without a central authority. It is achieved by modelling things as an ordered list of events (an event log) which ordering doesn't depends on an authority. So when several peers communicates their events they all see exactly the same event log, which produce exactly the same document state.
I agree Figma has done a great work. With a focus on as simple as possible to make it works.
t
I recently saw this video that shows an interesting implementation of CRDTs in a real life app too:

https://www.youtube.com/watch?v=DEcwa68f-jY