4 ms·
Great question, CRDT is the answer, as OT requires centralized servers and gun is decentralized/federated/P2P. Here is a really good (but long) overview of wha
by marknadal 10y ago
Great question, CRDT is the answer, as OT requires centralized servers and gun is decentralized/federated/P2P.
Here is a really good (but long) overview of what is going on, including the tradeoffs of where gun does not ideally fit: http://gun.js.org/distributed/matters.html http://gun.js.org/distributed/matters.html
A quick glance of the CAP Theorem tradeoffs: https://github.com/amark/gun/wiki/CAP-Theorem https://github.com/amark/gun/wiki/CAP-Theorem
Some lower level implementation details of the CRDT: https://github.com/amark/gun/wiki/Conflict-Resolution-with-Guns https://github.com/amark/gun/wiki/Conflict-Resolution-with-G...
It is a hybrid vector/timestamp/lexical CRDT, which means it is very naive but has deterministic guarantees. It is a "stupid" enough base CRDT that you can actually build other CRDTs on top of it by combining it with other data structures, to build DAGs (directed acyclic graphs, like git), Merkle trees, blockchains, linked lists, etc. which is where most of your "business logic" value/use-case is going to come from.
Which means, it is powerful enough you can build OT-like alternatives on top, here is a demo of collaborative text editing: https://youtu.be/rci89p0o2wQ https://youtu.be/rci89p0o2wQ (note this is an old demo, I'm able to delete text now, and do other things)
Anything else I can answer? Great question.