I have a few sites running a php app with a mysql backend. They are all running on separate servers due to the fact that they might not have 100% internet connection time.
Currently, I am storing a modified date time for every record. As well as a flag to mark records as being deleted. Due to the synchronization, all deleted records are still needed to bo tracked so that i can sync the delete.
Every site then tracks when they have synchronized to.
Problem is all the sites does inserts and updates. so if a site is disconnected for a while. it causes problem with the data sync of all the other sites.
Any idea on how to keep all the sites in sync?
The current program that does the sync is written in php. It loops through all the tables and checks for records that has been modified since the last sync.
Problem solved. More or less. besides keeping track of when the record was last modified, now i also track when the record was created/modified on the current server. this means that i actually have 2 time stamp. one to track the actual modified time, and one to track when this change has been copied into this server. i just synchronize the records based on the time the record was copied over.