Distributed Simulation of Wireless Environments Using Mobile Agents E. Mena IIS department Univ. of Zaragoza Zaragoza, Spain
[email protected]
S. Ilarriy IIS department Univ. of Zaragoza Zaragoza, Spain
[email protected]
Abstract
A. Illarramendi LSI department Univ. of the Basque Country San Sebasti´an, Spain
[email protected]
We are witnessing a great explosion in the use of different kinds of mobile devices that can be connected to Internet. These devices are used not only to make voice connections from anywhere and at anytime (phones) or to work locally (laptops, palmtops, etc.) but also to transmit data. Thus, it is growing the interest in designing data services/applications that can be performed efficiently in mobile computing environments.
However, testing those new applications becomes a difficult task due to the distributed and dynamic nature of the underlying network infrastructure. Testing a service is sometimes as hard as developing it. Moreover, developing data services using a real wireless network implies a high cost in wireless communication and devices : we could need many users, with real wireless devices, following certain behavior that we want to test . Some services could even need to extend the functionality of current mobile objects and base stations (for instance, we could want base stations to store GPS1 location data sent by mobile objects under their area). We present in this paper a wireless infrastructure simulator, based on mobile agent technology [6], that can be used to test wireless data services. This simulator deals with mobile computing environments that can include both real and simulated mobile objects and base stations (BSs). The main features of the simulator are: 1) it allows a distributed simulation, using different computers to simulate several BSs and mobile objects, 2) it manages scenarios with real and simulated entities at the same time, and 3) it uses mobile agent technology as software representations of their hardware counterparts (mobile objects) . The most important goal of the simulator is to hide the true nature (real or simulated) of mobile objects and BSs in the scenario from the data service that we want to test. The idea is to avoid the development of a data service prototype that deals with a simulated environment, and later the development of the final data service that deals with a real wireless network. The goal of our simulator is to allow developers to test high-level data services and evaluate network protocols. Consequently, our work is orthogonal to those dealing with the simulation of wireless networks at protocol level. In fact we could use such works to improve our simulator at low level. In WINES [10, 11], a cellular network simulator is
This work was supported by the CICYT project TIC2001-0660 and the DGA project P084/2001. y Work supported by the grant B132/2002 of the Arag´on Government and the European Social Fund.
1 The Global Positioning System (GPS) is a free-to-use global network of 24 satellites run by the US Department of Defense. Anyone with a GPS receiver can receive their satellite position and thereby find out where they are [5].
Nowadays it is growing the interest on designing services/applications that can be performed efficiently in mobile computing environments. However, testing these new applications becomes sometimes a difficult task due to the distributed and dynamic nature of the underlying network infrastructure. In this paper we present a distributed simulator of cellular networks, based on mobile agent technology, that can be used to test wireless data services. This simulator allows developers to define mobile computing environments that include both real and simulated mobile devices and base stations. The main goal is to hide from data services the true nature (real or simulated) of mobile devices and base stations in the scenario. In this way, we avoid the development of a data service prototype that deals with a simulated environment that later must be adapted to work on a real wireless network. We show the suitability of the simulator by using it to test two concrete wireless data services.
Keywords: Simulation of wireless systems, mobile agents
1 Introduction
proposed, along with a traffic generator that allows to simulate the behavior of mobile users in the context of telephony activity. The Network Simulator (ns) is a commonly-used publicly available network research simulator; in [2] they describe the design and implementation of a facility that allows to link the simulated world with the real world. As far as the simulation of mobile objects concerns, for which the coordinates corresponding to their trajectories must be obtained, there are some other projects that also deal with the problem of generating location data for benchmarking spatio-temporal databases [9, 7, 1]. However these works focus on evaluating performance rather than on testing the functionality of high-level data services as we do. In the rest of the paper we describe in Section 2 the role of mobile objects and BSs in a wireless environment. In Section 3 and 4 we introduce the techniques used to simulate mobile objects and BSs, respectively. In Section 5 we show how to simulate a sample scenario. In Section 6 we evaluate the simulator by using it to test two wireless data services. Finally, conclusions and future work appear in Section 7.
2 Mobile Objects and Base Stations As framework of our work, we consider the generally accepted mobile environment architecture, where a mobile object (laptop, PDA, etc.) communicates with its Base Station (BS), which provides service to all the mobile objects within its coverage area [8]. Thus, in this section we briefly describe these two elements.
2.1 Mobile Objects Mobile objects are devices with a wireless connection. They are managed by users and range from advanced mobile phones to laptops with capabilities similar to desktop computers. For simplicity, we will also call mobile object to any (static or mobile) entity provided with a wireless device, for example, a car or a person with a wireless communication device. As mobile objects move, they can change from one coverage area to another (handoff). They can disconnect anytime (the device is powered off, it runs out of battery or it enters an area without coverage) and reconnect from a different location later. Some appliances can be attached to mobile objects, such as a mobile phone or a GPS receiver. Mobile objects can also execute different software, such as a word processor or a web browser. Thus, depending on their features, mobile objects provide users with different functionalities.
2.2 Base Stations (BSs) BSs provide connectivity to mobile objects under their area. The communication between a mobile object and the BS that provides it with coverage is wireless and the communication among BSs is wired. BSs maintain information about mobile users (user id, user profile, etc) under their areas. Strictly speaking, instead of BSs we should say Mobile Switching Stations (MSSs) which are the elements that control several BSs and have the capability to execute software that controls communications among wireless devices, providing them with access to the wired network. For simplicity, in the rest of the paper we use the term “base station”, which is more popular, for intermediate elements between mobile users and the rest of the network, and ‘BS server’ for the software application(s) residing on BSs that manages mobile object communications.
3 Simulated Mobile Objects In this section we introduce our proposal to simulate mobile objects. We define a simulated object as a conceptualization of a mobile object. Simulated objects can be inspired by real mobile objects, although could have different features: for example, we could want a real stationary object to appear in a certain scenario as a mobile object with a GPS receiver. A simulated object will be implemented as a mobile agent2 that will behave as we want the simulated object behaves (this includes mobility and any other functionality). Basically, the simulation of a mobile object requires the execution of three tasks: 1. Simulation of the object’s functionality. We should simulate the different functionalities of the simulated object (provided to real objects by hardware appliances or software applications) in which we are interested. Thus, each interesting behavior will be implemented as a thread in the mobile agent. For example, we can simulate a mobile user who is working with a web browser on his wireless device with a GPS receiver, as a mobile agent with two threads: one would be a GPS simulator that provides the location of the user’s (wanted) trajectory, and another that would request web pages following the wanted user behavioral pattern (see Figure 1). 2. Simulation of the object’s movements. The mobile agent begins its execution on the BS that “provides coverage” to the initial location of the simulated object 2 Agents are programs that execute in contexts denominated places [6]. Mobile agents can travel from one place to another. We could use remote procedure calls instead of mobile agents, but this would lead to a more inefficient and difficult to implement solution.
BS
4 Simulated Base Stations BS server Web browser
Place Mobile agent Web browser simulator GPS simulator
111 000 000 111
Figure 1. Real and simulated objects communicating with a BS
that such an agent represents3 . The mobile agent simulates that it follows a predefined path by processing a function that returns the next location from the current location, speed and direction ; however it could be something more complex, since the mobile agent can be programmed with any wanted behavior. The mobile agent should communicate with the BS server on its current BS in such a way that it is registered as a real mobile object would be registered. In this way, from the point of view of a wireless data service, there would be no difference between a real and a simulated object.
In this section we introduce our proposal to simulate base stations. We define a simulated base station as a certain conceptualization of a base station. Simulated BSs can be inspired by real base stations. For example, to test certain data services, we could want a real base station to have a different coverage area. A simulated BS will be implemented by creating a place in a fixed machine with a BS agent, which will provide the wanted functionality of a BS server. These two elements, the place and the BS agent, can reside on any computer in the fixed network (real BSs are wired connected). The IP address of such a fixed computer will be stored in the BS Catalog to identify the simulated BS; IP addresses of real BSs are also stored in the BS Catalog in order to allow simulated objects to be aware of the network infrastructure, as explained before.
3. Simulation of handoffs. The mobile agent is initialized with the corresponding BS catalog4 (BSs in the scenario and their coverage areas, as explained in Section 4). When the mobile agent detects that the “location” of the simulated object that represents leaves the area of the current BS and enters the area of a different BS, then the mobile agent moves there (we said before that the mobile agent is always on the BS that “provides coverage” to the simulated object). We would like to point out that the previous BS will only notice that a mobile object under its area has stopped communicating, and the new BS will only notice that a new mobile object under its area is communicating. If a simulated object “moves” to a location without coverage, according to the network infrastructure, the corresponding mobile agent remains on the last BS until the simulated object “enters” the area of a BS. When this happens, the mobile agent moves there. Notice that the use of mobile agents allows us to create from very simple simulated objects that follow a predefined path, to complex simulated objects that react to their environment by changing their behavior. Communication delays or temporal disconnections can also be easily simulated by the mobile agent. 3 We assume that each BS (real or simulated) has a place where mobile agents can execute. 4 In a real situation, mobile objects discover dynamically the network infrastructure, by using signals received from nearby BSs.
Figure 2. BS Catalog example In Figure 2 we show an example of BS catalog (simulated BS are those with dashed areas) where we store the id, URL (IP address and port in which requests from mobile objects can be received), location and coverage area 5 of each BS in a sample scenario. Notice that both real and simulated BSs are identified similarly by a URL. Different BSs can be simulated on different or the same fixed computer (as shown in Figure 3). Thus, when a simulated mobile object, or the tested data service, needs to communicate with a BS, 5 In our prototype, coverage areas are defined by dragging the mouse. However any other method could be used to be more precise.
BS3
Fixed computer supporting simulated BS4
BS2
BS server
BS server
BS agent BS assistant agent
BS3
BS server
BS1
BS server
BS4 BS server
BS server
BS assistant agent
BS4
111 000 000 111
BS assistant agent
Fixed computer
BS agent
BS2
BS agent
BS5
BS agent
BS6
BS server
BS1
Figure 3. Real scenario for the BS Catalog example
it first obtains the URL of such a BS by consulting the BS catalog. So the data service is not aware about whether that BS is real or simulated.
Simulated BSs that “provide coverage” to real objects We cannot simulate the complete functionality of a BS because, for example, a simulated BS cannot provide coverage to real mobile objects. However, we could define a scenario where a simulated (therefore non-existing) BS “detects” real mobile objects, only if those real objects are under the coverage of any real BS (included in our scenario or not). This scenario could be interesting due to three main reasons: 1) to simulate handoffs of mobile objects under the coverage of a single real BS, 2) to consider only a concrete region of the coverage area of a real BS, and 3) to test with real objects new functionalities not provided by real BSs (for example, BSs do not manage the coordinates of mobile objects under their area, which could be needed for a service that processes location-dependent queries). To “detect” real objects, the BS agent of the simulated BS sends BS Assistant agents to the real BSs whose coverage area intersects the area of the simulated BS, as shown in Figure 4, where BS4 is not real (indeed, it is simulated on certain fixed computer) and BS3 is which actually provides coverage to the real mobile object. The goal of BS Assistants is sending to their BS agent information about mobile objects entering the area of its corresponding simulated BS. In Figure 4, BS Assistant on BS3 sends the location of the real mobile object to the BS agent of the simulated BS4.
Figure 4. A simulated BS “detecting" a real mobile object
5 Simulating a Sample Scenario In Figure 5 we show a sample scenario that we want to use for testing some wireless data service. The only real elements are: BS1, BS3, BS4, car15, car38, policeCar4, and policeStation2; the rest of BSs and objects should be simulated (as shown in Figure 6, where simulated BSs are those with a dashed coverage area). However the real location of (real and simulated) mobile objects and BSs are presented in Figure 7. Notice that simulated BSs have been implemented as places (with a BS agent) on two fixed computers, and simulated objects have been implemented as mobile agents in the places of the BSs (real or simulated) that provide coverage to them in the wanted scenario.
BS3
policeStation2 policeman1 policeCar3 BS4
policeCar4
policeCar1 car38 policeCar5 policeman2
car15
policeStation3
BS1
BS5
policeCar15
BS2 BS6
Figure 5. Test scenario
6.1 Testing a Locker Rental Service
Figure 6. Simulated entities for the test scenario
This service offers users the possibility of keeping their data in a secure and safe space called locker (located on a BS) [12]. In summary, the use of lockers provides wireless device users with the following advantages. Firstly, lockers alleviate the device exposure problem (wireless devices are more vulnerable and fragile than stationary devices, because they can be easily stolen, lost or damaged). Secondly, data stored in a locker are available for the agents at the BS, even when the wireless device is disconnected, thus providing a solution for the availability problem (wireless devices might stay disconnected for long periods of time). So, specific tasks are carried out at the fixed network, with data stored in a locker, instead of on the user device, in this way relieving the media problem (wireless communications are often unstable, asymmetric and expensive). Thirdly, lockers can follow user movements, moving from BS to BS, but always residing close to the current location of the user, also relieving the media problem. Finally, due to the use of the agent technology in their implementation, lockers constitute an autonomous and auto-managed storage space.
BS server BS3
111 000 000 111
policeStation2
policeCar1 policeCar3 BS server
111 000 111 000 car38
BS4
111 000 000 111 policeCar4
111 000 000car15 111 BS server
Fixed computer 1
Fixed computer 2
policeman1 policeCar5
BS agent
BS agent
BS agent
policeStation3 policeman2
policeCar15
BS2
BS5
BS1
Figure 8. Locker Rental Service: Differences due to the use of the simulator
BS6
Figure 7. Real scenario for the test scenario
6 Evaluation In this section, we evaluate the suitability of the developed simulator by using it to simulate environments for two wireless data services of the ANTARCTICA system [3], concretely, a locker rental service [12] and a locationdependent query processor [4]. Although we present the simulator for these two sample applications, it can be easily used with other wireless data services.
We have tested the locker rental service to see the influence of using the simulator (see Figure 8). Real data have been obtained in a scenario where a user residing on the US travels to Spain, concretely to San Sebastian and then to Zaragoza. When the user arrives to San Sebastian, his associated locker travels there too. Consequently, while the user is at San Sebastian, file requests imply access to the local BS. However, when the user arrives in Zaragoza, the system considers that it is better not to move the locker there (since there is not a big wired communication delay between Zaragoza and San Sebastian). Accessing times from Zaragoza to San Sebastian are similar to local accessing times, as wired communication costs are insignificant
with respect to the (much higher) wireless communication costs. We have simulated the previous scenario using three fixed computers to represent the BSs in the USA, San Sebastian and Zaragoza, respectively. The corresponding BS agents simulate different delays among them (delays between those three geographical places using the fixed network). The user device was represented as a mobile agent traveling through the three “BSs”, which simulates the wireless network delay with them. In Figure 8, where x-axis shows the user requests at each location (ten accesses to files of about 190 KB) and y-axis shows the accumulated time of interaction between the user device and the locker (in seconds), we can see that times obtained are very similar whether we get them by simulation or not. Thus, by using the simulator, we obtain similar data to those obtained by running the data service on real BSs in different countries.
6.2 Testing a Location-dependent Query Processor We have developed a data service whose goal is the processing of location-dependent queries [4], i.e., queries for which the answer depends on location of objects. We deal with contexts where not only the user issuing the query can change her/his position, but the objects involved in the query can move as well. An example of location-dependent query is: “show me the taxi cabs within two miles around my current position”. Therefore we deal with continuous queries, i.e., queries whose answer must be updated continuously, as opposite to instantaneous queries in which only a single answer is obtained for a query. Unfortunately, we cannot test this service in a real environment because it needs that BSs manage the GPS coordinates of mobile objects under their area (current real BSs do not do that!). Thus, the only possibility is to define a simulated scenario (shown in Figure 5). In Figure 9 we show the precision of our locationdependent query processor (Figure 9) when simulating the wanted scenario in different ways: 1) all the elements (BSs and objects) are simulated on the same fixed computer, 2) one fixed computer for each BS (6 fixed computers), and 3) an alternative to our approach, without mobile agents, using one fixed computer for each element, i.e., 6 fixed computer for BSs and 11 fixed computers more for mobile objects (represented as processes communicating with BSs using remote calls), trying to replicate a real scenario where each element is an independent device. In these three simulations, each “mobile object” communicates GPS location data to its “BS” with a wireless-like delay, and each “BS” stores GPS location data of “mobile objects” under its coverage.
Figure 9. Location-dependent query processor
In Figure 10 we focused on a certain mobile object, whose location was monitorized by the query processor. Notice that the precision of the query processor in the three simulations is very similar considering the inherent imprecision of such a service6 . From the point of view of the user, those differences are not significant as the answer is updated by the service every 5 seconds.
Figure 10. Precision of query processor for different simulation strategies
Therefore we obtain similar results when using our approach (avoiding using many hardware resources) with respect to using an approach closer to the reality (no mobile agents but more hardware cost). 6 For example, notice the imprecision incurred around time=25 seconds, due to a handoff of the monitorized mobile object.
7 Conclusions and Future Work We have presented in this paper a wireless infrastructure simulator, based on mobile agent technology, that can be used to test wireless data services. This simulator deals with mobile computing environments that can include both real and simulated mobile objects and BSs. Mobile objects are simulated as mobile agents that behave as real mobile objects, and BSs are simulated as places with a similar structure as real BSs. We summarize the three main contributions of our work:
The proposed simulator is able to hide the true nature (real or simulated) of the mobile objects and BSs in the wireless network from the data service. So, this simulator allows developers to test a real data service in (completely or partially) simulated wireless environments. Therefore, the development of prototypes that deals only with simulated environments or only with real environments is avoided. The use of mobile agents allows us to create from very simple simulated objects that follows a predefined path to complex simulated objects that react to their environment by changing their behavior. Simulations can be performed distributely, i.e., several base stations and objects can be simulated using different machines. Data services will not be aware of the distributed or local nature of these elements. We have also presented some performance results when using the simulator with two different data services. As future work, we plan to solve the problem of simulating a real mobile device that executes an agent-based application, i.e., a mobile device that contains a system composed of several mobile agents. Another open issue is the development of a framework to define simulated scenarios using libraries of predefined BSs and mobile objects.
Acknowledgements We would like to thank Yolanda Villate for testing the Locker Rental Service using our simulator.
References [1] T. Brinkhoff. A framework for generating network-based moving objects. Technical report, Technical Report of the Institute of Applied Photogrammetry and Geoinformatics Fachhochschule Oldenburg/Ostfriesland/Wilhelmshaven, May 2000. [2] K. Fall. Network emulation in the vint/ns simulator. In Proceedings of the 4th IEEE Symposium on Computers and Communications, July 1999.
[3] A. Go˜ni, A. Illarramendi, E. Mena, Y. Villate, and J. Rodriguez. Antarctica: A multiagent system for internet data services in a wireless computing framework. In NSF Workshop on an Infrastructure for Mobile and Wireless Systems, Scottsdale, Arizona (USA), October 2001. [4] S. Ilarri, E. Mena, and A. Illarramendi. A system based on mobile agents for tracking objects in a location-dependent query processing environment. In Twelfth International Workshop on Database and Expert Systems Applications (DEXA’2001), Fourth International Workshop Mobility in Databases and Distributed Systems (MDSS’2001), Munich (Germany), pages 577–581. IEEE Computer Society, ISBN 0-7695-1230-5, September 2001. [5] A. C. Inc. GPS World’s Big Book of GPS 2000. Advanstar Communications Inc., 1999. http://www.gpsbigbook.com/gpsbigbook/. [6] D. Milojicic, M. Breugst, I. Busse, J. Campbell, S. Covaci, B. Friedman, K. Kosaka, D. Lange, K. Ono, M. Oshima, C. Tham, S. Virdhagriswaran, and J. White. MASIF, the OMG mobile agent system interoperability facility. In Proceedings of Mobile Agents ’98, September 1998. [7] D. Pfoser and Y. Theodoridis. Generating semantics-based trajectories of moving objects. In International Workshop on Emerging Technologies for Geo-Based Applications, Ascona, Switzerland, 2000. [8] E. Pitoura and G. Samaras. Data Management for Mobile Computing. Kluwer Academic Publishers, 1998. [9] J.-M. Saglio and J. Moreira. Oporto: A realistic scenario generator for moving objects. In DEXA Workshop, pages 426–432, 1999. [10] D. Samfat, V. Devernay, and C. Bonnet. A gsm simulation platform for intrusion detection. In Proc. IEEE ICC 95. Seattle, WA, pages 1373–1380, June 1995. [11] D. Samfat and R. Molva. Idamn: An intrusion detection architecture for mobile networks. IEEE Journal of Selected Areas in Communications, 15(7):1373–1380, October 1997. [12] Y. Villate, A. Illarramendi, and E. Pitoura. Keep your data safe and available while roaming. Accepted for publication on MONET, Special Issue on Pervasive Computing, 2002.