CloudKit share for collaborating, zone busy / rate limit errors

Hi, we are currently experimenting with CloudKit collaboration between multiple users in our app. We establish a share and then edit a number of records in a custom zone + use of fetchZoneChanges mechanism on all devices.


We quickly went into Zone Busy / Rate limit errors (Development environment) when 2 or more users are simultaneously working on that zone, one through its private DB (the "server") and the others through the shared database (the "clients"). We first get a Zone Busy error that asks for a 30sec pause, then we get rate limit errors if we don't wait. It looks like CloudKit server-side locks the DB during update of one device, basically kicking out other devices operations.


My question basically is: is CloudKit suitable for multiple users interacting on the same data in the same zone in an interactive fashion (each sending about 1 record update every second), or is that a bad use case for CloudKit? Thank you.

Replies

While testing, we also encountered several pause requests while performing modify operations from multiple devices at the same time - I think it is by design. I do not think that CloudKit is designed to modify records from multiple devices at the same time interactively.


On the other hand, Pages, Numbers and Keynote seems to be using CloudKit for their sharing of documents and this is working great when changing documents on multiple devices simultaniously. I don't know if this is pure CloudKit or if they are using private APIs only to be used by Apple.

Definitely. It makes sense that atomic changes in a zone is provoking failure to other clients trying to update data at the same time. Sure sounds like we don't have such granular iCloud-based APIs that enable implementing something similar to their iWork suite. Better off with other options for now.

Thank you.