Advertisement

Game server framework problem.

Started by June 01, 2005 05:27 AM
1 comment, last by sodme 19 years, 8 months ago
To enhance concurrent process ability of game server, which route should I choose? A) Using GameGate & GameServer: 1. GameGate accepts new connections from clients and maintains message queues, just acts like a gateway; 2. GameGate connects to GameServer and sends players' message queues to GameServer; 3. GameServer accepts new connections from GameGates, manipulates each player's game messages from GameGate's message queues and sends them back to GameGates; 4. GameGate receive data from GameServer and sends them back to Players. B) Using GameServer solely: GameServer accepts new connections from clients and sends back game data after manipulating logical and ohter computings. On the subject of efficiency, whcih one is better from the viewpoint of GameServer? "Each socket corresponds to one player" or "Each socket corresponds to one GameGate with many players". Thanks in advance =)
Are you using TCP? Reducing the number of connections to a single server is likely to make the game server more efficient.

If you're using UDP, then there's a single socket to worry about, no matter how many players.

From the players' point of view, there may be more latency if data has to be received by a GameGate (in effect, a custom layer-4 router) and then passed on to the servers, and the same for returning data.
enum Bool { True, False, FileNotFound };
Advertisement
I used A in my MMORPG. Because, in this case, to the clients Game Server is whole and safety, and with No-range map. If you use B, when map changes the clients should wait and show loading.
no pains, no gains

This topic is closed to new replies.

Advertisement