I have Photon and Steam. For example, if I want to send a person an invite to my party, how would I go about doing this for a PC game?
Here's what I have in my head:
Option A:
Is there a better way of doing this, like with the PlayStream? Anything "pushy" for PC?
Option B:
_____________________________
Then....... not quite sure how to both join the same room. Perhaps:
Player2 would get another FriendInfo call and keep doing it until the Player1.PhotonRoomNumber (or whatever it's called) is not null, or after x failed attempts.
Answer by Joshua Strunk · Mar 17, 2017 at 03:36 PM
I would note that relying on push notifications for mobile is only really a hack anyway, not a solid solution.
The heartbeat style polling and steam methods should work, however every 15sec is excessive and likely to cause throttling. A key thing to remember is PlayFab is not a real-time messaging service, don't try to use it like one.
The solution we are going with is using another service to handle real-time messaging between users. This is very similar to using Steamworks, in out case our generic works on everything system of choice Photon Chat. If you want to add more authority to the system you can even due the write the PlayerData for invited and then on the sending players client send a ping to the receiving player to pull for the invite.
What is the minimum NOT considered realtime? I'm not worried about chat, can use Steam or Discord SDK (just got approved to their program), but in terms of notifications (friend invite, game invite), what's is 30s acceptable without throttles?
Interesting concept about pulling for invite, but seems a bit lame for 2017.
I wonder if you can include info within a steam invite, if I can invite to my own (Photons) server
Answer by Brendan · Mar 17, 2017 at 11:41 PM
@Dylan Hunt (this got a bit too long for a Comment)
First, let me state that all the limits in the service have the flexibility to be changed based on custom contracts. So if you ever feel there's something you need, but the service limits prevent it, you can always talk to our business team about what it would cost to have exactly what you do need. Everything below assumes you do not have a custom contract with higher limits.
PlayFab is a Web API based service, so there's no socket connection to the client. We manage to keep our prices low and offer a free tier specifically by making sure that by default, titles don't make an excessive number of calls. In general, you should be aiming for only a few calls a minute on average, over the lifetime of the session for the user, across all calls. So bursts of calls are fine, as long as the average works out.
We've had "burst" rate limiting for some time now, and we're in the process of adding "long-term" rate limiting, in order to help developers get immediate feedback from the service as they build and test their games. As we establish those long-term rate limits, we'll also provide documentation detailing it. But yes, a system that frequently polls PlayFab for info would clearly run into that throttle.
We may be adding something akin to SignalR down the road, but for right now, I would simply not advise trying to build a system like that into the base service, as the polling rate would need to be long enough between calls to impact the user experience. Instead, I would recommend using a system which is specifically designed for real-time communications, like Photon Realtime, or else have your own custom game servers which manage those requests.