question

kennyroy avatar image
kennyroy asked

Chat logs?

Hey guys. Just wondering how you would do persistent chat logs (if possible) on PF. I was thinking of upgrading to Indie Tier and just staying under the filesize limit, with a json object that is updated on each msg received, truncating history as it goes. Would there be a better way? Trying to stay within PF and not have a server just for this, but will evaluate that option if it's recommended as the only way.

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.

Citrus Yan avatar image Citrus Yan commented ·

Hey, we are trying to reach our product team to confirm the technical feasibility. Please wait, thank you.

0 Likes 0 ·
kennyroy avatar image kennyroy Citrus Yan commented ·

So with 10k per playerData value entry, that's about 1500 words, enough for my estimate of about 100 lines of normal chat. In my game, you can only chat with people in your entity group, which is on average 10-20 people. I know that PF only supports 10 KVP updates per playerData update, however you can only chat with one person at a time and so would only ever be updating one KVP at a time. Also, the KVP update only happens on a chat message sent or received - again, FAR less than the per second, per minute, per hour playerData update limits too. In an old thread regarding tier limits, @Brendan was advising another user they should not try to around the 10KVP per player soft limit by having hundreds of entries and updating 10 at a time. I feel like this is VERY different; only updating 1 at a time, but potentially having 20 or so of these values.

THis is all assuming playerData is the way you recommend

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

You'll need to pick up the Party feature, if you want to enable a chat service in PlayFab. While the Entity File system does allow for a fair number of players to work with the same data (like with guilds and clans), the rate limiting would not allow you to update at the rate a full chat system would require. And none of our legacy data systems (player data, title data, shared group data) would support anything like this. Title Data can be read by all players, as it is sharded and cached, but it can only be updated occasionally, and only by operations driven at the title level (like admin tools) - never from a client-initiated action. Meanwhile, Player Data (User Data) and Shared Group Data (which is really just Player Data with no specific owner) can only be read from and written to by a very small number of players. And rate limiting on both types (title and player data) would also prevent it being used for a chat system like this.

Party: https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/networking/

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.

kennyroy avatar image kennyroy commented ·

Hell yeah let's get me set up with Party! Sending email :)

0 Likes 0 ·
kennyroy avatar image kennyroy commented ·

Sent email but reading the Party description a little closer, I have a few questions that I thought I should explain back here in the forum thread as opposed to the email thread, for the benefit of the community.

So I already am using Photon Chat, and can send and receive messages fine. What I want to create is just a LOG of the chat, not integrate my own chat by hacking around playerData to be the actual place where that chat is being processed by all.

The idea goes, let's say I'm chatting with you @Brendan. We are happily chatting away using Photon. I'd be caching that text into JSON using playerPrefs, and then on a regular basis, like once every couple of seconds and only onChange, update my OWN playerData object with "chatBrendan : [json of chat]". I have my log and you have yours in your "chatKenny" entry.

So, I am not in search of realtime chat functionality and trying to hack it through playerData update. I have chat already and want to save a bit of it. I can live with 10k of chat history saved for each user (and remember in my game you can only chat with people in your entity group which we suspect will be 5-20, average of 10). Would this be allowed or no?

0 Likes 0 ·
kennyroy avatar image kennyroy commented ·

Also want to mention that I want that Party functionality too eventually, especially the translation, (OMG!)

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.