The task list example is a great starting point to describe the basic idea here.
Say we have two different people who wish to collaborate on the same task list. What happens if tasks are changed while the device is offline?
It seems like this is a problem very similar to how a version control system works.
These things would have to be handled:
1. Track the last modify date for each item.
2. Track the last time this device synced.
3. On next sync, retrieve remote changes since last sync to apply to the local DB.
4. Send all local changes to the remote server to apply remotely.
But this seems to be device centric rather than server centric.
Maybe the solution would be better as more like a db change/redo log strategy. If a device goes offline, the changes are maintained in a change log and streamed to the server when it comes back online. The server would send updates from other devices back down as well.
Then, as a separate topic, we could discuss conflict resolution.
E.g. what if multiple folks edit the same task, who wins? There is plenty of fun here (do we merge, do we just do something simple, what if two people add the same task?, etc).
Thanks,
Brian