Understanding Nearby syncing

Viewing 5 reply threads
  • Author
    Posts
  • November 18, 2018 at 1:41 AM #31840

    Bob Kerr
    Participant

    I’ve been looking at Nearby syncing and I think I understand it as follows:

    In my example there are four devices; A, B, C & D all running Tap Forms, all have the same database open.

    I set up two-way Nearby syncing from A–B, from B–C and from C–D. I add a couple of records on A, they will appear on B but they will NOT appear on C or D. Similarly If I delete a record on C it will disappear on B and D but it WILL remain on A.

    So if I’m using Nearby, unless I set up a full matrix for each database we use then the databases will end up out of sync.

    Is that correct?

    Thanks.

    November 18, 2018 at 3:36 AM #31843

    Brendan
    Keymaster

    You could also just pick one device to be the master and have the other devices connect directly to that one. So the master would have each device listed and each slave would have just the master selected.

    November 18, 2018 at 4:59 AM #31845

    Bob Kerr
    Participant

    Thanks, but then if a user added a record on a slave device would the new record appear on the master AND all the slaves or just the master?

    November 18, 2018 at 12:07 PM #31849

    Brendan
    Keymaster

    The next time the other devices synced, yes.

    But honestly if I were to set it up like that, I would prefer to use Apache CouchDB. It’s like a mini-cloud sync service, but running on your own internal network. And it’s more efficient than Peer-to-Peer sync network traffic wise. Well, maybe not if you setup a central hub configuration like that, but definitely if you setup a fully connected network like you were asking about.

    https://www.tapforms.com/help-mac/5.3/en/topic/apache

    Thanks,

    Brendan

    November 19, 2018 at 11:43 PM #31880

    Bob Kerr
    Participant

    Thanks Brendan, I will go and have a look (and at the IBM solution).

    November 23, 2018 at 2:54 PM #31980

    Sam Moffatt
    Participant

    +1 to setting up CouchDB on a Mac you have online locally or go for a hosted solution like Cloudant. CouchDB/Cloudant enables both push and pull replication meaning that TF will attempt to push changes to the server as well as try to pull them down as they happen. The nearby sync is pull replication so when you add another device you’re opting to just pull it’s changes.

    For nearby sync what I ended up doing, before CouchDB was an option, was have a single Mac that was my “master” that was always on as Brendan suggests. On all of your slave devices you add a relationship to this device and just this device. Nearby sync will pull changes from this machine as it receives them. The next step is to then set up this master device to add all of the slave devices.

    We’re aiming to create a star topology where the master node pulls in all of the changes from each of the other devices. The goal is to reduce the amount of places we have to trigger conflict resolution should that arise because that could end up in it’s own mini-replication storm event as each device changes the same set of records multiple times. I used to have everything completely meshed but moved away from that because it introduced oddness when working on the same record on multiple devices.

Viewing 5 reply threads

You must be logged in to reply to this topic.