question

omerkhalid avatar image
omerkhalid asked

Architecture Review

Hi. We have implemented a server architecture with PlayFab at the centre of it. We have divided the code into two parts. Code that does not encounter change e.g login apis, add/remove friends etc and code that does e.g getting custom data on game connect etc. The former part is implemented via the Unity SDK and the latter in Azure functions. This division is to have a balance between performance vs having the flexibility for change without publishing an update to Play Store/App Store i.e login methods do not require any change so the hop to functions app is avoided. Player data and title data are stored in PlayFab but we are also using Mongo for saving data which isn't feasible to store in PlayFab e.g player searches etc. This is connected via our Azure functions app. We are using Photon PUN for all multiplayer use cases e.g room, matchmaking, game sync etc. The api of all this is exposed via a Unity package and we intend this to be a plug and play backend solution for our games. We are moving our live game from another service to PlayFab and this architecture and I was hoping to have this reviewed from someone from PlayFab or a PlayFab team. Any insights will be super helpful!

Custom Game Servers
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

·
Ivan Cai avatar image
Ivan Cai answered

In general, you can directly call client API to implement some functions that do not involve vc, statistic, etc via unity sdk. In cloudscript or azure funciton server side, you can call server API and add some validation logic for preventing cheat. For storing data, please note that title Data cannot be updated as a result of a player operation, as it is not designed for a high frequency of updates. As far as I know, PUN integrates some out-of-the-box network synchronization methods in its SDK package, PlayFab Multiplayer Server only provides a separate server hosting service attached corresponding API and matchmaking services.

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.