• No se han encontrado resultados

Contenidos, criterios de evaluación y estándares de

4. CONTENIDOS

4.1. Contenidos, criterios de evaluación y estándares de

The dynamic load balancing algorithm is used to distribute the load of players over different regions in the game world in order to achieve the great performance and high level of scalability with low delay and traffic received as the game world environment is heterogeneous.

The load balancing system consists of the following elements periodically sent by each region’s super-peer.

 Game server: The game server is responsible for receiving several types of load information. This information will be sent to the load balancer assistant.

 Game Load Balancer: it is the main part of the load balancing algorithm. According to the load information for each region, the load balancer will send the login’s player to the suitable region in the game world space.

Input

N← Max number of nodes S ← Centralised game server R ← Number of regions

Output

Number of regions with light weight of load with suitable number of node in each regions and each region is controlled by using both super-peer and clone-super-peer.

1. Each region’s super-peers send the load information to the game server 2. Each node starts the game by registering in the game server.

3. All the node information is stored in the game server database in order to use this information when the player returns to play again.

4. Calculatethe load of each region according to these criteria: o Number of players available in the region. o High performance super-peer

 Super-peer disk capacity.  Super-peer memory  Super-peer CPU power  Super-peer bandwidth  Stability

 Availability

5. According to the load information for each region, the load balancer will decide to locate the node to the suitable region.

6. The game load balancer sends a message for both game server and region super-peer to inform them about this new node.

7. The game load balancer sends a message for both game server and region super-peer to inform them about this new node.

8. The super-peer and clone-super-peer of the region control and manage the movements of the player from one region to another.

9. When the node is leaving the game, it informs the region super-peer. 10. The region super-peer sends a message for the game server about this

leaving.

11. The game load balancer updates the load information for this region. 12. If the super-peer is leaving the game, it must inform both clone-super-peer

of region and the game server about that.

13. The clone-super-peer will be the super-peer of the region and choose the suitable node to be a clone-super-peer.

7.8.2 Explanation of Dynamic Load Balancing Algorithm

Each player must be registered in the game server at the beginning of the game. The first player will be assigned as the super-peer of the first region in the game world space.

However, the second player will be allocated as the clone-super-peer of that region. All the information of the super-peer and clone-super-peer will be sent to the load balancer in order to inform it. After that, each player will be assigned as a normal player in the region by sending all the players from the game server to the super-peer through the load balancer. When the first region is full, the load balancer is responsible for informing the game server about that in order to create a new region and assign both super-peer and clone super-peer for that region. If the normal player wants to leave the game, he/she will inform the super-peer of the region about that leaving. The super-peer turn to inform both load balancer and the game server to update the load of this region. However, if the player decides to migrate to another region, he/she will inform the clone-super-peer and send the region ID. The clone-super-peer will check the availability and the possibility of that region to join the player through the load balancer. If the new region is available and possible to accept the player, the load balancer is responsible for allocating the player to that region and update the load information for the two regions. All the updated information is sent to the game server and the super-peers of the regions concerned. As for the leaving or migration of the super-peer of the region, he/she will send a notification the game server, load balancer and clone-super-peer of the region. The clone-super-peer will be assigned as the super-peer of this region and he/she has the possibility to allocate a new clone-super-peer for the region. All the updated information is sent to the game server and the load balancer. However, if the clone-super-peer leaves or migrates the game, he/she will inform the super-peer of the region to assign new clone-super-peer of the region. All the updated information is sent to the load balancer and the game server.

Documento similar