A Hybrid Load Balancing Scheme for Games in Wireless Networks

A wireless network consists of a large number of nodes with limited resources. The large number of event data will be generated over a period of time in a wireless network. Also, faced with high resource demand variability and with misfit resource renting policies, the current practices is to overprovision for each game tens of owned data. In a wireless network, the agent node may become easily overloaded by the high demand from the players for updates. So, we propose a hybrid load balancing scheme for games in wireless networks which is based on allocating load on wireless mobile nodes proportionally to each of the agent's capacities. This proposed scheme is a combined dynamic provisioning algorithm based on greedy graph and user-oriented load balancing scheme for maintaining the performance and stability of distributed system in wireless networks. We address the key functions for our proposed scheme and simulate the efficiency of our proposed scheme using mathematical analyses. We then testify that the proposal has best performance compared with previous researches.


Introduction
A wireless network consists of a large number of tiny nodes with limited computation, memory storage, communication range, and battery power [1]. The wireless network is comprised of many low cost devices called nodes which monitor the status of the environment and send sensing data to the sink node. Without load balancing, a coordinator with excessive number of wireless mobile nodes may lead to more energy consumption and experience data reception delay as compared to the other coordinators. In a wireless network, frequent changes in large scale network topology lead to a challenge for delay sensitive data reception. When nodes that are associated with the same coordinator send data at the same time, there will be a delay or a failure of data received by the coordinator. Wireless mobile nodes have maximum utility when they can be used "anywhere at any time" [2]. Additionally, some of the ability is to provide a more abundant user experience by running heavy desktop based games. With the explosion of games and user demand, wireless networks are born to integrate cloud networks into the wireless networks. Also, wireless networks bring unprecedented opportunities and challenges associated with developing mobile user-oriented specific mobile games. To apply wireless networks to mobile environment, there are still many obstacles including service availability, mobility, security, privacy, and load balancing.
In the wireless networks, the mobile games in which a large number of players can interact with each other in the same world at the same time [3,4], so it is the large number of players interacting simultaneously, reaching the number of tens of thousands [5]. Each of the players remotely controls one or several in game characters called avatars. States of the avatars are simulated by the hosting agent, with updates of the avatars states broadcasted to other hosting agents and clients. In this way, all avatars can be properly rendered on their client side. For example, if the avatars of two players are too distant from each other, probably there will be no interaction 2 International Journal of Distributed Sensor Networks between them and therefore the agent needs only to update each one with the result of their own actions. However, if these avatars are close to each other, each player should be updated not only by his own actions, but also by the actions of the other player [6]. For this reason, it is not enough just to divide the players between agents, even if this division is proportional to the resources of each one of them. There are several limitations. In some instances, a large number of mobile nodes result in bandwidth demand that is a square function to the number of players. In other situations, there may be linear relationship to wireless networks. Another important consideration is the overhead of the distribution. As the agents need to communicate with one another, there must be a way to minimize this traffic. Reducing the waste of resources of the agent system for mobile games must prevent the presence of hotspots from degrading the quality of the game beyond a tolerable limit. There is an important issue when considering a load balancing scheme in wireless network. It must be established within a short time to adapt to the change in wireless nodes locations, and the parameter that triggers the action must relate to the changes in the topology.
Therefore, we propose a hybrid scheme that is combined dynamic provisioning algorithm based on greedy graph and user-oriented load balancing scheme for maintaining the performance and stability of distributed system in wireless networks.
The rest of the paper is structured as follows. Section 2 introduces related works on load balancing schemes on wireless networks. In Section 3, we describe our proposed architecture and provide the detailed load balancing scheme for mobile games in wireless networks. Also in Section 4, we address the efficiency of our proposed scheme using analytical models and compare the results with the previous researches. In the final section, we constitute a summary of our proposal and suggest further study directions.

Related Works
In wireless networks, communication efficiency and power consumption are usually the main obstacles to improving service availability and energy efficiency. The power consumption of node and link is highly related with the corresponding traffic volume. One method to solve the tradeoff between communication efficiency and power consumption is to distribute the traffic uniformly across the network. To deal with this issue, a number of load balancing approaches have been previously proposed.
A real-time communication protocol named SPEED is proposed in [7,8], in which a stateless nondeterministic geographic forwarding (SNGF) algorithm was employed. SPEED can support soft real-time communication based on feedback control and SNGF. The control overhead and the transient congestion are also well handled. However SNGF forwards each stream among random concurrent paths. Thus, if only a few paths with the same cost are available between each pair of nodes, there will be very few paths for SNGF to choose from. Two paths with the same cost rarely occur between two nodes.
Other approaches include a load balance solution derived by formulizing the network lifetime maximization problem into a nonlinear programming [9], a method to achieve load balance among all clusters, each of which is composed of several nodes in wireless networks [10,11]. This least energy constraint node in a cluster acts as the cluster head and performs as the gateway to forward data to the base station. However, this method achieves load balance in an offline way that is based on the static traffic demand knowledge and topology information.
It only balances the load among different clusters but not all nodes. A multipath protocol and an algorithm were also proposed to achieve load balance in wireless networks [12]. While the aim of this approach is to reduce the energy consumption for each node other than the link utilization of wireless link, there is a limitation. The load balance ratio has to be determined prior to performing the proposed protocol in the network using offline nonlinear programming.
The load distributing problem in conventional distributed systems has been studied for many years. It can be classified into static and adaptive algorithms, where adaptive algorithms can be regarded as special class of dynamic algorithm. Dynamic load distributing algorithms can be further classified into load sharing algorithms and load balancing algorithms [13][14][15][16].
A load shedding method is one in which an overloaded server attempts to shed its load to its neighbors [17]. After finding a lightly loaded neighbor server, it transfers some of its boundary microcells to that neighbor. To form the group of microcells to transfer, a microcell from the border is chosen and others are added in a breadth first search (BFS) order. A very similar work, which also uses BFS, is described in [18].
Zone sharing is a distributed scheme for the decomposition of storage hotspots [19]. It presents the solution in the context of the distributed index for multidimensional data scheme [20]. The benefit of this structure is that it stores data with similar attributes nearby and enables energy efficient query resolution [21]. When a hotspot arises in a set of mobile nodes, those nodes falling on the border of the hotspot will transfer some loads of their zones to some of their less-loaded neighbors. The information will be sent to notify its neighbors and to increase the cost of communication. Although zone sharing can distribute the heavy loads of a mobile node to other nodes, it will incur extra overhead and destroy the distributed multidimensional data scheme structure.
A dynamic geographic hash table for data centric storage is proposed in [22,23]. A temporal-based hashing function redefines the original basic operation of the geographic hash table and combines the timeslot. For each timeslot, each event is mapped into a grid cell. For the next timeslot, the next event will be mapped into another grid cell and thus achieve load balancing. The concept of node contribution potential is used to avoid situations where events are mapped into locations in which the surrounding nodes do not have enough resources to service the networks [24][25][26]. However, the contribution potential value and the coordinate of the node with the highest potential in a cell must relay back to the sink. The sink selects a set of cells with potentials above a certain threshold to be the location set. Hence, it may result  in a higher overhead. In addition, all nodes must be time synchronized and hence will need extra overhead.

Proposed Load Balancing Scheme
For the load balancing approach, we propose that the traffic generated by player is not simply linear but is the square for each cluster of game players in wireless networks. And another point is the overhead, which must be taken into account, no matter which load balancing algorithm is being used.
Our proposed scheme combines dynamic provisioning algorithm based on greedy growing algorithm and a useroriented load balancing scheme, which seeks to allocate the heaviest mobile node and nearest mobile nodes in communication with the regions managed by the most powerful agents. An initial division of the wireless networks is considered in Figure 1.
In Figure 1, the vertex indicates the wireless mobile node and the selection starts with the vertex of weight 6 and at each step the vertex is connected by the heaviest edge and nearest of mean of the region added to the partition. The selected edges and the vertices belonging to the new partition are highlighted. The proceeding and result of the first execution are shown in Tables 1 to 3. Also, the second proceed and result of our proposed scheme are addressed in Tables 4 and  5. Result of the first execution of proposed scheme is shown in Table 3. In Table 1, the means the number of wireless network group and means the fragment of the wireless networks. Table 2 shows the distance between vertices by coordinates.
When wireless mobile gaming users are within visual range of each other, it is best to locate them in one mobile    cell has a position coordinates( , ); weight to divide ← 0; free capacity ← 0; for each region in region list do weight to divide ← weight to divide + Wr( ) free capacity ← freee capacity + ( ( )) calulate distance between cells It is considered that an initial section of the virtual environment has already been made. Each mobile agent or agent should then check regularly if there is an imbalance and trigger the algorithm. Although the overhead resulting from the distribution of the virtual environment is part of the workload on mobile agent or agents, there is no way to know it beforehand without executing the repartitioning first.
For load-balancing, each of the centers of each gaming agent gets updated at the load-balancing agent and this point is equated by the average coordinates of the game users. Loadbalancing agents distribute gaming users to the agent which is closest to the center of the agent when new game users login and when all gaming users of the game agents are not included in the nearest section. Figure 2 shows the selection anchor node of the wireless gaming nodes.
The proposed scheme is as follows: (v) balance these regions, assigning to each one a weight which is proportional to the power of its agent, (vi) refine the partitioning, reducing the overhead.
Details of our proposed scheme are shown in Algorithm 1. Let us consider wireless mobile nodes connected to a distributed game session aggregating a total of regions. Here, we use the parameters listed in Table 6 for the simulation of the load balancing in the wireless networks.
International Journal of Distributed Sensor Networks 5 We propose an analytical model for the load of games in wireless networks. We consider two main types of resources used by games for load calculation. They are CPU and network. For modeling the load of one node in a wireless network, we consider three basic time activities with one game tick. is the computation of the interaction between pairs of entities. The is the reception of event messages from each mobile node. The is the update of entity states received from or sent to another mobile node. We model the time that the CPU time spends to send and receive messages from agent to each mobile node as Also, The interactions between entities are considered function ( 1 , 2 ) in our modeling. Therefore, we can define the CPU load of mobile node in wireless network as in [29].

Performance Analyses
For the proposed scheme described in Section 3, MATLAB10 was used in our simulation for performance analysis. Our scheme showed that even though the number of mobile nodes increased, the occurrence of reallocation for load-balancing did not increase as much. As shown in Figure 3, when the number of mobile nodes exceeds 700, our scheme is different from previous researches.
In addition, we triggered messages between mobile nodes in order to analyze the load balancing of the interaction between mobile nodes in wireless networks.  In Figure 4, we show that even when the number of interaction messages exceeds 1200, the number of reallocation for load balancing does not increase much in our scheme. Therefore, load balancing caused by many interactions between mobile nodes is much more efficient than those of previous researches.
In Figure 5, we illustrate the load of the wireless mobile nodes using our proposed scheme. We found that the load is kept constant in the wireless mobile nodes in our proposed scheme.

Conclusion and Future Works
We propose a scheme which combines a dynamic provisioning algorithm based on greedy graph and user-oriented load balancing scheme for maintaining the performance and stability of distributed system in wireless networks. We address the key functions for our proposed scheme and simulate the efficiency of our proposed scheme using mathematical analysis. When compared with previous researches, our proposed scheme in Section 4 was proven by simulations through mathematical modeling to be more efficient than previous research; even though the nodes increase, the probability of node replacement for load-balancing decreases compared to previous research as shown in Figure 3. Despite the fact that the interactions within the node along with the load increase, efficient load-balancing still occurs as seen in Figure 4. We found through Figure 5 that the load is kept constant in the wireless mobile nodes on our proposed scheme. We are going  to improve the scheme based on real data through tests that applied our scheme to the real-world.