An Improved DR Algorithm Based on Target Extrapolating in ROIA Cloud Platform

Real-time Online Interactive Application (ROIA) is an emerging distributed application recently. ROIA needs a highly robust and efficient architecture to cope with the huge concurrent users. Previous works are almost based on the C/S or P2P mode, and their scalability and resource utilization are relatively low. So we try to take advantage of the cloud computing technologies to achieve higher scalability and resource utilization. However, as ROIA servers focused on several data centers in cloud computing rather than being scattered in many areas, it will increase in part users' network delays and affect their user experiences in ROIA. To cope with this problem, we propose an improved Dead Reckoning (DR) algorithm. Traditional DR algorithm is mostly based on the classic formula of physics to predict, without taking the influence of the user's target under the different situations into account, so there are some limitations. This paper proposes an improved DR algorithm based on target-extrapolating in a cloud platform for ROIA, elaborates the basic idea of the improved algorithm and the computational model formula, and then carries out a simulation experiment. The analyses of the simulation results show that the improved algorithm is superior to traditional one.


Introduction
Cloud computing is surging in recent years and has attracted the attention of many researches. And in order to obtain better performance and lower costs, more and more traditional applications merge into cloud computing environment. Realtime online interactive application (ROIA), a new Internetbased distributed application model, is also emerging in recent years [1]. Popular and market-relevant representatives of ROIA are massively multiplayer online game (MMOG) and interactive E-Learning systems. The research on ROIA in cloud is just beginning.
ROIA has some challenging features such as: highly intensive user interaction, concurrency at a single application instance, and high demand for quality of service (QoS). These features of ROIA have decided that it needs to have enough network bandwidth and lower network latency to ensure the consistency of the real-time interactions between users. It is impossible in ROIA to maintain consistency by sending update information in a very high frequency, because limited network bandwidth would be exhausted by the huge update information. Usually update information will be sending in the lowest possible frequency in order to save network bandwidth, and in this way it requires some kind of technology to make up for the continuity of state information between the two updates, to ensure consistence and a good user experience. Therefore, how to ensure the consistency and promote the user experience under the conditions of the limited bandwidth and the larger delay has become the hotspot in ROIA research.
In this paper, we firstly review the related works about ROIA and DR algorithm. Secondly, we represent a ROIA cloud platform architecture, and then propose a new targetextrapolating DR algorithm which improve the accuracy of the prediction by taking the user's state and target into account. Finally, the simulation experiments validate the effectiveness of the new target-based DR algorithm, compared with the traditional DR algorithm.

Related Work
Since this work is mainly related to two aspects: the architecture of ROIA and DR algorithm, this section focuses on the related works of these two aspects.

2
International Journal of Distributed Sensor Networks 2.1. ROIA and Cloud Computing. Traditional ROIA mostly based on C/S mode architecture; in order to obtain higher scalability and resource utilization, many researchers put forward some new architectures. These new architectures can be classified into the following three aspects.
2.1.1. C/MS Approach. In this approach, the cluster technology has been taken in the ROIA server side. Multiple servers provide different functionalities to meet the performance requirement. And it can achieve better scalability and resource utilization through some techniques, such as zoning, replication, and instancing [2,3].
This approach has some merits, such as being easy to keep the authority and security [4][5][6], so it still is the mainstream deployment of ROIA. However, in fact, this approach ROIA also has some disadvantages, such as existing single point of failure and performance bottleneck and poor scalability.

P2P
Approach. P2P technologies have greatly changed the situation that the ROIA needs the ROIA providers to continue to invest huge hardware resources to meet the growing number of users. In P2P technology, with the joining of peers, the peer's part hardware resources are also increased, thus reducing the pressure of the ROIA providers and achieving the better scalability.
There are many researchers who have proposed a variety structures and mechanisms of P2P approach ROIA [7][8][9]. However, implementing the P2P model successfully still needs to address some challenges. For example, literature [10] runs simulations using traces from World of Warcraft and found that pure P2P solutions would result in average latency more than 10x greater than C/S solutions. In addition, the absence of authoritative centralized computing and storage makes the state consistency, security, and many other aspects more challenges. These areas still need much further research.

Cloud Approach.
In recent years, cloud computing has been successfully adopted in many applications. And some researchers have begun to adopt in ROIA to address scalability problem and other issues. Now the main cloud approach is a technology called cloud gaming. The typical representatives of cloud gaming are OnLive [11], Gaikai [12,13].
In this approach, all the game logics and graphics are rendered in the cloud rather than by the client. The cloud transfers the results by the way of video streaming. The user just needs the streaming like YouTube and need a very small thin client to send user's game command to the cloud.
A major attraction of this approach is that it frees players from the need to frequently upgrade their computers as they can now play games that host on remote servers. And the scalability and consistency is easy to achieve as all the game logics rendered in the cloud.
But because which is transferred to client is video streaming rather than update information in this approach, the network bandwidth becomes more important. When a player makes a move, he cannot see the results until the cloud receives the command, processes the move, renders a new screen, and delivers the screen to the client. Moreover, the traditional compensation techniques [14], such as dead reckoning [15], cannot be used in cloud gaming, because those techniques require game state information which is not available in cloud gaming clients.
Therefore, this approach is more susceptible to the response latency than other approach. Lee et al. [16] also obtained the conclusion that not all games are suitable for cloud gaming by electromyographic experiments. The same degree of latency may have very different impact on a game's QoE (quality of experience). [17,18] was originally used in distributed virtual simulation system to release the real-time issues and reduce network traffic and now is also widely used in various areas of transportation, games, and so on. Many scholars made a number of improvements on DR technology. Cai et al. [18] proposed a DR that adaptively adjusts the threshold value according to the relative position of avatars. Lian-Yue [19] proposed a multithreshold DR technology, in which the data are classified, different types of data corresponding to different distances from avatar.

DR Algorithm. DR algorithm
In update mechanism of DR algorithm, there are inconsistencies between actual position and extrapolated position. The most direct way to measure this inconsistency is to measure the distance between actual position and extrapolated position. But Zhou et al. [20] proved that the sustained time length of inconsistent state also makes greatly impact, so it proposed a named TSI (time-space inconsistency) metrics, considering both the special distance and time. In order to reduce the perceptible in consistency state, Roberts et al. [21] also took into account the impact of inconsistent sustained length of time. In addition, accumulated DR errors during update interval were used as a measure of the inconsistent degree in [22,23]. Li et al. [24] proposed a new DR update strategy to improve the degree of consistency in the case of message loss.
In the DR algorithm, improving predict accuracy will greatly enhance the overall performance of the DR algorithm. McCoy et al. [25] used neural network technology to predict the speed change of entity. Yahyavi et al. [26] draw on the idea of ant colony algorithm to improve the accuracy of prediction in DR algorithm.

ROIA Cloud Platform
Traditional ROIA usually adopts the classic client/server model and through servers cluster or other technologies to support large-scale concurrent users operating. Although this architecture is simple to implement and easy to ensure consistence and security, its scalability is poor.
So we propose a new approach to scalable ROIA in cloud, we call it MRCP (Multi-ROIA cloud platform).

Motivation of MRCP.
The MRCP is proposed mainly based on the following two points to consider.
(1) Fluctuations in the Number of Concurrent ROIA Users around the World at Different Times. The number of concurrent users is not fixed, and it will fluctuate with the time every day. We can use this point; an overload data center can migrate some load to the low-load data center located in other time zone. Thereby this approach can obtain well scalability and high resource utilization.
(2) Differences in Requirements for Network Latency in Different Types ROIA. ROIA can be divided into different types of ROIA. And the different type ROIA has different requirement for network latency in actual operation. For example, MMOG can be divided into different types, such as first person shooting (FPS), role playing game (RPG) and real-time strategy game (RTS). These different MMOG have different requirements for network latency in order to ensure good user experience. According to the results of literature [27], the latency tolerance threshold is about 100 ms in FPS, the threshold is about 500 ms in RPG, and the threshold for RTS is about 1000 ms.
So based on these characters, we can deploy a various types of ROIA on one data center, so that the load balancing has more reasonable choice. Because if only one type of ROIA, the following situation may is happen. The data center A is overloading, and the data center B located in other place (maybe on the other side of the earth) has very low load. However, B is so far from A that the latency is hard to meet the requirements of users on A. So it cannot migrate some load of A to B. In this case, if there are various types of ROIA on A, we can migrate the low latency requirement ROIA to B. This not only reduces the load of A but also does not affect the good user experience.

Architecture of MRCP.
Based on the above two considerations, we propose a multi-ROIA cloud platform (MRCP). MRCP will have several data centers around the world, and various types of ROIA will be deployed on these data centers. According to the load of data centers, we can make load balancing between the various data centers, so as to achieve high scalability and high resource utilization. Figure 1 depicts the architecture of MRCP. MRCP consists of multiple data centers distributed around the world. Each data center has many ROIA servers (RS) and one MRCP local controller (MLC).
MLC is responsible for user's login, storing user information, and the internal load balancing of data center. Moreover, MLC communicates with other MLCs periodically in order to get the load information of other data centers. If necessary, MLC will execute load balancing between data centers.
RS is responsible for the functions of ROIA. Various types of ROIA are deployed on different RS in one data center.

The Target-Extrapolating DR Algorithm
4.1. Background. We will discuss the load forecast and balance problem on the ROIA cloud platform; here we focus on maintaining consistency and enhancing user experience. For example, in an MMOG, users through client software manipulate their own avatar to producing, competing and fighting in one virtual game world. Client periodically sends the state and location information of its own avatar to the server. After receiving the information, the server will compute and update the global game world by using the information. And then server will send update information to clients. Clients use the information to update their local game world, for maintaining consistency with the global game world.
Before these updates have not yet reached, if the activities of the local game world remain static until client receives the updates to continue its activities, it will greatly reduce the user experience. Using forecast techniques will alleviate this problem. The various avatars in local game world may move on follow by the prediction before the updates are received. And it needs using smooth processing technology to smoothly pull the avatar back to correct position when receiving updates to find deviation of the actual position and the predicted position. It does not allow the user to feel noticeable pauses and jumping.
Most ROIA use the DR algorithm to predict the movement. The traditional DR algorithm used the three classical physics formula, as follows: Formula (1) describes the situation that the position of avatar remains static from moment to +Δ . Formula (2) describes the position after the avatar moves by uniform speed V during Δ . Formula (3) describes the position after the avatar moves by the initial velocity V and the acceleration during Δ . We can see from the above formula that the traditional DR algorithm predict the avatar's trajectories only associated with the information of location and move statement, but it does not consider other factors, such as the target of interest, the avatar's own state (healthy or wounded). However, in many cases, users change their direction of moving because of the influence of other factors. For example, the treasures, equipment, and other avatars appeared in the user domain of interest (DOI) may affect the movement of avatar. So it is not in strict accordance with the inertia movement just the traditional DR algorithm predicted. Moreover, avatar's own state will have a significant impact on the direction of its movement. For example, in the same scene, a healthy avatar is likely to move for treasures and equipment; however, a severely wounded avatar may desperate toward medical supplies instead of treasures or equipment. Therefore, we propose a new target-extrapolating DR algorithm which takes into account other factors to improve the precision of the prediction.

Basic Idea of Target-Extrapolating DR Algorithm.
The basic idea of the target-extrapolating DR Algorithm is as follows. Firstly, algorithm calculates the attractiveness of other avatar and entities (treasures, equipment, or medical supplies) on avatar 1 in 1 's DOI. Then algorithm selects the max attractiveness as the target of 1 and adds the attractiveness to predictive math model as an external force. Finally, algorithm calculates the predicted path through math model.
As shown in Figure 2, there are some avatars ( 1 , 2 and 5 ) and some entities ( 3 , 4 , 6 and 7 ). At time , for only 2 , 3 , and 7 in the DOI of 1 , it just needs to calculate the attractiveness of 2 , 3 , and 7 . Moreover, due to the angle between 7 's attractive direction and 1 's current move direction greater than 90 degrees, it shows that 7 is not in forward direction and 7 does not first appear in DOI of 1 . In other words, it indicates that user very likely does not have interest in 7 . Therefore, our algorithm is no longer considering the attractiveness of 7 . In Figure 2, the attractiveness of 2 is greater than the attractiveness of 3 , so 2 is forecasted to be the target. The solid line arrow indicates the moving direction which traditional DR algorithm predicted; the long dashed line arrow indicates the moving direction which our algorithm predicted.

The Quantitative Calculation of Attractiveness.
To compare the attractiveness of avatars and entities, it needs to quantitatively calculate the attractiveness. Let ( 2 , 1 ) denote the attractiveness of 2 to 1 at time . It is calculated by the following formula: where is a parameter to adjust the influence of CAttr( 2 , 1 ) and AAttr ( 2 ) on ( 2 , 1 ). is a parameter to adjust the influence of Dis( 2 , 1 ) on ( 2 , 1 ). CAttr( 2 , 1 ) represents the current attractiveness of 2 to 1 at time . According to the comparison result between life value of 1 and threshold (signed as LifeThreshold), there are two types of processing of quantitative calculation: (1) the life value of 1 is greater than LifeThreshold. It means that the avatar 1 is healthy. In this case, if 2 is an avatar, the lower the level of 2 the greater CAttr( 2 , 1 ); if 2 is a entity, the greater the level of 2 the greater CAttr( 2 , 1 ), (2) the life value of 1 is lower than LifeThreshold. It means that the avatar 1 is seriously wounded. In this case, if 2 is a medical supply, CAttr( 2 , 1 ) is given a big fixed value which is much bigger than the value produced in processing (1); if 2 is not a medical supply, the processing is the same as processing (1).
AAttr ( 2 ) denotes the accumulated attractiveness of 2 at time . It accumulates in a recent period of time when other avatars choose 2 as a target. It reflects the popularity of 2 and use it to influence the value of ( 2 , 1 ). We can learn from the pheromone increasing and decreasing in the ant colony algorithm to regulate the increasing and decreasing of AAttr ( 2 ). As an attribute value of entity, AAttr ( 2 ) is set between 0 and 100. The initial value of AAttr ( 2 ) is 0; AAttr ( 2 ) will add units after 2 is selected as target. The increase of accumulated attractiveness after the entity being selected as a target 0 ≤ ≤ 100 5 Adjust the decay speed of the accumulated attractiveness Meanwhile, AAttr ( 2 ) decays by time as shown in formula (5). is a parameter to adjust the speed of the decay. Consider Dis( 2 , 1 ) represents the distance between 2 and 1 . Attractiveness is decreasing with the increasing Dis( 2 , 1 ).
It should be noted that Dis( 2 , 1 ) is the length of the shortest accessible path between 2 and 1 but not a straight line distance, because there may be some obstacles between 2 and 1 in the practical application.

Math Model of Extrapolating.
After calculating the attractiveness, we can select the greatest one as target. We assume that ( 2 , 1 ) is the greatest one. Then ( 2 , 1 ) is substituted in formula (3), and, after appropriate optimization, a prediction formula is determined as follow: where is the parameter to adjust the influence of attractiveness. V and also can be optimized as follows: Previous researchers [13] had proven the optimization can effectively improve the overall smoothness, because it considers the historical information. Table 1 summarizes the important parameters in the new target-extrapolating DR algorithm.

Simulation and Results Analysis
We implemented the traditional DR algorithm and the targetextrapolating DR algorithm by Python 2.5 and designed International Journal of Distributed Sensor Networks     The point in the central of figure represents the avatar which carries out DR algorithm, and the square box is its domain of interest (DOI). Only the points in DOI will be calculated. Furthermore, in order to reduce the difficulty of implementation, we have not introduced obstacles in the figure. But because Dis( 2 , 1 ) is the length of the shortest accessible path between 2 and 1 , the obstacles have been taken into account. Therefore, the result of the simulation is still not losing its universality. Through repeated experiments, we found that targetextrapolating DR algorithm has higher accuracy than the traditional DR algorithm. Figure 4 represents the deviations of traditional DR algorithm and the target-extrapolating DR algorithm. From Figure 4, we can see that the deviation of the targetextrapolating DR algorithm is less than the traditional DR algorithm's in most of the time (about 70% experimental time).
In Figure 5, the curve represents the differences between the deviating values extrapolated by traditional DR algorithm and the values extrapolated by the target-extrapolating DR algorithm. The curve is greater than zero in most of experimental time, so it means that the deviation of the improved DR algorithm is smaller and the improved DR algorithm makes more accurate extrapolations. Figure 6 represents the time comparison between the target-extrapolating DR algorithm and the traditional DR algorithm. From Figure 6, we can see that the target-extrapolating DR algorithm is more accurate than the traditional DR algorithm in the 71% of the total experimental time. And, only in 29% of the total experimental time, the traditional DR algorithm performs better than the target-extrapolating DR algorithm. Figure 6 shows that the performance of the targetextrapolating DR algorithm is superior to the old one from the aspect of time. Meanwhile, Figure 7 shows that the targetextrapolating algorithm is superior to the old one from the aspect of deviation values. From Figure 7, we can see that the average deviation value of the target-extrapolating DR algorithm is 11.58 pixels. However, the average deviation value of the traditional algorithm is 16.46 pixels.  Figure 5: Differences between deviations extrapolated by two algorithms, respectively.

71% 29%
Experimental time in which target-extrapolating DR algorithm is more accurate than traditional DR Experimental time in which traditional DR algorithm is more accurate than target-extrapolating DR

Conclusions
More and more traditional applications merge into cloud computing environment, in order to obtain better performance and lower costs. The research on ROIA in cloud environment is also just beginning. Previous works are almost based on the C/S or P2P architectures. We propose International Journal of Distributed Sensor Networks a new approach to ROIA by taking advantage of the cloud computing. However, the requirement for network latency in the new ROIA under cloud platform is different as the requirement of the traditional ones. Because ROIA servers focused on several data centers in cloud computing rather than scattered in many areas, it will increase part users' network delays and affect their user experiences in ROIA. So, we propose an improved DR algorithm to cope with this problem. DR algorithm is a widely used algorithm in ROIA. Usually ROIA uses DR algorithm to reduce network traffic and relieve the consistency problem caused by network delay. However, traditional DR algorithms are mostly based on the physics formula to predict. In fact, the state and target of avatar may have great impact on the trajectory of avatar. The traditional DR algorithms have not taken these impacts into account, so that the algorithm predicted accuracy decreases. This paper proposes an improved DR algorithm based on target-extrapolating. The results of simulation experiment show that the new target-extrapolating DR algorithm is superior to traditional DR algorithm. This work will be helpful for further research on ROIA in cloud environment.