[Cosmo-dev] morse code docs
Morgen Sagen
morgen at osafoundation.org
Thu Nov 16 17:16:18 PST 2006
Just thought of something else...
When a client syncs a collection, it does a GET (getting data and the
sync token back from the server), resolves any conflicts between
local and remote changes, then does a POST (uploading data and
getting back a sync token in response). However, there is a chance
that another client did a POST between the first client's GET and
POST. Therefore I suggest that when a client does a POST the client
includes the sync token in the header, and the server should reject
that POST request if the collection's sync token is different. Then
it's the client's responsibility to GET the new data (sending the old
sync token and retrieving the new sync token in the process), resolve
any new conflicts, and try another POST (sending the new sync token
and data). If a POST is just allowed to proceed without such a check
it's possible that a client could miss out on others' changes.
~morgen
More information about the cosmo-dev
mailing list