Structure family
Sequences
The hikers now edit things in order: the stops on their inspection route and the text of their reports. Positions shift: if Bob inserts a stop first, "position 2" in Alice's edit no longer means the same place. SequenceCrdt gives each item its own ID, so an insert names its neighbors instead of a position. TextCrdt does the same for each character of a note. RichTextOt brings back the ranger station: it numbers each edit, and each hiker's client rewrites incoming edits so text and formatting both survive.
SequenceCrdt
Alice and Bob add trail stops to the same route without losing either one.
sequence_kernel
Alice and Bob revise their inspection route, an ordered list of trail stops, before either receives the other's edit.
Rule: Give each trail stop its own ID, so adding or moving other stops does not change which one a note means.
Open the SequenceCrdt lessonTextCrdt
Alice, Bob, and Carol can type in one field note without losing concurrent edits.
text_kernel
Alice and Bob revise the same sentence while Carol reads an older copy of the field note.
Rule: Give each character its own ID, as SequenceCrdt does for trail stops, so an edit names the characters around it instead of a position that may have moved.
Open the TextCrdt lessonrich_text_kernel
Alice bolds the report heading while Bob appends the current trail symbol.
Rule: OT for formatted text: each edit keeps, inserts, or deletes characters and can attach formatting, and each copy rewrites concurrent edits against the numbered history.
Open the RichTextOt lessonChoose how order survives
| Need | Choose | Cost |
|---|---|---|
| An ordered list, no ranger | SequenceCrdt | An ID for each item |
| Plain text, no ranger | TextCrdt | An ID for each character |
| Formatted text, with the ranger station | RichTextOt | The ranger station must stay available |