json-joy icon indicating copy to clipboard operation
json-joy copied to clipboard

JSON CRDT Patch manipulations

Open streamich opened this issue 1 year ago • 0 comments

Ability to compute manipulate patches:

  • [x] Un-committed patch compaction
    • [x] Compact operations within a single patch.
      • [x] String inserts.
    • [x] Combine non-commited patches.
  • [ ] Patch exchange
    • [ ] Method for converting clock vector to a serializable object
    • [ ] Converting serializable vector clock back to a vector clock?
    • [ ] Method for retrieving all patches from Log which are logically more recent than the clock vector value.
  • [ ] Cherry-picking
    • [ ] Ability to extract operations from a Patch.
    • [ ] Given a Log, ability to find all causal ancestor Patches of a given set of operations.
  • [ ] Reverse cherry-picking
    • [ ] Find all future (forward) Log patches that depend on a given Patch
      • This is potentially useful in undo/redo, to find frontier operations which already causally depend on the Patch which is to be undone.
  • [ ] Compact deletions adjacent to inserts?
    • Note: Cannot change insert IDs, due to possible future causal events.
Patch ..4082.234!4
├─ ins_str ..4082.234!1, obj = ..6089.213 { ..6089.216 ← " " }
├─ ins_str ..4082.235!1, obj = ..6089.213 { ..4082.234 ← "2" }
├─ ins_str ..4082.236!1, obj = ..6089.213 { ..4082.235 ← "\n" }
└─ del ..4082.237, obj = ..6089.213 { ..4082.236!1 }
  • [ ] Compact adjacent string inserts right in the Builder as the Patch is being built?

streamich avatar Jul 25 '24 09:07 streamich