CRDT has stronger guarantees for events commutativity. It gives a strong restriction for deleting old data. CROWD slightly weakens the guarantees, which gives more compact data representation without garbage collection and compactification.
Some CROWD storages are accidentally dCRDT too.
Stored CROWD State can be reinterpredeted by different CROWD Storages. Different CROWD Storages may be cross merged. CRDT structures are incompatible in general.
OT stores full edit history which is redundant. CROWD competely erases history. For history navigation purposes periodically snapshots is better solution for both.
OT requires history rebase for convergence. This is too slow and complex. CROWD merge is very simple and fast.
// // Usage from NPM. Isn't required in MAM.// import {// $hyoo_crowd_numb,// $hyoo_crowd_reg,// $hyoo_crowd_union,// $hyoo_crowd_set// $hyoo_crowd_list,// $hyoo_crowd_dict,// $hyoo_crowd_text,// } from 'hyoo_crowd_lib'// Dynamic typing in custom storeconstMyStore=$hyoo_crowd_dict.of({val: $hyoo_crowd_union.of({count: $hyoo_crowd_numb,bool: $hyoo_crowd_reg,numb: $hyoo_crowd_reg,str: $hyoo_crowd_reg,seq: $hyoo_crowd_list})});// Normal store creationconstbase=MyStore.make();// Make independent forks for testngconstalice=base.fork(1);constbob=base.fork(2);constcarol=base.fork(3);// Twice change register named "foo"alice.for("foo").to("str").str="A1";alice.for("foo").to("str").str="A2";// Change register named "foo" then converts it to sequence and insert valuebob.for("foo").to("str").str="B1";bob.for("foo").to("seq").insert("B2").insert("B3");// Serial insert to sequence named "foo"carol.for("foo").to("seq").insert("C1").insert("C2");// Make deltasconstalice_delta=alice.delta(base.clock);constbob_delta=bob.delta(base.clock);constcarol_delta=carol.delta(base.clock);// Cross merge all of themalice.apply(bob_delta).apply(carol_delta);bob.apply(alice_delta).apply(carol_delta);carol.apply(bob_delta).apply(alice_delta);// ["A2","C1","C2","B1","B2","B3"]console.log(alice.for("foo").as("seq").items,bob.for("foo").as("seq").items,carol.for("foo").as("seq").items);