Sign in to follow this  
beebs1

Server Architecture

Recommended Posts

Hiya,

I'm building authentication for a 'massively' multiplayer game as part of my university dissertation, to demonstrate some technical security features. The system I've come up with seems fairly common - a small number of gateway processes to accept connections, authenticate players and then pass through traffic - probably checking for key messages such as changing zone, leaving the game, etc. In addition, there are a number of individual game worlds, split into several zones each. There is no inter-zone interaction beyond changing zones, and I'm not building any complex game mechanics into the system.

I've made a simple deployment diagram [url="http://www.jamesbb.co.uk/deployment.png"]here[/url] in case anyone would like to see.

I'm having difficulties with inter-process communication - the gateway processes will need to know which worlds/zones are available, and detect when these processes go down. ApochPiQ helpfully pointed me towards using a single central authority process, which maintains a connection with each other process. This seems like a good idea, and I had some questions I was wondering if anyone can help with.

[i]Where should the central authority process 'sit' in the diagram?

[/i]Most likely as its own process? Ideally I'd like the possibility of several gateways, so making it part of the gateway would mean multiply authorities and headaches.

[i]How should the central authority 'discover' the other processes when they start up, or vice-versa?[/i]

Maybe some kind of ping mechanism using a UDP broadcast, after which the TCP connection is made? Or the authority is hard-coded into a configuration file for each process?

[i]Should processes communicate between themselves directly, or through the central authority?[/i]

Going through the authority seems sensible in some cases. For example, if a gateway wants a list of characters a particular player has in a world it can ask the authority, which in turn queries that world database.

Changing zones is more complex - the player, gateway and the new zone need to be informed. Possibly the authority can inform the gateway and new zone, after which notification is sent to the player.

It might be simpler for each world to have its own gateway(s) - which are not shared.


Any suggestions are very much appreciated! :)

Share this post


Link to post
Share on other sites
[quote name='beebs1' timestamp='1318551920' post='4872371']
I'm having difficulties with inter-process communication - the gateway processes will need to know which worlds/zones are available, and detect when these processes go down. ApochPiQ helpfully pointed me towards using a single central authority process, which maintains a connection with each other process. This seems like a good idea, and I had some questions I was wondering if anyone can help with.
[/quote]

I recommend looking into Apache ZooKeeper. It solves this problem.

[quote]

Should processes communicate between themselves directly, or through the central authority?
[/quote]

If you centralize communication, it will become a bottleneck, and if it crashes, everything's down. The authority of "where things live" and "what's currently available" is not needed once a connection is established, so your system is more resilient if communication doesn't depend on that.


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this