question

danialkordmodanlou avatar image
danialkordmodanlou asked

updating a global player statistics synchronously

Hey there.

Consider the following situation: I have an AI (our global Player) that every player can play against it. I want to update the AI statistics after every game against users. With a high number of users, we will always have some games ending at the approximately same time so in this scenario calling the updated statistics for AI can have race conditions. I want to be sure all the function calls receives by the server but get run in a sequential way and not concurrently. Can you help me with that, please?

Many thanks for considering my request.

CloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

What you're trying to achieve seems to be a global statistic that will update based on the player's actions. If so, PlayFab does not provide such feature. For your needs, we recommend using an external database to implement the global statistic.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.