Does it have some sort of MVCC mechanism that can prevent a writer from clobbering a change made by another writer? For example something like the ETag mechanism in HTTP (i.e. PUT with If-Match.)
On Sep 6, 2016, at 10:23 PM, Brendan Duddridge <bren...@gmail.com> wrote:I don't think so. Well at least I don't really know. It's higher level than that. All conflict management needs to be done on the client I believe.
When you save records, the value in the
savePolicy
property determines how to proceed when conflicts are detected on the server. Because records can be modified between the time you fetch them and the time you save them, the save policy determines whether new changes overwrite existing changes. By default, the operation object reports an error if a newer version of a record is found on the server. You can change the default setting to permit your changes to overwrite the server values wholly or partially.
I think you could build a sync system using CBL where the clients communicate only through CloudKit. The revision tree stuff in CBL would just be unused overhead. But you can’t combine this with CBL’s replicator — I’ve tried to figure out how to, and it just doesn’t work. If revisions can get transferred both through CloudKit [or something similar] and through the normal replicator, the versioning can get seriously confused and Bad Stuff can happen, like false conflicts and clobbered writes.