A Context Provisioning Framework to Support Pervasive and Ubiquitous Applications Michael Knappmeyer1,2, Nigel Baker1, Saad Liaquat1, and Ralf Tönjes2 1
Mobile and Ubiquitous Systems Group, University of the West of England, Bristol, UK {michael.knappmeyer,nigel.baker,saad2.liaquat}@uwe.ac.uk 2 Faculty of Engineering and Computer Science, University of Applied Sciences Osnabrück, Osnabrück, Germany
[email protected]
Abstract. Acquisition and dissemination of user and environment context information is critical in development and deployment of context-aware systems. It is fundamental to the success of such systems that they have access to a scaleable, robust and flexible context provisioning framework capable of working across all types of devices and networks. In this paper, we present the design, implementation and experiences of developing a context management system that incorporates these ideas. It is based on a consumer-provider broker model, where providers employ a common context representation format, decoupling various entities involved in the production and consumption of context information. We demonstrate how the idea of independent context providers can aid in end-to-end working of a context management framework. One of the major advantages compared to other approaches is the extendibility of the system. By progressively adding Context Providers to legacy mobile communication systems, new context domains can be added. The system is able to evolve constantly and support a variety of emerging context-aware services and applications. Keywords: Context-awareness, Context Provisioning, Context Management, Context Provider, Context Broker.
1 Introduction Being aware of context and communicating context is a key part of human interaction and is a particularly powerful concept when applied to mobile users where network services can be made more personalised and useful. Location and presence are examples of context based services widely deployed today. Harvesting of context to reason and learn about user behaviour will further enhance the future internet vision where services can be composed and customised according to user context. The concept of awareness and context aware applications and systems is a much more difficult proposition. Context awareness refers to the capability of an application, service or even an artefact being aware of its physical environment or situation and responding proactively and intelligently based on such awareness. Context-aware applications, context-aware artefacts or context aware systems are aware of their environment and P. Barnaghi et al. (Eds.): EuroSSC 2009, LNCS 5741, pp. 93–106, 2009. © Springer-Verlag Berlin Heidelberg 2009
94
M. Knappmeyer et al.
circumstances and can respond intelligently. The ubiquity of mobile devices and proliferation of wireless networks will allow everyone permanent access to the Internet at all times and all places. The increased computational power of these devices has the potential to empower people to generate their own applications for innovative social and cognitive activities in any situation and anywhere. This wireless connection is not limited to user devices, almost any artefact from clothing to buildings can be connected and collaborate. Furthermore new sensor technologies and wireless sensor networks provide environmental intelligence and the capability to sense, reason and actuate. This leads to the exciting vision of the interconnection of artefacts embedded in our real environment, forming a society of “intelligent things” and “smart spaces”. This will enable all sorts of innovative interactive pervasive applications as perceived by Weiser [1]. There are many challenges to be overcome to make this vision a reality but crucial in any attempt to do so will require some scalable means of finding and disseminating context. Gathering context about a user or situation is a challenge in itself since a person or object is potentially related in some way to almost an infinite set of objects and characteristics. At best one can expect to gather only a partial incomplete set of context data. However Tobler’s Law [2] states that all things are related but near things are more strongly related than those further apart. Therefore things in the near environment will probably be more useful in characterising current context and situation of the user. With the proliferation of mobile and static wireless devices and physical sensors together with virtual sensors (e.g. calendar, weather service) and logical sensors (e.g. databases, user profiles, social profiles) [3] this contextual information is becoming available. It can be safely estimated that the number of sources from which user and environment context can be acquired will increase tremendously in the near future. This will partly be due to the improved sensing capabilities of user mobile terminals that are increasingly being fitted with GPS modules, accelerometers, magnetometers, light and other sensors. Gathering is just the first step in the context lifecycle. To make use of this raw context it must be found, refined, aggregated, modelled and used by appropriate networked reasoning entities to trigger services and applications. The main research questions are: how best to design a scaleable universal distributed context management system?; is it possible to build a scalable distributed reasoning system?; how far can we go in delivering useful context-aware services from partial incomplete context information? This paper concentrates on the issues surrounding a universal distributed context management system and in particular presents our work on the design of a simple lightweight scalable context provisioning model. Section 2 briefly presents related work. Section 3 defines context and context-awareness while section 4 details the context management design approaches taken in our work before going into more detailed Context Provider design in Section 5. In Section 6 some example Context Providers are described and evaluated. Section 7 concludes with lessons learnt, problems encountered, current status and future work.
2 Related Work Georgia Institute of Technology elaborated a Context Toolkit [4] offering standard libraries to programmers [4]. Reusable components were designed to assist in the
A Context Provisioning Framework to Support Pervasive and Ubiquitous Applications
95
development of context-aware applications. The main limitation of the Context Toolkit is the lack of a common formal model for context since it is represented by a set of attributes of the context widgets (i.e. the component encapsulating complex sensor functionality) and defined in an ad-hoc manner. The possibility of reconfiguration and extensibility during run-time is therefore not possible. The Context Broker Architecture (CoBrA) developed by the University of Maryland supports context-aware applications in smart spaces. Being based on distributed agents it targets at gathering contextual information from resource limited devices. A Context Broker keeps a shared model of context and represents the entire community of agents. Each is responsible for aggregating and interpreting the raw data and detecting and resolving inconsistency. A rule-based logical inference approach utilised the Web Ontology Language (OWL) [5]. The Context Fusion Network “SOLAR” serves as infrastructure for context acquisition. Based on a graph abstraction of connections between components, their networks provide data fusion services for aggregation and interpretation of sensor data. In order to avoid scalability problems a peer-to-peer model is realised to interconnect several hosts (entitled “Planets”) [16]. Sensors need to be controlled by the applications themselves. The PACE (Pervasive, Autonomic, context-aware Environment) project offers functionalities for context gathering, context management and context dissemination, the development of context-aware applications is facilitated [6]. High-level programming abstractions and situation based triggering mechanisms allow for light weight application development. The introduced layered architecture provides an integrated and holistic view. Reconfiguration by the end-user or by the developer during runtime is not foreseen. Another interesting research has been carried out at the University of Berkeley in collaboration with Intel Research and Georgia Tech. Their iCAP system allows for specification of a rulebased reaction for context-aware applications being configured by graphical user interfaces [7]. This approach is hence limited to static and well-specified rules without considering e.g. fuzzy or probabilistic logic. The successor system CAPpella focussed on providing a prototyping environment for recognition-based context-aware applications. It allows for learning user behaviour autonomously. The Service-Oriented Context-Aware Middleware (SOCAM) project provides an architecture for building and rapidly prototyping context-aware mobile services. It concentrates on a central server entitled context interpreter, acquiring context data from distributed context providers [8]. Another example for a centralised middleware approach designed for context-aware mobile applications is the project Context-Awareness Sub-Structure (CASS), allowing for further extendibility. These are typical examples of middleware solutions and context-aware systems that have been proposed in the last decade. Modularity is partly supported in these approaches but with regard to rich extendibility during runtime, no system provides a ubiquitous “plug and play” like solution. The extensible context provisioning model described here does provide such a generic solution capable of supporting evolving applications and services in a rapidly changing mobile environment.
3 Context, Context-Awareness and Context Management Context is a form of metadata that is used to describe situations and is most often associated with a temporal event or state. The processing and manipulation of this
96
M. Knappmeyer et al.
metadata is fundamental in the design of reactive pervasive services. According to Abowd et al. [4] context can be "any information that can be used to characterise the situation of an entity (person, place, physical or computational object) that is considered relevant to the interaction between entity and application." His definition is by far the most cited in literature. Zimmermann [9] proposes five fundamental categories of context information: time, location, activity, relations, and individuality. Regarding the definition of a situation in context-aware systems, different views exist in the research community. Zimmermann defines it as “the state of a context at a certain point (or region) in space at a certain point (or interval) in time, identified by a name” [9]. Being a structured representation of a part of the context it can be compared to a snapshot taken by a camera. Location and time can be used as spatio-temporal coordinates. With regard to situation-awareness Billings [10] defines a situation as "an abstraction that exists within our minds, describing phenomena that we observe in humans performing work in a rich and usually dynamic environment." In summary, a situation may contain an infinite variety of contextual information. Machine identification of a situation is difficult but building systems that are automatically aware of situations and responding appropriately is even more of a challenge. Schilit [11] describes this system capability as being context-aware where software adapts according to the location, identities of nearby people, objects and changes to those objects. The primary goal of a context-aware application or service is to be able to change its behaviour in response to a context change. Context-aware applications, context-aware artefacts or context aware systems are aware of their environment and circumstances and can respond intelligently. Adaptation therefore is an essential element of a context-aware system. With the proliferation of wireless sensor-actuator networks there is an increasing interest in context-aware systems that make use of external (physical) context factors such as location, presence, temperature and light information and interact with the environment. This capability to sense, reason and actuate has the potential to imbue the property of awareness into almost any artefact or object. Engineering a large scale context aware system capable of scaling to the size of an urban cellular network and supporting smart urban type services and applications is a demanding challenge. There are essentially two main parts to any such context-aware system: − Context Management subsystem concerned with context acquisition and dissemination − Context Modelling concerned with manipulation, representation, recognising and reasoning about context and situations Taking into consideration the full sense-decide-actuate cycle of context-awareness then two other subsystems can be identified: − Sensor and sensor network subsystem: this will include logical as well as physical sensors − Actuation and Service Composition: Once the system/application becomes aware it adapts by actuating some device/display and or some service is automatically triggered and delivered.
A Context Provisioning Framework to Support Pervasive and Ubiquitous Applications
97
The following sections now discuss the approaches taken in the design of these functional subsystems in the C-CAST project [12] concentrating on the context provisioning aspects.
4 Context Provisioning Framework There are many research strands in the C-CAST project but the development programme is based on establishing a core context provisioning framework from which more advanced features can be added. The following sub-sections discuss these key features. 4.1 Context Representation Definition and representation is fundamental in the communicating and processing of context. The difficulty is that communicating simple context over wireless networks between constrained mobile devices requires lightweight representation whereas reasoning about situations and environments requires richer representation and models. Essentially context is metadata so any of the following model categories can be used: key-value, mark-up scheme, graphical, object oriented, logic and ontology based models [3]. For many context-based applications simple matching of context values is sufficient. However as Strang and Linnhoff-Popien [13] observe context representation for more demanding reasoning requires that the modelling approach should be able to: allow for partial validation independently of complex interrelationships; enable rich expressiveness and formalism for shared understanding; indicate richness and quality of information; not assume completeness and unambiguousness. The approach taken in this work is to define a lightweight Context Meta Language (ContextML) [14] with which to propagate and communicate basic context. More heavyweight database models and reasoning engines also make use of this mark-up scheme to send and receive context. Being based on the Extendible Markup Language (XML) ContextML is used to encode not only the context data but control messages as well. Fig. 1 presents an exemplar ContextML snippet containing the cell identifier (scope) of user (entity) michael.