composablesys / collabs

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

Interfaces RFC: Maps (PlainMap, CrdtMap) #105

Closed mweidner037 closed 3 years ago

mweidner037 commented 3 years ago

Interfaces

https://github.com/composablesys/compoventuals/blob/master/client/src/crdt/map/interfaces.ts

Questions

Planned implementations

These are essentially the same as for the sets.

PlainMap

CrdtMap

Same possibilities as CrdtSet, except that technically it is the keys that are present/deleted, not the valueCrdts. There is one extra distinction between Riak-style and Yjs-style:

Also, for the non-memory-safe but otherwise optimal implementations, we could have both a Yjs-style implementation and Riak-style implementation. That way, users could choose which behavior they want for concurrently-added keys (merge vs pick one).

Helpers

Same as for Sets.

mweidner037 commented 3 years ago

Done by https://github.com/composablesys/compoventuals/pull/138