4 ms·
Slightly off topic: are there any good solutions for keeping localdata and a rails back-end in sync? If the device is offline save locally, otherwise sync with
by girmad 12y ago
Slightly off topic: are there any good solutions for keeping localdata and a rails back-end in sync? If the device is offline save locally, otherwise sync with the rails app.
- Mekkanox 12y agoThat's the most straightforward solution. I'm working on an Android app that syncs calls and texts to a Rails back-end and I try to keep the sync workflow as simple as possible. As for sync'ing, I found the following to be a huge boon for users: - Allow the user to set sync to happen only when connected via Wi-Fi (not sure if this is possible in iOS, but it's easy to check how an Android device is connected to the Internet). - Give options for sync intervals. Most of our users choose once a day. Other options include sync'ing a call or text right after it's finished or received if they need their data to be up-to-date within minutes.
- zniazi 12y agoI would write a method to check if you have internet connection. And whenever you make a POST request to push some data to your server, check if there is internet access. If there is not, save the data locally. You can do your local save with a few lines of code using Snapit.
- zackmorris 12y agoFirebase (YC S11) automatically syncs between local and remote. They have a free developer account that can handle a moderate amount of users. I'm not sure what's needed for Ruby but they have good SDKs for iOS, Javascript and others. You can also use their REST API with Backbone.js and AngularJS (BackFire and AngularFire). After using it since February, I really can't imagine going back to any other solution. I did things in Firebase the first day that took me weeks to get working in iCloud with CoreData.