Data Allocation Strategy Based on Users Moving in a Mobile Computing Environment

Mobile users tend to submit transactions to servers nearby for execution so as to minimize the communication overhead incurred. Data replication is helpful because it can improve execution performance of servers and reduce network traffic. In this paper, a new algorithm named SDMP (shared data allocation algorithm based on moving pattern) is proposed, which takes not only the user’s pattern but also the frequency of user’s appearance according to the user’s path log into account. Experimental results show the SDMP algorithm is better than other algorithms used for data allocation for servers.


Introduction
Current data allocation schemes in a mobile environment could be classified in two types.One is designed in static manners and another includes the users moving patterns [1,3,4,5,6].Static allocation schemes may suffer severe performance problems in a mobile computing system.It could not use the resources more effectively or support dynamic data accessing for mobile users.As shown in Fig. 1, there are 16 servers and the number of replicated server is 4. Data is allocated statically in sites A, F, K and P under the data allocation schemes for the traditional distributed databases.Assume that the mobile user U1 is found to travel frequently in service areas of A, B and E. The mobile user U2 is found to travel in service areas of A, B, C and D. It can be seen that the advantage of having replicas on F, K, and P cannot be fully taken by mobile users U1 and U2, and the extra cost of maintaining those replicas is not justified by the moving patterns of users U1 and U2.
The others are based on the users moving patterns, the paper of [7] dug user path through the mobile user algorithm [8] from a mobile user log.A network topology is a four-by-four mesh networks whose points denote the all servers' station.The number next to each edge represents the user occurrence count of the corresponding L2.L2 denotes the path sequence of step 2. It includes the L2 which has maximal user occurrence counted into the set of replicated servers.

Problem Formulations
In this paper, the SDMP algorithm is based on the SD-local algorithm [7] .Given the number of mobile users with their moving patterns, the number of servers, and replicated servers, we shall determine the proper set of sites to which shared data are allocated with the purpose of maximizing the number of local access of shared data.In this paper, the properties of data objects are read-only in order to focus our problem on designing the shared data allocation based on user moving patterns.Table 1 shows the description of symbols used in modelling the problem.The probability of local access of mobile user Ui, denoted by L(Ui), is formulated as (1).
where f is a hit coefficient and 0<f<1.The hit ratio of the system should be the average one of all users.The objective function of this model is formulated as (2).
where f is a hit coefficient and 0<f<1.

Table 1 Description of symbols
where M is the total number when q i (p) =1.
From the analysis of the objective function, if the | FSi | is relatively small, the values of OPT(N) will increase accordingly.So we can improve the hit ratio if selecting the sites which are in the short path sequence.The value of the Q(p) is more, the objective function is bigger [8].That's to say, system's hit ratio is higher based on the definition of the Q(p).In this paper, we select the proper sites for data allocation based on the maximal number which is in the path sequence, and then choose the sites which are in a small range of user's moving patterns.

Shared Data Allocation Based on Moving Patterns
Data allocation for shared data.In the scheme which allocates data in a fixed pattern, the replication sites are determined when the database is created.Explicitly, the number of replicated sites and the sites at which the shared data can be replicated are predetermined.Though being adopted in some traditional distributed database systems due to its ease of implementation, Advanced Engineering Forum Vols.6-7 DF(allocates Data in a Fixed pattern) is not suitable for mobile computing environments where mobile users move frequently.DF suffers from poor performance since it does not take user moving patterns into consideration.SD-local(Shared Data Allocation) algorithm selects the replicated sites based on the user's moving patterns, However, many factors still remain to be improved, i.e, the range of user's movement and the frequency of each sites during the moving patterns.So the hit ratio of the system is still not the perfect under this case.Shared data allocation based on moving patterns (SDMP algorithm).As is described above, there are many sites having the data replication which can respond to the request.How to select proper sites for shared data allocation is a very important issue to be studied in this paper.The mathematical model is formulated as follows: It should select the proper sites R from the all servers set S based on the users moving sequence FSi, for the higher of the objective function.In algorithm SDMP, we use the user occurrence count of L2 [9], where the user occurrence count of L2 is the number of mobile users whose moving patterns contain L2.An example profile for the counting in algorithm SDMP is given in Table 3. U1 and U2 contain {AB} in their moving patterns.The user occurrences count of {AB} is 2 and {CD} can only be found in the moving patterns of U3 the user occurrence count of {CD} is 1.We can get the user occurrence count of BC, AE,CG,GK and EI in the same way.Algorithm SDMP: Input: all user occurrence count of L2, Q (p) Output: The set of replicated servers R while  .Once the user occurrence counts of all L2 pairs are obtained, we have the configuration shown in Fig 2a, where the number next to each edge represents the user occurrence count of the corresponding L2.
Step one, we include the L2 (i.e.{BC}) which has maximal user occurrence count into the set R according to the profile in Table 3, resulting in the configuration shown in Fig 2b .Second, if the number of replicated server, |R|, is not equal to the number of replicated servers required, we select from existing L2 pairs that have maximal user occurrence count (i.e.c_max), the one (i.e.A)that have the higher value of Q(p), since the user occurrence counts of AE, AB and GK are equal.The third, because the value of Q(G) and Q(K) are the same, we choose the one (i.e.G) whose neighbor have an intersection with R.

Performance evaluations
In this section, we conduct an experiment to evaluate the algorithms and compare their hit ratio.Table 5 summarizes the definitions of primary simulation parameters.The length of each moving path is modelled as a uniform distribution between Lave-4 and Lave+4.The probability that a mobile user moves to the server where this user came is modelled by Pback and the probability that the mobile user moves to the other servers is determined by (1-Pback)/(n-1), where n is the number of possible servers this mobile user can move to.We set the value of |R| to 4, the value of |S| to 16,the value of f to 0.8 and the value of Lave to 6.The local hit ratios of DF, SD-local and SDMP with the number of mobile users varied is shown in fig 3 .As can be seen, SD-local and SDMP exceed DF, showing the advantage of utilizing moving patterns for data allocation.Also the local hit ratio of SDMP is higher than former.

Conclusions
This paper devises a data allocation scheme based on the SD-local algorithm.The SD-local algorithm, among all data access, makes the percentage that data is obtained from the local servers of mobile users greatly improved, but the data replication, which is the whole data in the mobile system, requires more storage.We only considered the users moving patterns, paying less attention to what data users really want.Therefore, if we take both user moving patterns and user request pattern into consideration to develop the data allocation scheme [2], the local hit ratio and storage will be improved too, which is the direction in the future.

Fig. 1 A
Fig. 1 A scenario of user moving pattern and data allocation Description Symbol frequent set of mobile user Ui FSi hit rate of access for mobile user Ui L(Ui) all servers in a mobile computing system S set of replicated servers R Number of mobile users N Consider the mobile user U1, where the network topology is shown in Fig. 1.Assume that without exploring user moving patterns, the set of replicated sites R={A, F, K, P}and the value of f is 0.5.The set of FS1 can be obtained by unifying two moving patterns of mobile user U1 into one set, i.e, FSi = {AE}∪{ABC}={ABCE}.It can be verified that the set of R∩FSi is A. Then, we have the estimated probability of local access of the mobile user U1: 0.5*1/4=0.125.The user's moving patterns are made up of sites.The proportion of each site in the path sequence can reflect the path length correctly, which is expressed by Q(p) and formulated as (3):

Fig. 2 A
Fig. 2 A scenario of algorithm SDMP.

Fig. 3
Fig. 3 Comparative diagram of hitting ratio

Table 2
An example profile for user moving pattern

Table 3
An example profile for the occurrence count of users

Table 4
The scenarios under different data allocation algorithms

Table 4
shows the example execution of algorithm DF, algorithm SD-local and algorithm SDMP.ratios of mobile users of SDMP is better than SD-local and DF.