question

stephenacarrington avatar image
stephenacarrington asked

Bulletin Boards In Game

Hello,

I am looking to implement a bulletin board type of mechanic in my Unreal Engine 4 project and was wondering if Playfab had any sort of system to support this. What I am trying to do is have certain points in the world have a bulletin board of sorts where the player can write a message to and other players would be able to interact with that bulletin board in their game and read that message posted by the other player.

I see that Playfab has the shared group data, but that is restricted to smaller groups of people and does not seem to be quite what I was looking for, so I was wondering if Playfab had some sort of functionality I am overlooking that would allow me to implement something like this?

Player Datadata
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

No, sorry - a generic system which can take input from potentially millions of users and feed that data out to those same users in a consistent manner would be terrifyingly expensive to operate. Most systems that take inputs from a user base and provide a way to read from it are custom-designed to the specific requirements of the feature in question. Leaderboards are one such example - they take numeric values only, and then provide a way to retrieve those scores in an ordered list, with a short latency to the sorting process when a new value is entered (a second or so).

If you're okay with the messages being transient, and removed when no players are connected, you may want to use a service like Photon Chat. Otherwise, you should consider using an external data table, so that you can directly control the aggregation of data and manage returning it to players.

2 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.

stephenacarrington avatar image stephenacarrington commented ·

Okay that makes sense why it would be too expensive to operate.

Since that is not an option, would it theoretically then be possible to store a persons response to a specific message board in their own player data, and when a player in game accesses a board, have the board fire off a cloudscript function to to select 20 or so random users and pull the data from that field to then use and display to the player?

*Edit:

Looking through the server functions that I could use for cloudscript, I do not see one that would query users, which I suppose could run into a similar problem as you stated as getting a list of all users could theoretically be way too big.

So instead, when a player uploads a message to a specific board, I could use try using cloudscript to add their player id to a title data value corresponding to a board? And then from there I could get get the title data and use a small number of the player IDs in that list to pull their data and return it to the game to display?

0 Likes 0 ·
brendan avatar image brendan stephenacarrington commented ·

Player data (and Shared Group Data, which is really just player data without a specific player assigned to it) is not sharded or cached in any way, as it needs to have a high level of consistency. That's why you can only have a few users associated with a Shared Group - if you try to have too many people read from the same non-cached/sharded resource at once, it'll cause a delay in responses for the data. Basically, it's just physics - a single row of data in a table can only be read by one request at a time. So if a ton of requests come in all at once for that one piece of data, it's going to take time for all of those requests to get a reply. That, in turn, can cause issues for the table overall, if this happens enough - in that case, we would throttle the calls in order to prevent issues.

Since in your model you wouldn't be able to control the number of players requesting the same data at once, that's not really a viable solution.

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.