Sync between devices?

153 views
Skip to first unread message

Thomas

unread,
Mar 29, 2014, 6:34:08 PM3/29/14
to fireba...@googlegroups.com
I think the local persistence function is great, and I'm already using it. However, in the current app I'm building I need to take it to the next level, and I was wondering if the Firebase iOS API had any hooks I could use to help automate the process.

Here is the scenario: Two devices have connected to the internet and have full local persistent copies of the Firebase data. They then disconnect from the internet. They then set up a local connection between the devices, still not connected to the internet. (FWIW, I'm using the iOS 7 Multipeer Connectivity API.) Both devices are used for data entry, with data going into the local Firebase persistent data store. At some time, one or both of the devices may connect to the internet or disconnect from each other.

I'm satisfied that I can send key/value messages between the devices so that data entry that happens while they are connected to each other will go into both local data stores. But is there some mechanism that allows two local data stores to automatically synch with each other?

In a similar vein, if one of the devices manages to connect to the internet and synch its local data store, say by cellular data, but the other one doesn't because it doesn't have cellular capability, is there any way for the latter to update its local data store from the former?

If the answer is no to either or both of these, then I can't see any solution other than manually processing a full transaction log on all devices and synch those together-- a very heavy solution.

Regards
Thomas

Michael Wulf

unread,
Apr 3, 2014, 3:57:20 PM4/3/14
to fireba...@googlegroups.com
Hi Thomas,

Obviously there's nothing like this available at present. 

It's hard for me to grasp how much real-time data ferrying and synchronizing is going on offline without a solid use case. I can contrive some like rock concerts or conferences, but honestly there's a lot to do besides chat to the person next to me via a phone at such things, and nearly all of them are online these days. So I'd love to hear more about your use case, because it sounds like you've got a pretty solid one in mind.

In any event, real-time sync on or offline, like little peer-to-peer Firebase nodes, is a pretty neat idea. I can't immediately think of a good alternative to a transaction log (obviously deltas are nice).

Cheers,




--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages