transfer connection to different server

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Molix
Posts: 40
Joined: 01 Apr 2009, 19:34
Location: Toronto, ON, Canada

transfer connection to different server

Postby Molix » 09 Aug 2012, 17:26

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?
User avatar
Lapo
Site Admin
Posts: 21726
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: transfer connection to different server

Postby Lapo » 10 Aug 2012, 07:56

Yes, you can run multiple connections with 2X's Unity API and the idea that you suggest is the correct approach.
Lapo
--
gotoAndPlay()
...addicted to flash games
grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

Re: transfer connection to different server

Postby grhwood » 27 Aug 2012, 03:31

Can i do multiple connections with the Java client API ?
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: transfer connection to different server

Postby Bax » 27 Aug 2012, 08:31

Yes. Simply create separate instances of the main API class.
Paolo Bax
The SmartFoxServer Team
petergpls
Posts: 16
Joined: 14 Apr 2013, 14:15

Re: transfer connection to different server

Postby petergpls » 22 May 2013, 23:03

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.
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: transfer connection to different server

Postby Bax » 23 May 2013, 08:28

You should read the SmartFoxServer 2X Server Architecture white paper available here: http://docs2x.smartfoxserver.com/Overview/white-papers
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Aldenea, DavinVicy, DerikFent, JerodSa, Kevengar and 29 guests