Synchronize App data across devices?

Just starting out? Need help? Post your questions and find answers here.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Synchronize App data across devices?

Post by IdeasVacuum »

Same application, installed on a Tablet and a Desktop PC/Laptop. What I need to do is synch their AppData folder content which is a few small text files.

Of course, one option needs to be 'manual', save to/retrieve from a USB stick. No problem.

Having a desktop PC in the equation rules-out a Bluetooth connection since most desktop PCs do not have Bluetooth. So I am thinking about using my web server, silently using FTP to upload<> download. That should be fast and I think that is roughly how Mozilla for example synchs FireFox across devices. Mountains to climb though. Has anyone actually done it?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
normeus
Enthusiast
Enthusiast
Posts: 415
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: Synchronize App data across devices?

Post by normeus »

I do it using a PHP page to receive data ( NOT FTP ).
send a GET to a PHP page which retrieves some flags from mysql database: has anyone uploaded anything?
if yes Download changes ( assume the database on web is latest unless you want multiple versions ) change field to let it know you received changes.
send Your new data as a POST with a couple of extra fields to let the webpage know who made the changes and you are up to date.
POSTs can be pretty big, hundreds of megs if you like. ( just adjust "php_value post_max_size 300M" 300 meg etc..)

Make sure no data is deleted if there is no internet connection.

Disco!

Norm.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Synchronize App data across devices?

Post by IdeasVacuum »

Hi normeus
Make sure no data is deleted if there is no internet connection.
Good advice, no matter the method.

I'd add to that and say no data deletion until the downloaded file fingerprints are proven and the app has loaded the data successfully.

I have used PHP before but in this case, with several customers and everybody's files being unique in content (and not readable by others), I can't see an advantage over FTP (would be nice if PB supported FTPS).
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply