P {margin-bottom: 0.08in ;}
A brief summary of common
Server architecture of MMORPG games
.
In the big aspect
, Mainly including
Main Components of lanucherserver, gateserver/proxyserver, gameserver, and dbserver
.
Launcherserver is the only game Operating Process
It is responsible for providing the list of available server groups and server-related information, such as the number of online users and the degree of busyness.
Launcherserver is generally not responsible for any game-related logic.
Generally, the check for game updates is placed in
Launcherserver or
Gate/Proxy
Server. Or an independent server can download game updates.
Gateserver is a server group used to coordinate the interaction between the client and the server, and to coordinate
Load Balancing between gameservers. (For some games
Masterserver for coordination between similar servers ).
Specifically,
Gateserver is mainly used for these purposes.
Player login verification, security protection,
Server Load balancer between gameservers, which is
Launcherserver provides information.
The gamer login authentication information is stored in
Gateserver.
Gateserver for verification,
After successful verification, gateserver will give the client an authenticated
Based on the rules of the Server Load balancer, you can determine which players are allocated.
Gameserver. For example, the server simply performs Load Balancing Based on the scenario, such
1-scenarios in
On gameserver1
-Scenarios in
On gameserver2
102 scenario, it will be allocated
Gameserver2.
In this way, when
Based on the scheduling results, the gateserver notifies the client (
Addresses of gameserver2) and
Gameserver2 (with users)
XX ). This way
The client is connected
Gameserver2 interacts with each other. Until the player switches
For 1-scenarios
Gameserver2 will be notified
Gateserver tells it
Client to exit
Gameserver2: switch to a scenario such
99. Then
After receiving the message, the gateserver reschedule the server and repeat the previous operation to switch the player
Gameserver1.
This process is applicable to player switching.
The loading process is complete and transparent to users.
Gameserver is the core of servers. It processes all game logic, server-side computing of game scenarios, and client-side logic verification. In general, most of the current end-to-end
MMORPG games process part of the game logic at the same time on the client side. Therefore, the server side and the client side are relatively divided into the entire function of the game. Generally, most of the processing operations related to graphic display are performed on the client, and graphics-related resources are mostly stored on the client. Some of them aim to improve game operation efficiency and reduce operation latency, also, some logic is placed on the client. The server is generally used for logic processing, data processing, and storage.
The
Gameserver is in a whole, but in actual design, some functions are divided separately. For example, some servers divide the graphic scenario services separately as separate servers.
It generally includes network communication, concurrent processing, memory management, game data management, game logic, scripts, and graphic scenario services.
The following threads are generally enabled on the server:
Network processing thread (
N, including asynchronous message sending and receiving), message processing thread, server refresh thread, database thread, game main thread, scenario service thread, and so on.
When gameserver is running, it first reads server configuration information and game data
The gateserver communicates to obtain the scheduling configuration information of the server, and then starts various services, such as message processing services and network services. After the server is started, it registers
Gate to start providing services.
During the specific game design process, most of the server work in
Gameserver. The most content is provided here. I will not describe it in detail, but I will summarize it later.
In the database design, user login data is usually taken out separately as an independent database, and game-related data is stored in another database.
Compared with other applications, there are not too many game database operations. Generally, users archive related information and global data in the database, and temporary data is generally stored in the memory, static data is generally stored in data files for direct reading.
During Game deployment
N server groups, each of which is a complete game world. Deploy server groups in different data centers according to network conditions, such as Telecom server north
1. China Unicom server south
2. Deployment in each server group
1 unit
Gameserver, deployed based on the Load
N
Gameserver. Generally, one database server is deployed in each server group.
By lixinso 2011-02-26
Http://blog.csdn.net/lixinso
Email: lixinso [at] Gmail [Dot] com