Data Synchronization in mobile apps - multiple devices, multiple users

Posted by ProgrammerNewbie on Programmers See other posts from Programmers or by ProgrammerNewbie
Published on 2013-07-28T13:07:08Z Indexed on 2013/10/31 22:17 UTC
Read the original article Hit count: 242

Filed under:
|
|
|

I'm looking into building my first mobile app. One of the core features of the application is that multiple devices/users will have access to the same data -- and all of them will have CRUD rights.

I believe the architecture should involve a central server where all the data is stored. The devices will use an API to interact with the server to perform its data operations (e.g. adding a record, editing a record, deleting a record).

I imagine a scenario where synchronizing the data will become a problem. Assume the application should work when it is not connected to the Internet, and thus cannot communicate with this central server. So:

  1. User A is offline and edits record #100
  2. User B is offline and edits record #100
  3. User C is offline and deletes record #100
  4. User C goes online (presumably, record #100 should get deleted on the server)
  5. User A and B goes online, but the records they edited no longer exist

All sorts of scenarios similar to the above can come up.

How is this generally handled? I plan to use MySQL, but am wondering if it's not appropriate for such a problem.

© Programmers or respective owner

Related posts about database

Related posts about mysql