Research on Migration Strategy of Mobile Agent in Wireless Sensor Networks

Big data and distributed computing are of great importance in wireless sensor networks (WSNs). They are always bonded together, and the latter one upholds the former one. In distributed computing, mobile agent model is the mainstream technology. With autonomy, communicativeness, mobility, and role, mobile agent model is more suitable for large-scale, resources-restrained WSN to deal with big data. This paper mainly studies migration schemes for mobile agents, determines core factors of migration strategy, and proposes SMLA and DMLA algorithms. And aiming at revealing the characteristics of target tracking, this paper puts forward pid-DMLA algorithm; and considering multiple agents' cooperation, it presents Mpid-DMLA algorithm. Moreover, this paper evaluates and analyzes the advantages and disadvantages of the above-mentioned four algorithms by simulations.


Introduction
In wireless sensor networks (WSNs), big data is the intensification of information architecture, while distributed computing is the intensification of infrastructure and resource [1].Distributed computing models can bring benefits to big data.And there are two categories of distributed computing: client/server model and mobile code model.Mobile agent model consists of remote computation, code on demand, and mobile agent model [2].
In client/server model, client asks for services, while server provides resources, services, and methods for executing services.There are many distributed systems adopting this model [3,4].Mainwaring proposed a habitat monitoring system, which is accomplished by transmitting data to gateway [3].Ivy is the distributing system in WSN studied by the University of California, Berkeley, CA, USA [4].Although the client/server model has been widely used, its drawbacks are very obvious, especially in WSN [5].Firstly, it needs a series of supernodes as a processing center.Secondly, in multiclient systems, overdependence on bandwidth reduces the transmitting performance.Thirdly, the nodes which are closer to the server need to transmit more data; thus, they consume more energy.
Mobile agent model supports distributed computing, too.The processing center/centralized information system (CIS) is in charge of sending and recovering mobile agents, while agents migrate between sensor nodes and are responsible for data exchange.A typical exemplar is the data fusion algorithm based on mobile agent to track objects in WSN [6].In general, mobile agent is a special program which can be executed autonomously.And it is also defined as an entity with the following four attributes: agent identifier, data space, method, and migration table.Agent identifier describes the uniqueness of each agent; data space carries part of the integrated results; method is used to deal with missions or execute codes; and migration table stores the routing information of an agent and it can be preset or modified dynamically.
Compared with traditional computing models which need amount of data interaction between nodes and CIS (or base station), mobile agent model has many merits.As

Related Work
Although mobile-agent-based distributed model has exceptional advantages in WSN [8], dynamic migration is necessary in practical deployment.Dynamic migration, presented by migration table, has two behaviors: nodes selection and migration sequences.Therefore, migration table's efficiency, in some sense, decides accuracy of data integrations, time of migrations, energy consumption, and performance of the whole network.
In response to the challenges embodied in the specialty of WSN, the design of mobile agent's migration table needs to adequately consider the following three aspects.Firstly, agent entity must be as small as possible to reduce migrating energy consumption.Secondly, migration table has to guarantee rational precision of data integrations to obtain sufficient sensor nodes.Thirdly, in the precondition of the second aspect, migration table needs to be short enough.In conclusion, a suitable migration table should balance the cost and precision.
Thus, in this paper, we mainly concentrate on the design of the migration table which can reduce agent's migration energy consumption while guaranteeing reliable migration methods.
Briefly, mobile agent migration has two categories: static migration list algorithm (SMLA) and dynamic migration list algorithm (DMLA).In SMLA, CIS analyzes the whole network's resources and designs migration paths that are inserted in agent entities initially.However, static SMLA cannot respond to the changes of the network timely; the changes happen when one or more links between nodes break, while, in DMLA, migration table is updated at each migration interval according to the sensibility of the network.
Without loss of generality, mobile agent migration algorithms can be illustrated by target tracking.Considering movements of the target entity, Zhao et al. proposed the information-driven-based tracking method [9].Liu et al. proposed the collaborative in-network method to track target [10], which effectively reduced overheads and energy consumption.Kim et al. transferred the distributed tracking issue to the continuous Bayesian estimation problem and adopted the information-driven-based sensor querying scheme to select the next hop [11].Wang et al. proposed a heuristic target localization method based on entropy [12], which is more efficient than the information-based computing method.In this paper, we will propose the dynamic migration list algorithm based on the predicting information drive (pid-DMLA) to solve the motion problems of migrations of the target entity.
Considering the condition of using multiple agents to track an application in practice, we will also propose the dynamic migration list algorithm based on the predicting information drive of multiple agents (Mpid-DMLA).
In this paper, we would propose the migration algorithms in different scenarios: single mobile agent and multiple mobile agents, which is valuable and applicable in WSNs.The rest of this paper is organized as follows.Section 3 describes the preliminary of migration.Section 4 presents single-agent-based migration algorithms, including SMLA, DMLA, and pid-DMLA.Section 5 illustrates Mpid-DMLA.Simulation results and analyses are presented in Section 6, and conclusions are drawn in Section 7.
(1) The location of each sensor node is known.
(2) Each node has at least two neighbor nodes.
(3) The valid perception radius of sensor node is more than half the distance between two neighboring nodes.
(5) All sensors are deployed in a two-dimensional region.
(6) There is only one target entity in the region, and it moves uniformly and linearly.

Evaluation Indicators of the Agent Migration Algorithm.
In order to evaluate the existing agent migration algorithms, we adopt the three indicators proposed by Xu et al. [7] energy consumption, network lifetime, and migration hops.Each migration step of mobile agent is called a hop.And the energy consumption of each hop consists of three aspects: transmission consumption   (  represents the energy consumption of an agent migrating from node  to node ), initialization consumption   (  is constant), and data processing consumption.The network energy consumption is primarily concentrated in transmissions.
A migration is primarily composed of four parts: sending an agent, receiving an agent, data processing, and deciding the next hop.And each consumption time of the four processes is fixed.Thus, evaluating the migration time of an agent is equivalent to calculating the migration hops.

Node's Sensor
Model.We adopt the following wireless transmission model [13] proposed by Rappaport: where   () is a measure value of sensor  related to the location and time,  is the signal power of the target entity, () represents the location of the target entity in time International Journal of Distributed Sensor Networks where  is the standard deviation of the amount of information, which indicates the decrease of speed of   () when the distance between sensor node and target entity increases, and X() represents the location of the target entity, which is calculated by the target localization algorithm in Section 3.6.

Beacon
Apparently, the distance of  and  is less than or equal to  1 +  2 .So (3) has two real solutions that are identical or not, which correspond to the coordinates of the two nodes  1 and  2 that are identical or not.Select the one that is nearer to  as the approximate location of , denoted as ( 1 ,  1 ).In the same way, we can obtain the other two approximate locations of , denoted as ( 2 ,  2 ) and ( 3 ,  3 ).Therefore, the coordinate of  is (  ,   ), which can be calculated by the following: As a result, according to the previous target localization algorithm, we can obtain x().

Migration Algorithms Based on Single Mobile Agent
This section would propose SMLA and DMLA algorithms from static and dynamic aspects, respectively.And it would then propose pid-DMLA based on disadvantages of SMLA and DMLA.

SMLA.
In SMLA algorithm, we use static information.Before distributing mobile agents, the CIS collects by communicating with other nodes, and it then generates a migration plan.In this migration plan, information collection values of all nodes in the network decrease.The specific steps of SMLA are as follows.
(1) At time  = 0, the node that has first detected information of target entity is denoted as cluster head; it generates a mobile agent.(2) At time  = 0, calculate location information of target entity, X(0), according to the target location algorithm.

International Journal of Distributed Sensor Networks
Calculate the amount of information collection,  0 , according to (2), and set  =  0 .
Select the next hop, according to the predetermined migration sequence.
(3) At time t, when agent reaches node k, the location of target entity is X() according to the target location algorithm.
Calculate the amount of information collection of node ,   , and update  =  +   .
If  is greater than the threshold, then go to step 4; otherwise, continue to migrate to the next hop in the migration sequence, update time  =  + 1, and then repeat step 3.
(4) Return to cluster head to process data.
Though, sometimes, SMLA can gain the ideal migration sequence, there are many drawbacks in practical applications.Firstly, since SMLA uses static information, sensor's transmission distance must be large enough to ensure that CIS is within one-hop range.So we need to adopt the nodes with greater power in communication capabilities.And using these nodes will inevitably result in relatively higher energy consumption.Secondly, since SMLA is a static algorithm, the static information, which is acquired before migration, lack timeliness and cannot reflect the changes of the network in the process of migrating.For example, that some nodes suddenly lose efficacy can result in the failure of the deployment of SMLA [9].Moreover, most of WSNs are highly dynamic, so SMLA has some limitations in WSNs.

DMLA.
SMLA is a centralized algorithm, and it has already decided the migration sequence before distributing mobile agents.Because WSN is a dynamic and distributed network, static routing information exposes a lot of problems in practical applications.Thus, DMLA is proposed.DMLA dynamically selects the next hop in the process of migration based on characteristics of the network.

The Migration Model of Mobile Agent in DMLA.
In DMLA, mobile agents decide the nodes that they need to migrate to.In the surviving neighbor nodes, not all of the nodes can provide information affecting the final result.Therefore, the purpose of mobile agent migration algorithm is to produce a set of optimal subsets to determine the optimum migration sequence.
In the target entity tracking, we construct rules to choose the next hop as follows: mobile agent, which is located in node , always looks for the next hop with minimal overheads.As the selection of the next hop is a method of balancing overheads and profit, we define the overheads function, when mobile agent moves from node  to neighbor node  at time , as follows: Equation ( 5) consists of three parts including energy consumption, information collection, and residual energy, where   represents transmission energy consumption when the agent migrates directly from node  to node ;   () represents the amount of information collection of node  at time ;   () represents the residual energy of node ;  max represents the maximum energy consumption of migration between two nodes, which is determined by the maximum transmission distance;  max represents the maximum amount of information collection;  max represents the initial energy of sensor node and it is a constant value; and  and  are the balance coefficients: 0 ≤  and  ≤ 1.
Define the transmission energy consumption of the agent migrating from node  to node  as follows: where   represents the transmission power of sensor nodes; ‖  −   ‖ represents the distance between node  and node ;  trans , a constant, represents the time of transmitting the mobile agent;  = 4 2 / 2  1  2 ;  1 ,  2 are all of the antenna gain factors (set them as 1);  represents the signal wavelength; and  -th represents the receiving threshold.From ( 2), ( 5), and ( 6), we can gain where  max represents the maximum possible distance between two nodes.Equation ( 7) can be rewritten as follows: where   represents a group of neighbors of node ; node  * ∈   represents the next hop; and  * ∈   can ensure less energy consumption, stronger sensing capabilities, and more residual energy.In summary, the total cost in the migration process is where  represents the number of nodes migrated through HOP  represents the total number of migration hops.In the practical migration, once mobile agent gains enough information, and it will terminate migration and return to the CIS.

The Specific Migration
Procedure of DMLA.The mobile agent migrates to the alive node which has not been reached and with the minimal migration overheads according to (7).
In this way, we can gain a table close to the optimal migration.If all nodes have been reached, mobile agent will return the node that distributes it.And when the mobile agent has acquired enough information, it will return to the CIS.Since each node periodically receives beacon frames from neighbor nodes, DMLA can always use the updated local variables to determine the next hop.As only using local variables, sensor nodes can avoid the node which has a greater transmission distance, so part of the transmission energy can be saved.In addition, when some nodes suddenly lose efficacy, the whole migration process will not make mistakes.So DMLA algorithm is a fault-tolerant algorithm.The specific migration steps of DMLA are as follows.
(1) At time  = 0, the node that has first detected information of target entity is denoted as cluster head; it generates a mobile agent.
(2) At time  = 0, calculate location information of target entity, X(0), according to the target location algorithm.
Calculate the amount of information collection,  0 , according to (2), and set  =  0 .
Select the next hop, according to (8).
(3) At time , when agent reaches node , the location of target entity is X() according to the target location algorithm.
Calculate the amount of information collection of node ,   , and update  =  +   .
If  is greater than the threshold, then go to step 4; otherwise, continue to migrate to the next hop according to (8), update time  = +1, and then repeat step 3.
(4) Return to cluster head to process data.

The Proposition of pid-DMLA.
In the cooperation processing applications, the movement of target entity is one of the important factors that affect the final result [14][15][16][17][18][19].DMLA algorithm does not take the direction of the movement of target entity into account.So in some cases, it cannot select the optimum next hop.For example, in Figure 2, at time , the mobile agent is located in node .Nodes  and  are neighbors of , and they are equidistant to .
According to DMLA, mobile agent calculates node  as the next hop.This is because node  is nearer to the target entity than node .Then, at time  + 1, the mobile agent is located in node .But the target entity moves to a position closer to node .Thus, DMLA, on the contrary, selects the node which is farther from the target and has smaller amount of information collection and measurement value as the next hop.Therefore, when designing agent migration algorithms, we need to focus on predicting the movement of the target entity and selecting the node with the maximum information.And we will propose the pid-DMLA algorithm to solve the problems of the movement of the target entity in the migration process.

Agent Migration
Model in pid-DMLA.Suppose that the moving direction and speed of the target entity do not change.Then, the change of the target entity's displacement is a constant, at each identical time interval, as follows: Equivalently, As illustrated in (11), the position information ( + 1) at time  + 1 can be deduced from the positions at time  − 1 and time .In this way, the location information X( − 1) and X() can be calculated by target location algorithm; and, according to (11), the position of target entity, X( + 1), can be estimated at time  + 1 as follows: Update the overhead function in (7), and get where ‖ X( + 1) −   ‖ represents the distance between node  and the target entity at time  + 1.
And the next hop is 6 International Journal of Distributed Sensor Networks At time  = 0, since the position of the target entity at the previous time is unknown, the amount of information collection can be calculated by the DMLA.At time  > 0, mobile agent migrates to the node closer to the estimated position of the target entity.So it can obtain larger sensing measurement and information collection, which is the core of pid-DMLA.

The Specific Migration
Procedure of pid-DMLA.The process of mobile agent migration of pid-DMLA is shown in Figure 3.In a period of time, the target entity moves along the dotted line, and mobile agent migrates from node  to  through  and .As shown in Figure 3, mobile agent always migrates to the node nearest to the next position of the target entity.
The specific migration procedure of pid-DMLA is as follows.
(1) At time  = 0, the node that has first detected information of target entity is denoted as cluster head; it generates a mobile agent.
(2) At time  = 0, calculate location information of target entity, X(0), according to the target location algorithm.
Calculate the amount of information collection,  0 , according to (2), and set  =  0 .
Select the next hop, according to ( 14).
(3) At time , when agent reaches node , the location of target entity is X() according to the target location algorithm.
Calculate the amount of information collection of node ,   , and update  =  +   .
If  is greater than the threshold, then go to step 4; otherwise, continue to migrate to the next hop according to (14), update time  =  + 1, and then repeat step 3.
(4) Return to cluster head to process data.

Migration Algorithm Based on Multiple Mobile Agents
5.1.The Architecture of Mpid-DMLA.Many researchers have proposed and realized feasible ways to organize the migration of a single mobile agent, such as Agilla program [18] and SensorWare program [19].Consider the functional requirements of these programs.Firstly, they have not formed an architecture to manage the agent migration mechanisms in WSN.Secondly, they lack migration algorithms when a tracking application needs the collaboration of multiple agents.So when dealing with multiple agents' migration, we need a specific agent to manage the applications.Therefore, we will propose Mpid-DMLA to solve this problem.
Suppose that multiple target entity applications are deployed in an area of sensors; each application is responsible for monitoring a part of the area and composed of one or more mobile agents.Therefore we have the following definitions.
Definition 4 (code segment application).A centralized program which consists of multiple mobile agents deployed in the WSN to accomplish a specific task is called centralized code segment application of multiple agents, which is called code segment application for short.
Code segment applications are associated with sensing data that need to be evaluated, and they need to cooperate and interact based on the need of programs.On the other hand, according to the Deluge & Mate model [20], code segment applications need to redeploy themselves so that they can be distributed by the CIS.
To track targets, code segment applications require the following four functions [21].
(1) Sensing.Sensor nodes are distributed around the target node, and they test and collect information of the surrounding environment.
(2) Processing Information.After acquiring sensor information, most of the nodes send it to the CIS for processing, while cluster heads will directly process information.
(3) Communication.In order to maintain the application, sensor nodes need to keep exchanging information with other nodes or CIS.
(4) Migration.Mobile agents migrate based on the need of code segment application.
Constructing the architecture of multiple mobile agents also requires the following definitions.
Definition 5 (main component agent).The main component agent is responsible for managing migration information and activity cycle of all component agents, processing sensing data of other agents, and collecting and exchanging the information of subcomponent agents.Each code segment application has one and only main component agent.Definition 8 (middleware software).The middleware software, located between the physical and the operating system layers, is the software entity running in mobile agents.

The Migration Model of Mobile Agent in Mpid-DMLA.
When a code segment application changes monitoring positions, all of the mobile agents in this application need to migrate together to reconstruct a new code segment application.In Agilla, the main component agent controls the entire process by sending the migration sequence, while other mobile agents can communicate by accessing the independent tuple space [22].And the engine virtual machine works as the kernel to provide services and controls all of the concurrent execution of all of the agents in a node.However, with the increase of the mobile agents, the possibilities of the loss of packet and the failure of migration will increase, too.Suppose that a code segment application is composed of  mobile agents.Define  as the failure coefficient of a single agent.And then we can obtain the success coefficient of migration, in the entire application, as follows: Communication overheads, based on pid-DMLA, are given as follows: And the next hop is

The Specific Migration
Procedure of Mpid-DMLA.In the construction of the target entity tracking, we assume that subcomponent agent is a small program of lightweight code which is suitable for migration.And it can independently access the target entity's location.As shown in Figure 4, hollow circles represent sensor nodes which are distributed in the sensing region; code segment is composed of one main component agent (solid circle), four subcomponent agents (solid squares) and one communication component agent (solid triangle).Each agent runs on one node, executing code segment applications.The migration of code segment application means the migration of the six mobile agents, which is the migration of multiple mobile agents [19].The following algorithm can be used to describe the abovementioned procedure.
(1) A main component agent, a communication component agent, and several subcomponent agents are deployed in different sensor nodes.
(2) Sensor nodes are monitoring around the target entity.
The node that has first detected information of target entity is denoted as cluster head; the main component agent then migrates to it.
(3) At time  = 0, calculate location information of target entity, X(0), according to the target location algorithm.
Calculate the amount of information collection,  0 , according to (2).
Define the threshold of the amount of information as ℎℎ , and let ℎℎ  =  0 .
The main component agent generates new communication component agent and transfers  0 and ℎℎ  to it.
Then, the communication component agent sets to migrate.
(4) At time , when agent reaches node , the location of target entity is X() according to the target location algorithm.
Calculate the amount of information collection of node ,   , and update ℎℎ  = ℎℎ  +   .
And it interacts with the main component agent.(6) The main component agent generates the migration sequence { 1 ,  2 , . . .,   }, according to location of target entity.
Send it to each subcomponent agent (this step is optional for different applications).
(7) The main component agent sends complete instructions to the lower-layered middleware software.
Method functions which are predefined in the middleware software recycle the communication component agent and the subcomponent agents.
(8) The main component agent goes to the destination node based on the migration sequence.
If the migration fails, send failure information to CIS to terminate this migration; otherwise, generate new communication component agent and subcomponent agents, and this migration ends.

The Effect of Single Mobile Agent in Target Tracking.
Before the simulation experiments, we firstly use target tracking as a sample to demonstrate the migration effect of a single mobile agent of different migration algorithms.As shown in Figures 5, 6, and 7, suppose that a car is running from left to right through the area covered by WSN.The small circle represents the sensor node; solid small circle represents the cluster head, which distributes agents; large dotted circle represents the communication range of sensor node, and each node selects the next hop only within its communication range.The above-mentioned figures illustrate the specific locations of the car and agent from time  to time  + 7.
The migration process of SMLA is shown in Figure 5.At time , CIS distributes the mobile agent to the node which is the nearest to the target entity, according to the predetermined migration sequence.When the object is stationary or its motion can be estimated, this static approach is very suitable.However, it loses efficacy in some conditions.For example, if the object remains in the location at time +1, then the migration sequence will be the positions that are around the target entity.But once the target entity starts to move not according to the predetermination, SMLA will fail.
DMLA can, in some sense, optimize the performance of SMLA.As shown in Figure 6, mobile agent tracks the movement of the target entity.However, the movement of   Energy consumption for data processing 0.3 J Energy consumption for sending beacon frames 0.1 J The interval of node broadcasting beacon frames 0.1 s The speed of the target entity 0∼50 m/s The threshold of the amount of information 18 The size of a mobile agent 800 bits Simulation time 100 s the target entity is unpredictable, so it is not accurate to decide migration path only by the amount of information, which is, however, related to the distance to the target entity.
The pid-DMLA can predict movement information of target entity dynamically, which is a better solution to such problems.As shown in Figure 7, at time  + 5, mobile agent selects the next hop according to the predicted information, which is different from DMLA.In brief, pid-DMLA rebuilds migration sequence based on predicting the movement of the target entity to achieve the purpose of tracking.

Performance Analysis on the Single Mobile Agent Migration Algorithms.
We use simulation software, NS2, to evaluate the three single mobile agent migration algorithms' performances.The default simulation parameters are shown in Table 1.
Suppose that once the agent migrates one hop, all sensor nodes in the network consume 0.2 J.For SMLA, the transmission distance is set to 30 m, while, for DMLA and pid-DMLA, the transmission distance is set to be 10 m.Therefore, the consumption of transmission, for SMLA, is three times more than that of sending.The reason for this setting is that SMLA needs bigger transmission range to collect information.The direction and size of movement of the target entity are constant, denoted as V (m/s).Once the target entity reaches the edge of the sensing area, it reverses direction immediately, which ensures its being always within the sensing area.Scenario 1. Set the number of nodes as 200, the target entity speed as 0∼50 m/s, and the simulation time as 100 s, which can guarantee a complete migration.The simulation results are shown in Figures 8 and 9.It is obvious that DMLA and pid-DMLA consume less energy than SMLA in the whole network.This is because the communication cost of SMLA is higher than that of DMLA.But with the increasing speed of the target entity, the effect of SMLA algorithm in tracking the target entity becomes less and less obvious; therefore, migration may terminate, and the energy consumption, on the contrary, becomes slower.On the other hand, when the speed of target entity is very low, there are no significant differences among the three migration schemes.more; as a result, the overheads become less [23].When the number of nodes is less than 50, the performance of SMLA is better than those of the other two.This is because with less nodes static and dynamic migration algorithms share the more similar migration path; however, the migration table has been predetermined in SMLA; thus, it, on the contrary, has the least overheads.On the other hand, when the density of nodes is high, there would be more neighbors and more migration choices.Thus, DMLA and pid-DMLA outperform SMLA.

Multiple Mobile Agents Migration Algorithm Performance
Analysis.Before the assessment of Mpid-DMLA, we need to consider two problems [24,25].The first is the effect of code segment applications on the amount of communication in the migration process.To ensure the comprehensiveness of the evaluation, set the number of communication component agents as 1 and the number of subcomponent agents as 5, 10, or 20, and evaluate Mpid-DMLA based on code segments with different scales.The second is the effect of different environment and running platform in practical operation on the amount of information and the success rate of migration.Therefore, we only consider the relation of the number of communication and energy instead of the influence of the agent's size.
The performance of the migration of mobile agent in Agilla system has been evaluated in [19].First, Agilla system is not designed to support multiple mobile agents specifically, which means that it is not aware of the number of the agents in the code segment application.And the system's overheads are related to the size of mobile agent.So, in Agilla, all kinds of agents are considered to be identical, and there is no discrimination between the main and communication component agents.However, this does not affect the simulation results because all agents are uniformly assumed in the simulation in this paper.
The purpose of multiple mobile agents migration is to complete the entire application migration with limited energy.The default simulation parameters are shown in Table 2.
And when main component agent recycles and sends mobile agents, suppose that the energy consumption of the node where main component agent stays is neglected, while that of other nodes is 0.05 J.
Figures 12, 13, and 14 illustrate the relation between the number of application code segments and the success rate of one hop migration, when the numbers of subcomponent agents are 5, 10, and 15, respectively.The success rate of Mpid-DMLA is higher, when the number of subcomponent agents is 5, than those when the numbers of subcomponent agents  are 10 and 20.It is obvious that the successful rate of Mpid-DMLA is generally not less than 50%, which is much larger than that of Agilla.Moreover, Figure 15 demonstrates the relationship between the migration hops and the amount of communication, when the subcomponent agents are 5.As shown in Figure 15, with the same migration hops, the amount of communication of Mpid-DMLA is much less than that of Agilla.As the number of data packet reflects the amount of energy consumption, Mpid-DMLA consumes less energy than Agilla.
Although the simulation results show that Mpid-DMLA is a suitable migration scheme for multiple mobile agents, it bases on some specific assumptions.In general, this scheme still encounters the following three issues.
(1) When the main component agent loses efficacy in the process of migration, code segment applications cannot be rebuilt.
(2) When subcomponent agents lose efficacy after deployment, code segment applications will keep waiting because the applications cannot be recycled.Therefore, in designing middleware software, it is necessary to add the feedback mechanism of main component agent, and it needs to periodically return ACK information to the higher layer of the middleware software.When the middleware finds that the main component agent loses efficacy, it needs to distribute a new one or a specialized independent agent to recycle the useless agents in the whole network.
In Agilla, the method of recycling the useless agents is by adding the unified interface into all of the agents.Removing all of the mobile agents will affect the function of code segment applications.Therefore, developing the more appropriate middleware software is the future work, which is also related to the development of the better migration strategies [26].

Conclusion
As big data is the intensification of information architecture while distributed computing is the intensification of infrastructure and resource, distributed computing is an appropriate method to deal with big data.In this paper, we have firstly illustrated the mobile agent model in the distributed computing.And it led to the two considerable factors of migration: the selection of nodes and of the sequence of them.Then, we have proposed the assumptions of the migration algorithms.Moreover, we have designed the node's sensor model and information collection model.Furthermore, we have formulated the beacon frames of mobile agent for communication.Generally, mobile agent migration algorithms can be transferred as the target tracking issue.Thus, we have described a simple target localization algorithm applicable for migration.On this basis, we have generalized the whole migration process of the mobile agent.
Considering the single mobile agent, we have proposed the static SMLA and the dynamic DMLA algorithms.After analyzing the drawbacks of SMLA and DMLA, we then proposed the pid-DMLA algorithm.Section 4 has demonstrated the modeling procedure of the abovementioned three algorithms; Section 6 has emulated and evaluated their performances and studied their advantages and disadvantages in different scenarios.
Considering the multiple mobile agents applied in practical target tracking, we have also put forward the Mpid-DMLA algorithm.In the process of mobile agent component constructing code segment applications, we defined three mobile agents with different functions to cooperate with each other to accomplish the migration.Section 5 illustrated the architecture, modeling procedure, and basic process of Mpid-DMLA; Section 6 compared it with Agilla and evaluated its advantages and disadvantages.

Figure 2 :
Figure 2: The movement of the target entity.

Definition 6 (
subcomponent agent).The subcomponent agent is used to obtain the data of nodes and report them to the main component agent.Each code segment application has one or more subcomponent agents.Definition 7 (communication component agent).The communication component agent is used to collect and exchange the entity information of WSN by migrating.Each code segment application has one or more communication component agents.

Figure 4 :
Figure 4: Migration based on predicting information drive of multiple mobile agents.

Figure 8 :
Figure 8: Energy consumption of the single agent migration algorithms in Scenario 1.

Figure 11 :
Figure 11: Lifetime of the single agent migration algorithms in Scenario 2.

Figure 12 :
Figure 12: The relation between the number of code segment applications and the success rate of migration (I).

Figure 13 :
Figure 13: The relation between the number of code segment applications and the success rate of migration (II).

Figure 14 :
Figure 14: The relation between the number of code segment applications and the success rate of migration (III).

Figure 15 :
Figure 15: The relation between the migration hops and the amount of communication.
,   represents the location of node , () and   are two-dimensional vectors, and ‖() −   ‖ represents the Euclidean distance between node  and target entity in time .
Figure 1, the locations of (  ,   ), (  ,   ), and (  ,   ) are known; and one of (  ,   ) needs to be tested.According to the RSSIs, we can calculate the distance of , , and , denoted by  1 ,  2 , and  3 , respectively.Thus, we can obtain the following equation set: , update time  =  + 1, and then repeat step 3.

Table 1 :
Basic simulation parameters of single mobile agent migration algorithms.

Table 2 :
Basic simulation algorithm parameters of a single mobile agent migration.