question

James McGhee avatar image
James McGhee asked

SharedGroupData

TL;DR

1) if you lose the ID of a SharedGroupData set how do you query/find it ... cant find anyway to search for SharedGroupData even in the Dashboard ... so is a group whoes ID you lost just impossible to get at?

2) We need to store a couple simple fields for groups (Entity Group) this data isn't updated frequently and generally only by the server but it needs to be private such that only members of the group can read it or of course a server ... is there any solution for that sort of data other than SharedGroupData?

Summary:

We are looking to use SharedGroupData to store information for a small group of players that we need the data to be private among that group of players. This data wont be frequently updated.

We understand SharedGroupData wasn't really meant for this that it was meant for the turnbased situation but we specificly needed a simple place to store a couple private fields (private to that group)

The issue we have with the SharedGroupData concept is that there doesn't seem to be anyway in API or in the Dashboard to quary the SharedGroups of a given user or even for all shared groups assoceated with the title. And in our testing we have since created SharedGroups that we have lost the ID of so ... are they orphaned now with no way to query them?


Also worth noting that this was just an experament on our part to solve for a need we didn't see filled by the Entity system. In particular we needed to store a couple simple bits of data that could only be read by members of a group or the server e.g. private data. SharedGroupData seemed to fit that but the ideal of course would have been private data on an Entity Group.

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

·
Sarah Zhang avatar image
Sarah Zhang answered

1) if you lose the ID of a SharedGroupData set how do you query/find it ... cant find anyway to search for SharedGroupData even in the Dashboard ... so is a group whoes ID you lost just impossible to get at?

PlayFab doesn’t provide the feature to get the Shared Group Id list. You need to manage the Group Ids on your own. For example, you can try to store them in the player data.

2) We need to store a couple simple fields for groups (Entity Group) this data isn't updated frequently and generally only by the server but it needs to be private such that only members of the group can read it or of course a server ... is there any solution for that sort of data other than SharedGroupData?

Yes, you can store the group data in the entity object. You can set the Group Entity Object using Entity API SetObjects and get the objects using GetObjects. You can also set the objects on the Game Manager, you can navigate to [Game Manager]->[Groups], click the group Id, then edit the objects on the [Objects] tab.

3 comments
10 |1200

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

James McGhee avatar image James McGhee commented ·

on #1
Seems there must be some way at atleast an admin level to find and clear out old SharedGroupData objects since losing the ID for one is obviously going to happen so you must be experancing data bloat if you dont have a means to clear that.

on #2
The key point is private data ... we need to store 3 simple string fields assoceated at an EntityGroup level as private data the longest of which being 100char. At the moment what we are doing is creating the SharedGroupData giving it a generated name, storing that name on an EntityObject assoceated with the EntityGroup in question. The generated name is random so once lost cant be reconstructed.

Issues ... so if something goes sideways between creating the ID for the SharedGroupData and storing said ID on the EntityGroup's EntityObject then the SharedGroupData object ID can be lost and thus we have 3 or 4 SharedGroupData objects floating out in the either because there is no way to search for these and bugs happen.

There needs to be a better way to store group level private data within the PlayFab system with this sort of walkaround feel like I am missing something.

0 Likes 0 ·
James McGhee avatar image James McGhee commented ·

To simplify this question

Is there a way to store data on an Entity Group that we can reasonably assure that only members of that Entity Group can read said data?

From what I gather the objects and files assoceated with an entity group can be read by anyone who is aware of the group e.g. who has the group's ID

0 Likes 0 ·
James McGhee avatar image James McGhee commented ·

Poking around similar questions I ran into the policy idea.

Would it be possible to create a policy that says EntityObjects can only be read by members of the group? If so that would be perfect.

I haven't found any documentation on setting up custom pollicies yet but am looking

0 Likes 0 ·

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.