Idea

brendan avatar image
brendan suggested

User listing

10 |1200

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

2 Comments

·
brendan avatar image
brendan commented

Brendan Vanous
started a topic on Fri, 08 August 2014 at 12:13 AM

I'd like to be able to see a full list of users for my title, specifically for development purposes (seeing all the accounts which all members of my team have created).


10 Comments
Brendan Vanous said on Wed, 11 March 2015 at 10:59 PM

The list of users can be obtained via the daily reporting system (https://api.playfab.com/Documentation/Admin/method/GetDataReport). There are two reports that are of interest in this case:

TitleNewUserReport - List of all users who signed up for the title in the last 24 hours

TitleActiveUsersReport - List of all users who signed into the title in the last 24 hours

In all cases, reports available via this API are generated daily, and are stored in S3 so that you can retrieve as many (or as few) as you need at any time.


Mihael said on Sat, 12 September 2015 at 9:56 AM

I'd also like to query this information from the client side to implement a user search.


Brendan Vanous said on Sat, 12 September 2015 at 11:00 AM

Hi Mihael,

Could you describe the specifics of the user scenario for your game? Having a full definition of the problem you're trying to solve would help us with designing a solution.

Brendan


Mihael said on Sat, 12 September 2015 at 11:09 AM

Let's say a friend of mine joins the game and doesn't know my username exactly. I'd like to implement a search that returns all users with a query string in their Username or Display Name. I'd also like to search for all users of my title, not just new users in the last 24h.


Brendan Vanous said on Sat, 12 September 2015 at 2:02 PM

You can get the complete list of users for your game by retrieving all of the daily reports. If you have a regular job on your side which grabs the latest from S3 each day, you'll always have the complete set.

Unfortunately, substring/wildcard searches are extremely inefficient, which is why they're not available. However, we do provide you with the ability to search on more than just username, so if (for example) you're also asking players for their email addresses as part of your game flow at any point, the player could use that to search on friends.

Brendan


Mihael said on Tue, 15 September 2015 at 12:35 AM

So you say we should have our own backend for listing users?


Brendan Vanous said on Tue, 15 September 2015 at 12:57 AM

Actually, no, my advice would be to talk to us about the specific feature you're attempting to create. There's no situation in which is would be useful to present a user with the listing of all players in the game, since that could be millions of players, many of whom stopped playing some time ago. So the questions to ask are, what information are you trying to convey to the user, and what are the important factors that help to determine what, of the available information, should be displayed?

Actions which have to traverse the full list of all users in a game and take an action - even if it's a comparison operation - are very inefficient. If you were to want to remove an item from your game, for instance (because you thought it was too powerful, maybe), you wouldn't want to do this by traversing the list. In the time it takes to process millions of players, the first one modified could get matched with the last one to be modified (but who hasn't been yet), creating an unfair contest. Instead, the better way to do it is to modify the players when they are relevant - usually on sign-in, but if the game in our example is asynchronous, it could be when the match between players starts. Cloud Script is an excellent way to manage updates for that example.

For your specific example, substring searches of players, we do not offer this currently because of the computational cost. Since our goal is to provide a service to game developers which is as affordable as possible and as scalable as possible, we try to always ensure we're careful about not introducing features which would threaten to increase the cost of our service - if anything, we want to drive it down as much as possible, so that we level the playing field and give everyone the opportunity to have a complete backend service. And while I won't claim that their reasons are the same, it's worth noting that this feature (substring search of all usernames) does not exist in Playstation Network, Steam, or Xbox Live. If your key feature is being able to find friends in your game, I would recommend using our existing features - finding by Username, Title Display Name, email address, PlayFab ID, or pre-existing friend relationships in Facebook and Steam.

Brendan


Mihael said on Tue, 15 September 2015 at 1:07 AM

Thanks for the clarification. That would certainly be inefficient if you have millions of users. Just to clarify - PlayFab stores all it's users from every title in a single database? You don't have separate databases for every title?


Brendan Vanous said on Tue, 15 September 2015 at 1:14 AM

Yes and no. All users are stored with their Publisher ID - all titles in your Studio, by default, have the same Publisher ID. That way, you have the ability to share data at the Publisher level across all your titles for the user (see the GetUserPublisherData as one example of this). So a person who creates an account in a game from publisher A and an account in a game from publisher B has two distinct accounts in PlayFab. And there's no way for publisher A to access any information about the account owned by publisher B (and vice-versa).

Now, our core service is a "shared" service, meaning that all the titles are sharing tables to some extent. That's why we cannot allow open query - one bad actor could impact the response times to all the other titles. Developers who need completely distinct tables can have a private instance of PlayFab - our pricing page has more info on that (https://playfab.com/pricing).

Brendan


Mihael said on Tue, 15 September 2015 at 1:15 AM

Thanks for clearing that up!

10 |1200

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

SL Tech avatar image
SL Tech commented

Hi Brendan, I'm trying the same thing: get a list of all the users in a Title.

TitleNewUserReport throws ""error": "ReportNotAvailable""

I dont see this in the Reports tab either in the GameManager.

How do we go about this data now?

Thanks

1 comment
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 commented ·

For forum posts that are this old, it's a good idea to double-check against the current functionality, as things may have changed. Since we're committed to no breaking changes, we do have a "feature flag" capability that allows us to tag things we're deprecating, so that titles using it aren't impacted, but we do update the service from time to time, to add or improve functionality.

In this case, the "TitleNewUserReport" is no longer generated for new titles. To get the complete list of all players in your game, the best route would be to use our Snowflake Computing add-on, so that you can access all data for your title directly. Alternately, you can use Analytics->Webhooks or Analytics->Event Archive to have all events for your game piped to your own server or S3 bucket.

0 Likes 0 ·

Write a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.

Related Ideas