pubkey / rxdb

A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/
https://rxdb.info/
Apache License 2.0
21.57k stars 1.06k forks source link

distributed offline/online data synchronization #1917

Closed brodycj closed 4 years ago

brodycj commented 4 years ago

Case

❓& 💡

Issue

I just discovered this nice project through https://github.com/jondot/awesome-react-native/pull/974.

It is not clear to me what kind of support for distributed offline/online data synchronization exists at this point, what kind of interest may be there, and what we should consider doing.

Maybe this is already been solved by PouchDB and CouchDB. I would rather see something more flexible than this combination, if possible.

General use cases:

Some context: I have been maintaining the widely used cordova-sqlite-storage plugin for years and have seen quite a few requests for this kind of functionality. Some discussion here among other places: https://github.com/xpbrew/cordova-sqlite-storage/issues/914, https://github.com/xpbrew/cordova-sqlite-storage-help/issues/50

⚠️ In the past I discovered that supporting data synchronization in a flexible manner, with no server stack absolutely dictated, can be a hard problem.

Maybe an idea for next major version in #1636?

Info

Code

N/A

pubkey commented 4 years ago

The the first two use-cases can be handled with the current replication methods. Replication between clients without a server is not possible with the GraphQL-replication. The way the CouchDB replication protocol was designed, it is perfectly made to work with a ~serverless~ no-server replication. But this is an edge-case so I never found a good example on how to implement that. Also see https://github.com/natevw/PeerPouch Since I do not need that for myself, it will not be added with #1636. Also I think this is a good feature for an own plugin.

JonnyBGod commented 4 years ago

@brodybits Have you found or worked on a solution for p2p synchronization?