user1260375
user1260375

Reputation:

App that syncs to the network

This is a theory question more than an implementation question. What, in your opinion, is the best way to create a mobile application that syncs data to a server?

I have been writing an application that has a user sign-in, allows them to create notes and then selectively share them with other users. I have been doing this with a Rails webapp that returns JSON data to my iOS app. It seems like a lot of overhead for something that so many apps are doing. Is there a better way? How would, or do, you do it?

Upvotes: 1

Views: 151

Answers (3)

user1260375
user1260375

Reputation:

The option I found that proved to be the easiest and allows you to focus on mobile development while virtually ignoring the data storage element is Parse. I wish I had found this months ago.

Upvotes: 1

kabuko
kabuko

Reputation: 36302

I really don't think there's necessarily anything wrong with maintaining a simple Rails web service as a REST interface for your database, but I can see how that might seem like unnecessary overhead. You could find a DB which has a REST interface by default. Here are two to start you off:

Upvotes: 0

Zelter Ady
Zelter Ady

Reputation: 6338

You should optimize the data quantity you exchange between server and device. You need to set up a flag that indicate you if something changed, case you need to sync.

Let say you have an app that allow to a group of users to update/load from the same file. you can save on the server the time of the last changes, and on mobile device you have the last update time you get. When you want to update your app data, on the request you can include the time you got the last updates. if the time you send and the time you have on the server differs, update; else... do nothing.

Because the request/response is minimal (Req = time; resp = empty), you can check for updates as often as you like.

Upvotes: 2

Related Questions