I need to sync my local core data stack against a server running a persistent data storage underneath the covers. (I've gone through other posts here and on SO on similar topics)
My requirements:
One way syncing. Meaning my server is always updated and my clients just merely need to be fed incremental deltas which they feed into their core data stack.
The server could arbitrarily insert new records, modify existing ones or even delete them.
I would rather not use RestKit because I can do the work of making queries and updating local state myself. I don't need an extra library to do this.
My solution:
I keep a last updated date (UTC) locally. I send this date to my server periodically and my server responds with the data I need to update or insert, based on a server timestamp for each record.
My problem:
I don't know how to handle deletes.
How would I handle deletes in such a scenario? If I delete the record from the server, how will clients know to delete that record as well.
Thoughts? I can think of a number of complicated ways to do it (e.g. don't really delete the record, or keep track separately of deleted records, etc.), but I'm looking for the simplest.