Re:Faster CRDTs: An Adventure in Optimization
by jg23 on Saturday July 31, 2021 @01:23PM
(#28019991)
I have a related question to this, if you’re storing [“hello”] as one chunk, what happens when you perform an edit to say adding an extra [“e”] after the [“e”]? In the unoptimised structure I know you can just add the new [“e”] as a child of the original [“e”]. So here would you then delete the chunk [“hello”] and split it into two halves like [“he”] and [“llo”]?
[ Parent
| on HN ]
Re:Faster CRDTs: An Adventure in Optimization
by josephg on Saturday July 31, 2021 @06:49PM
(#28022155)
Yes exactly. You replace the chunk with “he” and “llo” then insert the extra item in the middle. The result is [“he”, “e”, “llo”]. The code to do all this inline in a b-tree is pretty hairy but it works pretty well!