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
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.