Monitoring Continuous Location Queries Using Mobile Agents

9 downloads 1656 Views 210KB Size Report
IIS Department, Univ. of Zaragoza, Maria de Luna 3, 50018 Zaragoza, Spain. {silarri ... for monitoring continuous location-dependent queries (i.e., queries whose ...
Monitoring Continuous Location Queries Using Mobile Agents Sergio Ilarri1 , Eduardo Mena1 , and Arantza Illarramendi2 1

2

IIS Department, Univ. of Zaragoza, Maria de Luna 3, 50018 Zaragoza, Spain {silarri,emena}@posta.unizar.es LSI Department, Univ. of the Basque Country, Apdo. 649, 20080 Donostia, Spain [email protected]

Abstract. Nowadays the number of mobile device users is continuously increasing. However the available data services for those users are rare and usually provide an inefficient performance. More particularly, a growing interest is arising around location-based services but the processing of location-dependent queries is still a subject of research in the new mobile computing environment. Special difficulties arise when considering the need of keeping the answer to these queries up-to-date, due to the mobility of involved objects. In this paper we introduce a new approach for processing location-dependent queries that presents the following features: 1) it deals with scenarios where users issuing queries as well as objects involved in such queries can change their location, 2) it deals with continuous queries and so answers are updated with a certain frequency, 3) it provides a completely decentralised solution and 4) it optimises wireless communication costs by using mobile agents. We focus on the way in which data presented to the user must be refreshed in order to show an up-to-date answer but optimising communications effort.

1

Introduction

We are witnessing a great explosion in the use of different kind of mobile devices that can be connected to Internet. Those devices are used not only to make voice connections from anywhere and at any time (phones) or to work locally (laptops, palmtops, etc.) but also to transmit data. In fact, many consultancies predict that in few years data transmission through the wireless media will be more frequent than voice transmission. Thus, it is growing the interest on designing data services/applications that can be performed efficiently in mobile computing environments. Most commonly considered applications are: location-based services, M-Commerce/M-Business, M-Learning and cultural aspects, and finally, Health applications.  

This work was supported by the CICYT project TIC2001-0660 and the DGA project P084/2001. Work supported by the grant B132/2002 of the Arag´ on Government and the European Social Fund.

Y. Manolopoulos and P. N´ avrat (Eds.): ADBIS 2002, LNCS 2435, pp. 92–105, 2002. c Springer-Verlag Berlin Heidelberg 2002 

Monitoring Continuous Location Queries Using Mobile Agents

93

Considering location-based services, in this paper we present our approach for monitoring continuous location-dependent queries (i.e., queries whose answer depends on location of objects and must be automatically updated) [5]. This approach is defined within ANTARCTICA [4], a system that we are building and whose goal is to improve the efficiency of data management services for mobile device users. The proposed approach deals with contexts where not only the user issuing the query can change her/his location, but the objects involved in the query can move as well. A sample location-dependent query is “find the free taxi cabs inside a radius of three miles and their distances to my current position”. Instantaneous location queries are not very useful in a mobile environment since the answer presented to the user can become obsolete in a short time, since objects are continuously moving. However continuous queries introduce new problems in the query processing because it is necessary to refresh the answer in an efficient manner. So, we cannot afford to consider a continuous query as a sequence of instantaneous queries that are re-sent continuously to the data server. It is necessary an approach that assures updated data but optimising (wireless) communications. Furthermore, location information about moving objects is not centralised but distributed across several base stations; each base station manages location information about moving objects under its coverage area. Agent technology can help us to accomplish the requirements mentioned in the previous paragraphs and so, mobile agents are used to support a distributed query processing, track interesting moving objects, and optimise wireless communication efforts, due to their autonomy and ability to move themselves across computers. In the rest of the paper we describe in Section 2 the main components in a wireless network (moving objects and base stations). In Section 3 we briefly describe our approach to process location-dependent queries in an efficient way. In Section 4 we focus on the main goal of this paper, the mechanisms proposed to keep location query answers up to date. We conclude with related work in Section 5 and some conclusions and future work in Section 6.

2

Moving Objects and Base Stations

As framework of our work, we consider the generally accepted mobile environment architecture, where a mobile device (laptops, PDAs, etc.) communicates with its base station (BS), which provides service to all the moving objects within its coverage area [10,2]. Thus, in this section we briefly describe these two elements and also enumerate the modules needed on moving objects that pose queries and on BSs in order to allow an efficient location-dependent query processing.

94

Sergio Ilarri et al.

2.1

Moving Objects

We call moving object to any (static or mobile) entity provided with a wireless device, for example, a car or a person with a wireless communication device (ranging from advanced mobile phones to laptops with capabilities similar to desktop computers). In a wireless network, moving objects register on the BS that provides them with the strongest signal. As moving objects move, they can change from one coverage area to another (handoff). They can disconnect any time and reconnect from a different location later. They can also enter an area without coverage which also results in a disconnection of the communication network.

Monitor. Among moving objects we distinguish those that pose queries, i.e., the computers (or devices) of the users interested in querying the system. We call these objects monitors. The following are the main elements on a monitor: – Location-dependent query processor. Its goal is to answer location-dependent queries and keep the retrieved data up to date. For that task, it creates a net of mobile agents that track the moving objects involved in such queries. Those agents will inform about relevant changes in the location of the tracked moving objects (see Section 3). – BSs catalogue. It stores information (IP address, location, coverage area, etc.) about BSs in the wireless network. This information is used by the query processor to deploy its net of mobile agents (see Section 3). We assume that moving objects which are subject of location queries only need some device to allow the system knowing their position (like a GPS1 receiver).

2.2

Base Stations (BSs)

BSs provide connectivity to moving objects under their area. The communication between a moving object and the BS that provides it with coverage is wireless and the communication among BSs is wired [9,2]. Strictly speaking, we should talk about Mobile Switching Station (MSS) or Gateway Support Node (GSN) which controls several base stations. However, we use the term base station because it is more popular as intermediate between mobile users and the rest of network. 1

The Global Positioning System (GPS) is a free-to-use global network of 24 satellites run by the US Department of Defence. Anyone with a GPS receiver can receive his/her satellite location and thereby find out where he/she is [7].

Monitoring Continuous Location Queries Using Mobile Agents

95

Main Components at BSs. The following are the main elements on BSs to allow our proposed location-dependent query processing: – Object location table. It is a data repository that contains updated information (id and location) about the moving objects within the coverage area of the BS, in order to allow an efficient location-dependent query processing. Three attributes are stored for each object: id (the object identifier, including its object class), x and y (the absolute coordinates of the object). Advantages of tracking the location of moving objects in databases, along with the techniques to do it in an efficient way are presented in [15]. The location of moving objects can be obtained by the moving object itself or by the network infrastructure. – BS server. It is the software that manages different aspects of the BS. In our context, it is the process that detects or receives the location of the objects under the coverage of the BS. It can also provide location information stored in the object location table. – BS place2 . It is the environment needed to allow mobile agents, sent by the query processor (see Section 3), to arrive to the BS with the goal of tracking moving objects.

3

Query Processing Approach

We present in Figure 1 a sample location-dependent query to explain our query processing approach (an SQL-like syntax was proposed in [5]): SELECT blocking.id, newChaser.id FROM inside 7(‘car38’, policeUnit)) blocking, inside 5(‘policeCar5’, policeCar) newChaser WHERE newChaser.id‘policeCar5’

Fig. 1. Sample location query This query retrieves the available police units (by police units we mean police stations, policemen, and police cars) that are within seven miles around ‘car38’ (a stolen car), and the police cars within five miles around ‘policeCar5’ (the current chaser police car).3 For each location-dependent constraint of a query, the following definitions are managed: – Reference objects: objects that are the reference of the constraint. In the sample query (see Figure 1), there exist two reference objects: ‘car38’ for the 2 3

In mobile computing, a place is a context in which an agent can execute [8]. ‘blocking’ is an alias that identifies the police units close to ‘car38’; ‘newChaser’ identifies the police cars that can assist ‘policeCar5’, the current chaser police car.

96

Sergio Ilarri et al.

constraint “inside 7(‘car38’, policeUnit)”, and ‘policeCar5’ for the constraint “inside 5(‘policeCar5’, policeCar)”. – Target class: the class of objects that is the target of the constraint. In the sample query, there exist two target classes: police units for the constraint “inside 7(‘car38’, policeUnit)”, and police cars for the constraint “inside 5(‘policeCar5’, policeCar)”. The instances of a target class are called target objects. – The relevant objects of a constraint are both the reference and target objects involved in such a constraint. We use this sample query to introduce the query processing steps. Two main tasks are performed in the query processing approach: 1) Analysis of the user query, and 2) initialisation of DB queries. We use a network of agents to solve location queries in an efficient way (for a more detailed description, see [5]). We briefly explain these steps in the following, and later detail how to refresh answers in Section 4. 3.1

Analysis of the User Query

The query processor obtains: (1) for each constraint in the query, the reference object and its target classes, and (2) for each target class of each reference object, a relevant area. Furthermore, by considering the maximum speed of relevant objects, the semantics of the constraint, and the answer refreshment frequency, an extended area for each relevant area is obtained. Extended areas are used by the query processor to build DB queries that constraint the target objects in which we are interested in. However, only target objects located inside the relevant area will be shown to the user. Target objects inside the extended area but outside the relevant area are considered by the query processor as candidates to enter the relevant area during the gap between refreshments of data shown to the user. Thus, by dealing with extended areas, the query processor avoids very frequent requests about relevant objects’ locations. After that, the location-dependent query is translated into queries over tables that store information about moving objects: for each target class of each reference object, one SQL4 query is obtained. As example, the resulting DB query for the constraint “inside 7(‘car38’, policeUnit)” is the following (extended area=7.6 miles): SELECT id, x, y FROM policeUnit WHERE sqrt((x-refx )2 +(y-refy )2 ))