composablesys / collabs

Collabs library monorepo
https://collabs.readthedocs.io/
Apache License 2.0
254 stars 11 forks source link

State-based merging #245

Closed mweidner037 closed 1 year ago

mweidner037 commented 1 year ago

Completes https://github.com/composablesys/collabs/issues/239

Rewrites CRuntime.load and all CRDTs' load functions to allow loading at any time. If there is already a non-trivial state, the loaded state is merged with that one, in the style of state-based CRDTs.

Additionally, load functions now emit events describing their changes (including incremental changes during merging). This eliminates the need for special cases to refresh the display after loading.

I've also made minor API changes and rewritten the list CRDT internals.

Still TODO:

mweidner037 commented 1 year ago

Minor API changes:

Behavior changes:

Other: