question

brendan avatar image
brendan asked

Persistence with server authority

Brendan Vanous
started a topic on Thu, 09 April 2015 at 10:37 AM

Question from a developer:

I need some form of data persistence with server authority, so that players can't cheat the data. Does PlayFab provide for this?

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

Best Answer
Brendan Vanous said on Thu, 09 April 2015 at 10:38 AM

Absolutely. One of our key tenets is that we don't trust the client, since you can pretty much guarantee that anything you give it authority over will be abused. There are several ways you could do this, depending on your needs:

  1. Cloud Script - We provide a system for hosting and running JavaScript (and we'll be adding C# to this, as well) for your title. Any handlers you create can be called by the title and have full access to the Server API set, allowing you to securely update data. Here's a link to our docs on this.

  2. Photon with webhooks (calling into Cloud Script) - We have a private instance of the Photon Cloud thanks to our partnership with Exit Games. So Premium tier titles get Photon Turnbased, Runtime, and Chat as part of their PlayFab pricing. You can set up and run Rooms (here's a link to the docs on Photon Turnbased, as an example) which make for easy realtime connections between players, as well as host session-level data. And you can make calls from Photon Cloud servers via webhooks (events raised by the game) which can call into our Cloud Script.

  3. Custom game servers - If you have more hard-core needs (like dedicated servers for an FPS), we provide hosting for custom game servers, and a matchmaker to get people into the games (we also provide an API set if you want to use your own custom matchmaker, but host the servers in our elastic backend). We provide both physical and virtual server hosting, in order to optimize costs for you (physical servers are leased on a monthly basis, but cost half what an equivalent AWS server does if it's running 24/7 for a month).

As to the data itself, we provide a number of different forms. For user data specifically, we have the concepts of data that can be read and written by the client, read only (must be written by the server), and internal (cannot even be read by the client). For each of these, you can have the data live at the title level or the publisher level (you can have one or more Publisher IDs, for the purposes of sharing players and data between titles).

We also have shared group data, which isn't player-specific (but which you can have players "attached" to, if needed). This is useful for clan systems or asynchronous games (here's a link to our post on how to manage an async game entirely using Cloud Script and our data systems).

And, of course, we have title-level data for things like configuration data across all players, and a content system (CDN-type) for managing larger files.


1 Comment
Brendan Vanous said on Thu, 09 April 2015 at 10:38 AM

Absolutely. One of our key tenets is that we don't trust the client, since you can pretty much guarantee that anything you give it authority over will be abused. There are several ways you could do this, depending on your needs:

  1. Cloud Script - We provide a system for hosting and running JavaScript (and we'll be adding C# to this, as well) for your title. Any handlers you create can be called by the title and have full access to the Server API set, allowing you to securely update data. Here's a link to our docs on this.

  2. Photon with webhooks (calling into Cloud Script) - We have a private instance of the Photon Cloud thanks to our partnership with Exit Games. So Premium tier titles get Photon Turnbased, Runtime, and Chat as part of their PlayFab pricing. You can set up and run Rooms (here's a link to the docs on Photon Turnbased, as an example) which make for easy realtime connections between players, as well as host session-level data. And you can make calls from Photon Cloud servers via webhooks (events raised by the game) which can call into our Cloud Script.

  3. Custom game servers - If you have more hard-core needs (like dedicated servers for an FPS), we provide hosting for custom game servers, and a matchmaker to get people into the games (we also provide an API set if you want to use your own custom matchmaker, but host the servers in our elastic backend). We provide both physical and virtual server hosting, in order to optimize costs for you (physical servers are leased on a monthly basis, but cost half what an equivalent AWS server does if it's running 24/7 for a month).

As to the data itself, we provide a number of different forms. For user data specifically, we have the concepts of data that can be read and written by the client, read only (must be written by the server), and internal (cannot even be read by the client). For each of these, you can have the data live at the title level or the publisher level (you can have one or more Publisher IDs, for the purposes of sharing players and data between titles).

We also have shared group data, which isn't player-specific (but which you can have players "attached" to, if needed). This is useful for clan systems or asynchronous games (here's a link to our post on how to manage an async game entirely using Cloud Script and our data systems).

And, of course, we have title-level data for things like configuration data across all players, and a content system (CDN-type) for managing larger files.

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.