question

Aaron avatar image
Aaron asked

how to get a list of SharedGroupData

I want to get all SharedGroupData list or a paged list, or filter based on the value of some fields (key) ,how to to that?

 

10 |1200

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

brendan avatar image
brendan answered

Shared Group Data is designed in such a way that you can create several of that data storage type for each player. However, that also means that a query to get all of them for the game would be extremely inefficient - to the point of causing problems if the result would be thousands (or more) of them. The way to manage Shared Group Data is to use a regular naming pattern, such as { {PlayFabId}}_ActiveGames, for example, where the { {PlayFabId}} part is the PlayFab ID of the individual player. Another option would be to keep a "master" list of Shared Group Data objects that the client needs access to, in User Read Only 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.

Aaron avatar image
Aaron answered

So I'm going to stored "master list" in the header data, but value‘s maxsize is 128kb, if Clan/Guild is  a lot ,need to be saved in multiple values, like: AllClanList_1, AllClanList_2. . . , So I need to save the max number in a value,

but when I deleted a SharedGroupData, I'll need to remove it from all the List, because I do not know in which it is stored.
When I create a SharedGroupData, I need to save it in AllClanList_x, but I do not know which list free position, so I need to calculate the space each list until a space that can be stored, if not also We need to create a list, and the MaxListNumber be modified.
This seems very complicated ah.

10 |1200

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

brendan avatar image
brendan answered

Sorry, could you provide more info on how you envision this working? Again, Clan functionality would have to be very limited using Shared Group Data. Clan discovery would need to be via friend lists, interaction with other players, or personal message invites, in general, as you should not create a Shared Group Data that all players would be hitting to get a "master list". Shared Group Data is designed for a subset of users to share data - if you were to attempt to have all users in your game read from a single Shared Group Data for some particular piece of information, you would run into delays in the queries and even failures to read due to database throttling once you have a significant number of players.

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.