We are in the early planning stages of migrating from CouchbaseDB to MongoDB Atlas and Realm Sync for our iOS mobile POS application. One of the features we currently offer our merchants is offline sync between devices through peer-to-peer with Couchbase Mobile. From what I understand Realm Sync SDK doesn’t currently have any support for syncing between offline devices through peer-to-peer or multi-tier syncing to a physical server with a centralized Realm. We are wanting to still offer the offline sync feature to our merchants.
We are wanting to move away from peer-to-peer and implement a physical server solution instead. My thoughts are running a mongod instance that our iOS apps can keep up-to-date for our merchants with spotty internet connection. The physical server will act as a messenger essentially, I don’t want to bog anyone down with the specifics of the current design.
Device A saves a document to local Realm Sync while not connected to internet, and sends the document to the physical server through a socket connection. The physical server will emit the document to all the connected Devices B through D. The devices B through D will handle some business logic then save the document to their Local Realm.
I am concerned this could cause problems with the Realm Sync environment, I am not sure what potential issues there are, but it feels wrong to save a document manually synced from another device that will be synced through Realm Sync to all the devices when internet is regained.
Is there any reason(s) I shouldn’t try to implement a solution like this?
Sorry for asking such a hypothetical question.