Closed roshanr10 closed 6 years ago
For simplicity's sake and to avoid saturating the Bluetooth comms, I think it may be better to only do one way syncing at event to the Pi. This will still allow for data to be synced over WiFi/data, however, Bluetooth saturation could become a real issue with data from multiple events from the past trying to be synced between teams devices.
Will start with one-way, it's likely also easier to deal than CouchDB's internal document versioning and change revisions.
When using Cordova (detectable via the present of
window.cordova
), the app should try to use Bluetooth Comm's to the Pi. This involves the Cordova plugin, which has to be modified slightly from the existing custom protocol to allow for the PouchDB steam, the Python server that goes with it, and the Node web hook that the Python server delegates the DB syncing to, as the stream code is written in JS.The Node server should sync to the local and remote CouchDB servers as per the config file.
PouchDB Replication Stream