question

Alexander Surmann Flügel avatar image
Alexander Surmann Flügel asked

Save Data in a entity group?

Hello,

I hope this message finds you well. I am currently developing a game using Unity and Playfab, and I've integrated Playfab's Group System into my Unity project. My goal is to track the victories of each group. However, I came across a concern while reading the Playfab documentation regarding potential issues with multiple users accessing shared group data.

Let's assume, for example, that I have a group with 20,000 members (this is just an example). It's possible that at some point, two players might achieve a victory simultaneously and want to update the group with their wins. To address this scenario, I was contemplating a solution where, upon creating a group, the group's creator would also generate an empty player account (a placeholder for storage purposes). When a victory is achieved, it would only be attributed to the placeholder from the group.(the account that the group admin just created) The group data would primarily consist of a key indicating which account serves as the placeholder for storage.

Could you please advise if this approach is feasible and whether it would effectively resolve my concern? I greatly appreciate any assistance or insights you can provide. Thank you for your time and response.

Best regards, Alex

entitiesShared Group Data
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

·
Neils Shi avatar image
Neils Shi answered

Even though the creator of group creates an empty player account which used as a placeholder for storage purposes, but when multiple members within a group win at the same time, this placeholder account still needs to update the data multiple times in a short period of time, which also causes data update conflicts. Currently, PlayFab does not provide group leaderboards feature, you may need to use an external database (like Redis) to implement your function.

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.