question

tobias-nerg avatar image
tobias-nerg asked

Question about Best Practice of using APIs

Hello!

I've been evaluating and learning PlayFab for about 6 months, and the time has come to actually think about the end solution with game instances communicating towards the PlayFab backend.

PlayFab comes with a myriad of API's and I've been using most of them straight inside my game using the SDK's for Unity. It has dawned on me that far from all API's are meant to be used on the client (a running game instance) directly, and I'm struggling to find any articles that speak more about security, or architectural best practices when it comes to this subject (does those exist?), so I just want to briefly share my overall current understanding and see if I have a sound reasoning:

* On the big whole, all operations not present in the Unity PlayFabClientAPI are not designed to be used from the Game Client.

* Some functions that only mean fetching or reading data are ok to be used from the Game Client.

* For functions not designed to be used from the Game Client, they should be invoked by querying CloudScripts or Azure Functions and give meaningful data back to the Game Client.

* There are some gray areas where I'm unsure, for instance the PlayFabParty SDK. Of course Players need to be able to join a Party Network, receive data from it, but is it "safe" to actually request and join a party network from the client, or should that logic be in a CloudScript?

Best Regards,

Tobias.

apissdks
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

No, Cloud Script is not required for Party. Party can be implemented completely on clients. You may need to understand the key concepts of Party features in this section of document, and check the sample on Party samples - PlayFab | Microsoft Docs.

Please also note that to prevent malicious players and protect games and players, you may also refer to the suggestions on this document -- PlayFab Party invitations and the security model - PlayFab | Microsoft Docs

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.