Communication between Photon Cloud game and web server
I am creating a multiplayer game using Photon Cloud (Photon Unity Network). For storage of player data (profile, inventory, achievments) I use web server (asp.net mvc & sql server). How to organize the communication between the game client and the web server? I see two ways:
Use WWW class and send requests direct to web server: var www = new WWW("http://mygame.com/api/user.get?id=1"); // Each time creates a new connection to the web server
Use Photon Cloud Webhooks and send requests through Photon servers: PhotonNetwork.WebRpc("user.get?id=1"); // Photon Servers play a Proxy or Relay role between client and web server http://doc.photonengine.com/en/realtime/current/reference/webrpc
Which way do you recommend? The first way is simple but each time creates a new connection to the web server. The second way use one persistent connection between client and Photon server but there is a delay between connecting the Photon server to the web server.
In first game I use WebRPC. But in new game I wanna use WWW + Photon WebHooks. WWW for simple request (equip item, change nickname, get profile), WebHooks for secure request (exp for kill, exp for match, quest completion).
Alternative to own server: https://playfab.com/
http://forum.photonengine.com/discussion/7430/webrpc-how-to-send-secure http://forum.photonengine.com/discussion/10245/webhooks-how-to-send-full-state-of-the-room
Your answer
Follow this Question
Related Questions
Unity Photon doesn't Spawn Player 0 Answers
Unity login system without Photon Custom Auth 0 Answers
How do I sync Rigidbody2D over the network? 0 Answers
UNET (Multiplayer) calling [command] function twice 0 Answers