Greetings,
we're really happy with using PlayFab so far. The client and server APIs are both very clean and well implemented within the SDKs.
We're having a problem with account initialization using CloudScript and the server request limit of 15, though:
We're working on a TD / city building game similar to clash of clans and when initializing the account, we need to add more than 15 items to the player's inventory. Also, those items need to get customData for position, health etc.
So we need a request for creating a new character, which is the village (so we can easily drop the village's data later), a request for creating 20 items at once (but without customData) and then we need to iterate over those 20 items to fill them with customData.
Our current solution has the CloudScript sending a new request to itself, providing the itemInstanceIds and an iterator-index, which tells the script, at which index to continue filling the itemInstances with customData.
We're wondering though about concurrency: what happens, if the client sends two requests at once? Will the second request be handled inbetween? So, if he sends accountInit and sellBuilding and accountInit needs to call itself once, to exceed the request limit 15, could it happen, that it's handled in this order? accountInit1 -> sellBuilding -> accountInit2?
Also, is there already a standard solution for concurrent updates? So, is there a safe way for calling cloudscript without having to worry, that if the user for example changes two building's positions to the same spot at the same time, both get updated at the same time, assuming for both, that the spot is still empty?
I'm really looking forward to your response and further development with PlayFab.
Best regards,
Marc Zaku