question

Engin Yılmaz avatar image
Engin Yılmaz asked

Is PlayFabs Database Real Time?

There is a real time database in firebase. Is playfabs database also real time? I mean for example I have a textbox on my UI or somewhere in game which shows another users soldier count and when user changes his soldier count, can i see the change immediately in my textbox without writing a GetData code? or I have to write a code to check the changes in database within an interval(Lets say every 1 second)?

data
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

Surely you can check the data within an specified interval, but we suggest not doing real-time jobs via PlayFab for now. It’s better to design an event-based mechanism.

For example in Unity Engine implemented with Photon, if you are developing a matchmaking game, and let’s say there are 1 host and 3 guests in a game. When 1 guest changes the soldier count (you can also write a C# event for passive changes), it will send an RPC calls to the host. After the host verifies that change, it will broadcast to all members in the game for synchronization. For more details you can check this Photon official documentation as reference.

In terms of real-time functions in PlayFab, there is an up-coming feature named PlayFab PubSub. Please keep track of documentation updates if you are interested.

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.