question

Talha avatar image
Talha asked

MessageBoard/Stauts Update Like Facebook etc

Hi Playfab, I would like to know how to create a system of Messageboard/status update using playfab in unity.

What we want is to accept the status from user. (under 280 characters) save it in KVP, as readonlydata. But how to retrieve the statuses (lets say 50 of theses statuses)?

we could call getleaderboardaroundplayer in cloudscript and using the playerIds we could potentially retrieve their readonlydata. but that is a lot of calls right?

How to do it the right way, if possible?

Any help would be appreciated.

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

·
brendan avatar image
brendan answered

While it's technically possible, it's not something we would recommend. Pulling a large amount of data for a large number of users, per player, would have significant costs. To calculate this out, have a look at our pricing page: https://playfab.com/pricing/

And the meters overview: https://docs.microsoft.com/en-us/gaming/playfab/features/pricing/meters/meters

So, if you're storing posts on the player, each update of that is going to "tick" the profile write meter by 1 for every KB of that update. Similarly each read is going to "tick" the profile read meter by 1 per KB, and in both cases, that's per item read. The reads in particular are going to add up quickly, particularly for players with a lot of friends, since they'll be requesting data from a large number of other players.

While a general-purpose data system is good for a wide range of use cases (most games, for example), that's an example of a use case that requires a bespoke data backend built around very specific requirements, in order to keep costs low.

Now, that said, what we would recommend is to build on PlayFab for all the user management, monetization, LiveOps, etc. that we provide, and use a database service for your messageboard posts, so that you can design that one part for exactly what you need. Of those available (https://azure.microsoft.com/en-us/product-categories/databases/), Cosmos DB may be a good one to look at. Bear in mind that you'll want to design for privacy as a high priority, making sure to provide ways for users to be able to query for and delete all their data, per the GDPR requirements.

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.