Near Sync question

Viewing 1 reply thread
  • Author
    Posts
  • August 9, 2016 at 8:57 AM #18375

    Walter Johnson
    Participant

    Do all devices using Near Sync need to know about every other device?

    If I have a laptop and 5 iOS devices that I want to sync, can I just connect the iOS devices to the laptop and the laptop to each iOS device and have changes made on one iOS device end up on the other 4?

    Or do I have to connect all 6 devices to all the other 5?

    There will probably not be a time when all 6 devices will all be on the wifi at the same time. Will this also cause a problem? Can a database change go from an iOS device, to the laptop and then to another iOS device or do changes have to go directly from the device that made them to every other device directly?

    I think the answer will be that I have to go to the IBM Cloud solution for this kind of syncing, but wanted some clarification.

    August 9, 2016 at 11:49 PM #18398

    Brendan
    Keymaster

    Well, according to Couchbase, you should be able to configure a “mesh” sync configuration.

    So you could have a Mac sync to an iPhone which knows about the Mac and an iPad. The iPad only syncs with the iPhone and not the Mac. Any changes coming from the Mac to the iPhone will propagate from the iPhone to the iPad because the iPhone knows about the iPad even though the Mac doesn’t know about the iPad.

    Another scenario you can have is something like this:

    iPhone Nearby <-> Mac 1 Cloudant <-> iPad Nearby

    What I mean by that is you could have an iPhone that syncs with a Mac that also syncs with Cloudant. The Mac syncing with Cloudant could also sync with another Mac or iOS device via Cloudant, but also sync with an iPad nearby.

    Imagine you were working in the field doing archeology. There’s a tent with a Mac that has an Internet connection via cellular or satellite or whatever. Now you’ve got all these iPads that have only WiFi collecting data. They could theoretically sync with the Mac their data and the Mac would then sync over Cloudant to another Mac at a home base somewhere else in the world.

    Right now syncing is bi-directional. But I can add a couple of switches that allow you to choose only pull sync or pull sync. In fact, that’s why it’s bi-directional is because I startup a pull replicator and a push replicator at the same time. But it’s something that could be user controlled. In my archeology example above, you could have it so the iPads never receive data from the Mac but only send it to the Mac. The Mac then is a gathering station for all the data.

Viewing 1 reply thread

You must be logged in to reply to this topic.