Get the latest tech news
CRDT: Text Buffer
ollaboratively editing strings of text is a common desire in peer-to-peer applications. For example, a note-taking app might represent each document as a single collaboratively-edited string of text.
It's similar to the approaches taken by popular collaborative text editing libraries such as Yjs and Automerge. This avoids needing to store the tree data structure explicitly (e.g. with arrays of children and/or sibling pointers) and also takes advantage of CPU optimizations for reading memory sequentially. Temporarily disable the simulated network with the pause button to construct simultaneous editing scenarios.
Or read this on Hacker News