I know that documents are synced via sync gateway. But we have a peculiar problem and it is a long post (Sorry for that ). I recommend reading it completely and calmly . We currently have an app which works as an offline first solution.
This app is developed using .Net, SQL server at server and client both. SQL server at server and SQL server express edition at local. We use tablets to run this app. These tablets have Windows.
Now the APP always get data from local DB (SQL server Express Edition) and data manipulations (Which can be done by using couch base lite). When the tablet is in online (reachable to server) there is a windows service sync data with server in background.This is done on multiple tablet in a near by area.
If in critical situations if connectivity is not available we have provided an option by which two tablets can sync their data via Bluetooth. One tablet sends data as a file and other receives it, process it and put data in its local DB.
When both tablets comes online conflict resolution is done and data is synced back to server. Right now we are doing it using Bluetooth but we do have plan to use WiFi direct.
Now my question is if we want to achieve this using Couch base lite and Andoid / IOS, how we can do this?
First solution comes to my mind is reading changed documents and sending then over Bluetooth/WiFi direct to other device as a file and then reading it and saving it with same revision number. but the question is whether it will confuse the sync gateway?
If we can have a better solution that I will highly appreciate your effort.