question

Braeden C avatar image
Braeden C asked

Migrating to PlayFab - Concerns,Migrating to PlayFab - Architecture

Hi,

Our game is currently hosted on azure. We have dozens of microservices (Service Fabric) responsible for user identities (Azure B2C), matchmaking, character progress, inventory, missions, catalog, billing and more. Operations of these services are exposed through a public API gateway (REST) and some of these are not simple CRUD operations - we have a lot of business logic implemented in each operation. Most of our game data are stored in CosmosDB. The game instance is being implemented in Unity (client + server).

If we were to migrate to PlayFab, how would the above architecture be modeled and where would all of this business logic go? Would it be implemented in Cloud Script?

Also, are there any samples of large-scale complex game solutions powered by PlayFab that we can have a look at and preferably experiment with?

Thanks!

,

Hi,

Our game is currently hosted on azure. We have dozens of microservices (Service Fabric) responsible for user identities (Azure B2C), matchmaking, character progress, inventory, missions, catalog, billing and more. Operations of these services are exposed through a public API gateway (REST) and some of these are not simple CRUD operations - we have a lot of business logic implemented in each operation. Most of our game data are stored in CosmosDB. The game instance is being implemented in Unity (client + server).

If we were to migrate to PlayFab, how would the above architecture be modeled and where would all of this business logic go? Would it be implemented in Cloud Script?

Also, are there any samples of large-scale complex game solutions powered by PlayFab that we can have a look at and preferably experiment with?

Thanks!

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

First, I'd recommend reviewing the existing features in PlayFab, as some of the things you listed, like matchmaking, catalog, and inventory, are built-in components of the service. For anything where we have a service that does what you need, we'd recommend simply using it.

For things that require custom, server authoritative code, there are several options:

1. Cloud Script: Has a limited amount of CPU time per call (and correspondingly, number of Server API calls that can be executed), but it's great for lightweight operations, like checking reported scores from a single player game to help prevent cheating.

2. Azure Functions: We're actively working on an integration of Functions with PlayFab so that you'll be able to trigger the functions from a single API call, as well as from PlayStream Action triggers.

3. Custom Game Server (hosted by us or externally): This is the high end, where you have complex realtime logic needs, or require a high frequency of data exchanges with the client (the server would then periodically update the PlayFab data for the player).

And yes, there are a great many (literally thousands) of games using PlayFab today that you could look at. A few of them are listed on our Games tab (https://playfab.com/games/). We also have an example "game" (just a demo) that showcases some of the features of PlayFab available here: https://github.com/PlayFab/UnicornBattle

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Braeden C avatar image Braeden C commented ·

Thanks for your quick reply!

We decided that we prefer to avoid migrating all of our services over to PlayFab - it seems that this will mess-up with the DevOps practises that we have in place.

However, we still want to utilize the matchmaking service and the live statistics provided by PlayFab through the dev portal. Perhaps our backend services can periodically update PlayFab data for this purpose, do you think this is a valid use case?

Thanks!

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.