peer-base / js-delta-crdts

Delta State-based CRDTs in Javascript
194 stars 16 forks source link

is this library suitable to replicate JSON? #25

Closed salzhrani closed 4 years ago

salzhrani commented 5 years ago

I have been trying and failing to use delta-crdts to replicate changes made on a JSON object with 4 levels of nesting. using ORMaps has its limitations. Any thoughts or advice ?

pgte commented 5 years ago

Could you be specific on what problems you found?

salzhrani commented 5 years ago

It is not the library per say, but the algorithms/data-types. the problems include

I worked around the first point by creating a type similar to mvreg but returns a single value. the second point I worked around by storing the keys of an ormap in an rga and making the array determine which keys exist.

not sure if my workarounds breaks the CRDTs but it is the closest I could get

pgte commented 5 years ago

@salzhrani I see. There are trade-offs to be made here, but I also think that a causal array-like type is something that I think would be very useful. I haven't seen any literature about this though..

pgte commented 5 years ago

see #27