question

Steven White avatar image
Steven White asked

Bulk applications for Leaderboards?

Hey there,

So been evaluating Playfab and I do love what is setup, but now that I'm getting going I'm a bit worried about the feasibility for our application.


We have a host that needs to get and set data for up to a 100 users at a time, with a global leader-board with multiple stats.

Problem 1.

looks like we can only have a single stat leader-board, which means that we have to update multiple leaderboards for each player. With 5 stats, that's 500 calls alone a round...


problem 2.


Getting global data on a leaderboard of a 100 with multiple stats...

- Get one leaderboard to aggregate off of.

- get player profiles for each user to get statistics.

Problem 3.

When a player joins the match we need to check and validate their characters/skins/entitlements...


Could seen to pull player statistics and other data on login. So have to login -> then call profile to get it to work.


Off the cuff on our first iteration we're looking at way too many api calls on a full round - plus waiting for data to come back just to make another call is a huge roadblock at some points.

The worst of it - our matches are only about 5-10 minute long...


Is there a better way we can manage this workflow, still digging in and reading but the data-sets right now have me a bit worried that we're going to be making way too many calls if the game picks up at all.

Leaderboards and Statistics
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

·
Seth Du avatar image
Seth Du answered

I assume you have implemented the Multiplayer Server 2.0 feature for your game because it will be very difficult to manage 100 players' data without a dedicated multiplayer server.

Problem 1:

Since it is a multiplayer game, the hosted server can call server API, which can have higher frequency limit. UpdatePlayerStatistics is able to update 5 different Statistics within one request, hence 100 API will be enough.

Problem 2:

If you check GetLeaderboard API reference carefully on: https://docs.microsoft.com/en-us/rest/api/playfab/client/player-data-management/getleaderboard?view=playfab-rest. You may notice the ProfileConstraints property in the request. By specifying the playerprofileviewconstraints, you may get the required profile data in the callback of GetLeaderboard, without having additional API calls.

Problem3:

The login authentication context is only required in client API. Server API will only require secret key, hence server API will be a better solution.

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.