views:

162

answers:

1

I'm looking for some general strategies for synchronizing data on a central server with client applications that are not always online.

In my particular case, I have an android phone application with an sqlite database and a PHP web application with a MySQL database.

Users will be able to add and edit information on the phone application and on the web application. I need to make sure that changes made one place are reflected everywhere even when the phone is not able to immediately communicate with the server.

I am not concerned with how to transfer data from the phone to the server or vice versa. I'm mentioning my particular technologies only because I cannot use, for example, the replication features available to MySQL.

I know that the client-server data synchronization problem has been around for a long, long time and would like information - articles, books, advice, etc - about patterns for handling the problem. I'd like to know about general strategies for dealing with synchronization to compare strengths, weaknesses and trade-offs.

Thanks for your help

+6  A: 
p.marino
Thank you for your answer. I'm very interested in reading about commonly used / possible solutions (pros, cons, comparisons) to the problems you outline.
Scott Saunders
I suppose you already checked Wikipedia and the stuff they link to, right?
p.marino
+1 This is a great post with very important information about that issue. One missing point: synchronizing deleted records.
Stefan Steinegger
I tend to consider "deleted" as a special case of "updated", especially because for this kind of situations I tend to favor "logical delete" instead of "physical delete". So for me "deleted" on the master or slave side means "the special boolean is-deleted flag has been flipped" more than anything else.
p.marino
Thank you for the excellent answer.
Scott Saunders
Thanks. I have added one more link to another article (dr.dobbs) and will update the bibliography if I can find something else.
p.marino