Passing peer between Photon Servers.

Options
markharoldr
edited January 2012 in Photon Server
Hello Everyone,

I want to ask if it is possible to pass a peer between two Photon Servers.

On our game we are planning to use two Photon Servers for two different functions.The first server will handle all the common operations for the game and the second will be handling some special functions that requires hard computation.

Now given this setup, is the scenario below possible?
1. The client will connect to the first server and will be identified as a peer.
2. Once a client sends a request for using a special function, the first server will transfer the peer to the second server.
3. The second server will now receive requests from the client.
4. The client is now done with the special function and the second server prompts the first server to take over the client.
5. The first server then processes the requests from the client.

If this is not possible, are there alternative solutions for this?

Yours,
Mark

Comments

  • dreamora
    Options
    The loadbalancing does that basically with the master acting as proxy / connecting too server and the game server handling the real work.
    You could build upon that for your needs or at least use it as a base to understand how to do it up to a given degree
  • Thanks dreamora :)
  • Tobias
    Options
    It's definitely possible to implement your usecase.

    The Loadbalancing solution does something similar but not exactly the same:
    We know that each game will last a while, so the master will not forward operations but send the clients to certain game servers. The clients disconnect the master and connect to the game server, play a match and return.

    It sounds like you only want to send one operation to another server which does heavy work. You could either forward this server-to-server (and keep the client's connection) or you could keep the "original" connection on the client and create another Peer instance to connect to the second server for just one operation.

    It depends on your exact usecase really.
  • Thank you Tobias :)