Page 1 of 1

transfer connection to different server

Posted: 09 Aug 2012, 17:26
by Molix
Our game is a virtual world and requires real-time updates for player movements and actions. We partition the game universe into Rooms, so nearly all communication is limited to only those users in the same Room. Communication between rooms is limited to custom private messages and a few updates. We are using the Unity client. We're using SFS1x, but will probably move to 2X shortly.

We are looking into scaling/clustering, and we have reviewed all the info, whitepapers and threads we can find. The most current recommendation seems to be to use isolated instances of SFS (as opposed to Terracotta). We could have a load balancer (or two) and find the best place to create a new Room or locate and join an existing one. When the player moves to a new area (changes Rooms), we would (potentially) have to move/reconnect the player from one instance to another (say to join their friend who happens to be in a Room on another server instance).

How should we go about transferring the connection? Would it be reasonable and feasible to have the client maintain the old instance connection, simultaneously connect to the new server+Room, then once the hand off is successful disconnect from the first server? It occurs to me that the 1X Unity client only supports a single connection (it is static). Has the 2X Unity client been modified to allow multiple simultaneous connections?

Or should we be considering something entirely different?

Re: transfer connection to different server

Posted: 10 Aug 2012, 07:56
by Lapo
Yes, you can run multiple connections with 2X's Unity API and the idea that you suggest is the correct approach.

Re: transfer connection to different server

Posted: 27 Aug 2012, 03:31
by grhwood
Can i do multiple connections with the Java client API ?

Re: transfer connection to different server

Posted: 27 Aug 2012, 08:31
by Bax
Yes. Simply create separate instances of the main API class.

Re: transfer connection to different server

Posted: 22 May 2013, 23:03
by petergpls
If we create a separate instance of the main API (server-side) class and each of these instances exist in a separate physical server running SFS2X then how do the clients know which physical server to connect to or does all of this get managed via the load balancer? Please provide a tutorial on this - thx.

Re: transfer connection to different server

Posted: 23 May 2013, 08:28
by Bax
You should read the SmartFoxServer 2X Server Architecture white paper available here: http://docs2x.smartfoxserver.com/Overview/white-papers