I have a system set up where multiple games run simultaneously, and each game has its own SmartFox server instance in Amazon EC2. What I'd like to do is have a single "Account" database that's shared between these multiple server instances. The basic flow would be something like this:

1) User launches client and enters Username/Password2) This info is checked against a single Account database for authenication3) The user then selects a game and is sent to the appropriate SmartFox server instance

I'm not sure quite how to go about this. Should each game server have a separate "login" Zone where the Database Manager points to the central account database? That would require the user selecting a game (server) before authenticating, though.

If anyone knows of some examples or existing documentation about sharing data and coordinating between multiple SmartFox servers, that'd definitely help. Thanks!

Yes the idea is correct, you can use a central DB where multiple SFS instances will connect to.It seems to me your main problem is one of "load balancing" or "redirection" based on the type of game a User selects.

Couple ideas to tackle this problem:

1) Let the user choose the game type before login time, so they can be sent directly to the right server instance.2) Use a separate Login Server that just works as a Lobby and redirection system.With this second option you could literally use two separate connections, one for the Lobby server and one for the Game server. It requires a bit more extra coding and coordination but it can be pretty efficient, especially if you need users to remain in the Lobby (for notifications and buddy list interaction) while playing.

Lapo wrote:2) Use a separate Login Server that just works as a Lobby and redirection system.With this second option you could literally use two separate connections, one for the Lobby server and one for the Game server.

For this option, how does authentication work for the Game server? Does the Lobby server tell the Game server that the user is already logged in, or does the player have to reauthenticate, or something else?

It can be done in several ways.Since you have a centralized DB you could flag the User as "Logged In" when it initially logs into the main Lobby server.When the client logs into the GameServer you can just send the username without any password and the system will allow the client in (or not) based on the "Logged in" flag. This way only people successfully logged in from the Lobby will be allowed inside a game.