ditto icon indicating copy to clipboard operation
ditto copied to clipboard

pairing with a JavaScript library?

Open greglearns opened this issue 6 years ago • 2 comments

I'd love to use this with a JavaScript front-end. Any recommendations for having it work with a JavaScript client over HTTP?

Also, are you basing this library on CvRDTs (convergent replicated data types) or CmRDTs (commutative replicated data types)?

greglearns avatar Apr 06 '18 14:04 greglearns

Right now there's no JS counterpart to Ditto. However, it should be possible to compile Ditto to WebAssembly with Rust's wasm32-unknown-unknown target, and one of my medium-term goals is to write a more ergonomic JS wrapper for the wasm output.

Ditto CRDTs are hybrids, that is, both CvRDTs and CmRDTs. You can replicate ops or changes as you see fit (via execute_op or via merge). Each form of replication comes with its own advantages and drawbacks. Op-based replication is typically more bandwidth-efficient but forces some restrictions on ordering (more in the README). State-based replication via state is typically less efficient, but it has no ordering restrictions.

alex-shapiro avatar Apr 07 '18 03:04 alex-shapiro

I'm very much interested in helping to contribute a JS-WASM effort!

mbalex99 avatar Apr 25 '18 18:04 mbalex99