conclave-team/conclave

LSEQ and causal tree

coodoo opened this issue · 2 comments

First of all thanks for a great writeup on the case study, it's very clear and easy to understand.

Just wondering the LSEQ data type you picked is any different from a causal tree? or they are essentially the same thing just in different names? Thanks.

I'm glad you enjoyed the case study!

In regards to your question, I'm not too familiar with casual trees though they seem somewhat similar. Causal trees are used for tracking the cause and effect relationships between events, right? I suppose that could describe LSEQ, though it's not a perfectly accurate description.

LSEQ isn't so much a data type as it is a data allocation strategy. It keeps track of all of the characters that have already been inserted into the document and is used to determine the position of a new character when it is inserted. When a new character is inserted, it will look at the position of the character before it and after it on the tree and generate a position between them.

It follows a tree structure, but LSEQ trees are dynamic and grow according to how large the document is. That also means that nodes in an LSEQ tree are removed when the corresponding characters are removed. Also, the behavior of an LSEQ tree depends on what level of the tree you're on and which allocation strategy you chose to use.

I think they are different, though I could be wrong.

To read more about it, I would suggest this paper: LSEQ Strategy

Thanks for the explanation, makes perfect sense to me.

I first read about causal tree here, which in turn came from the swarmjs lib, and seemed they were both based on the paper you provided, hence the question :)

That being said, conclave is by far the most concisely implemented and easily understandable version of them all, you guys really did a great job!