Gateways of Physical Spaces in Context-Aware Computing Wenwei Xue, Hung Keng Pung, Wen Long Ng, Chee Weng Tang School of Computing National University of Singapore 3 Science Drive 2, Singapore 117543 {dcsxw, dcsphk, dcsnwl, dcstcw}@nus.edu.sg Tao Gu Institute for Infocomm Research #21-01 Connexis, South Tower 1 Fusionopolis Way, Singapore 138632 tgu@i2r.a-star.edu.sg Abstract—Applications in context-aware computing continuously change their operations based on sensor data or services provided by various physical spaces in the real world, such as persons, shops and homes. We propose a gateway framework for physical spaces in this paper, which serves as a middleware platform for context-aware applications to access data from sensor networks deployed in these spaces. The gateway contains a number of components that facilitate the sensor data acquisition, processing and communication in context-aware applications. These include diversified services with plug-in management, a query processing engine with reasoning capability, and the global connection and local detection between gateways. Keywords-context-aware; middleware; physical spaces; physical space gateways; services I. INTRODUCTION Context-aware applications [17] in pervasive computing use networks of sensors installed in real-world physical spaces to obtain the dynamic context of these spaces. Such context data is utilized to drive the automatic adaptation of operations in the applications. We define a physical space as an entity in the physical world that provides context data, which can be any information used to characterize the situation of the entity [5]. Example classes of physical spaces are persons, shops, homes and offices. A physical space contains many different sensors scattered throughout the space that produce various kinds of context data for the space. As examples, a person can have body sensors to monitor heart beat and blood pressure, a shop can use video sensors to inspect its current crowd level and use temperature sensors for fire alarm. Multiple physical spaces may employ a large number of different sensing technologies to provide a sheer diversity of exploitable context data. This heterogeneity issue makes the applications difficult to access context data from these spaces, since an application must get familiar with the specific sensor hardware and software used in every space it wants to acquire data from. To address this problem and ease the development of context-aware applications, we propose the framework of a physical space gateway (PSG) in this paper. A PSG in our work is a logical software module that can run on any computer chosen by the administrator of a physical space. For instance, the gateway of a person space can locate at the person’s PDA or laptop, and a home space gateway can be the owner’s PC in the house. The PSG acts as a middleware between the physical space and the applications. It provides a single, uniform interface for applications as well as other PSGs to acquire context data from the sensor network in the space or invoke diversified services provided by the space. We have designed a generic PSG framework for all classes of physical spaces, which is shown in Fig. 1. The framework contains a number of functional components that manage and manipulate the context data or services in a physical space. The components of a PSG can be mainly divided into the following three categories: 1) Service management. A PSG maintains different kinds of services using its service manager. The core of the services is a set of context data services encapsulating various operations of context data acquisition in the sensor network, similar to the ODBC and JDBC APIs [16]. Each service can be registered to an HTTP server at the PSG and exposed as web services for remote application invocation via SOAP [18] and WSDL [20]. The plug-in manager at a PSG allows applications to deploy and share libraries of reusable plug-in modules. A plug-in is designed to be able to work with the web services so that the processing burden of applications can be alleviated. 2) Query processing. Applications can issue declarative, SQL-based queries to a PSG. The syntax of the queries is based on a context schema kept by the schema manager that specifies all context attributes the physical space currently provides. We define a context attribute as a kind of context data produced by a type of sensor, such as temperature, light and noise. The queries are executed by a query processing engine that the PSG is equipped with. The engine employs a context reasoner to deduce high-level context attributes from low-level ones. A local context database is used by the engine to store historical context data as well as by the reasoner to store the training datasets and reasoning results. 3) Data communication. The connection manager links a PSG to a number of other PSGs to form a global Peer-to-Peer (P2P) network. The network enables the inter-gateway data communication between physical spaces and is managed by a few pre-dedicated data servers. A PSG can dynamically detect neighboring PSGs in the same local area network and establish connections with them for data exchange. 978-1-4244-2957-8/08/$25.00 2008 IEEE ISSNIP 2008 441 Authorized licensed use limited to: RMIT University Library. Downloaded on January 10,2021 at 16:45:49 UTC from IEEE Xplore. Restrictions apply.