Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> Context-enabled applications are just emerging and promisericher interaction by taking environmental context into account.However, they are difficult to build due to their distributednature and the use of unconventional sensors. The concepts oftoolkits and widget libraries in graphical user interfaces has beentremendously successtil, allowing programmers to leverage offexisting building blocks to build interactive systems more easily.We introduce the concept of context widgets that mediate betweenthe environment and the application in the same way graphicalwidgets mediate between the user and the application. We illustratethe concept of context widgets with the beginnings of a widgetlibrary we have developed for sensing presence, identity andactivity of people and things. We assess the success of ourapproach with two example context-enabled applications we havebuilt and an existing application to which we have addedcontext-sensing capabilities. <s> BIB001 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> The most precious resource in a computer system is no longer its processor, memory, disk, or network, but rather human attention. Aura aims to minimize distractions on a user's attention, creating an environment that adapts to the user's context and needs. Aura is specifically intended for pervasive computing environments involving wireless communication, wearable or handheld computers, and smart spaces. Human attention is an especially scarce resource in such environments, because the user is often preoccupied with walking, driving, or other real-world interactions. In addition, mobile computing poses difficult challenges such as intermittent and variable-bandwidth connectivity, concern for battery life, and the client resource constraints that weight and size considerations impose. To accomplish its ambitious goals, research in Aura spans every system level: from the hardware, through the operating system, to applications and end users. Underlying this diversity of concerns, Aura applies two broad concepts. First, it uses proactivity, which is a system layer's ability to anticipate requests from a higher layer. In today's systems, each layer merely reacts to the layer above it. Second, Aura is self-tuning: layers adapt by observing the demands made on them and adjusting their performance and resource usage characteristics accordingly. Currently, system-layer behavior is relatively static. Both of these techniques will help lower demand for human attention. <s> BIB002 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> The paper discusses the Gaia metaoperating system which extends the reach of traditional operating systems to manage ubiquitous computing habitats and living spaces as integrated programmable environments. Gaia exports services to query, access, and use existing resources and context, and provides a framework to develop user-centric, resource-aware, multidevice, context-sensitive, and mobile applications. <s> BIB003 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> Mobile devices, such as mobile phones and personal digital assistants, have gained wide-spread popularity. These devices will increasingly be networked, thus enabling the construction of distributed applications that have to adapt to changes in context, such as variations in network bandwidth, battery power, connectivity, reachability of services and hosts, etc. In this paper, we describe CARISMA, a mobile computing middleware which exploits the principle of reflection to enhance the construction of adaptive and context-aware mobile applications. The middleware provides software engineers with primitives to describe how context changes should be handled using policies. These policies may conflict. We classify the different types of conflicts that may arise in mobile computing and argue that conflicts cannot be resolved statically at the time applications are designed, but, rather, need to be resolved at execution time. We demonstrate a method by which policy conflicts can be handled; this method uses a microeconomic approach that relies on a particular type of sealed-bid auction. We describe how this method is implemented in the CARISMA middleware architecture and sketch a distributed context-aware application for mobile devices to illustrate how the method works in practice. We show, by way of a systematic performance evaluation, that conflict resolution does not imply undue overheads, before comparing our research to related work and concluding the paper. <s> BIB004 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> User/terminal mobility during service provisioning and high heterogeneity of wireless portable devices identify novel challenges for service delivery in ubiquitous pervasive environments. An emerging architecture solution in the wireless Internet is to have middleware components (mobile proxies) over the fixed network that follow the movements and act on behalf of the limited wireless clients. It is crucial that mobile proxies have full visibility of their context, i.e., the set of available and relevant resources depending on access control rules, client location, user preferences, privacy requirements, terminal characteristics, and current state of hosting environments. The paper presents the design and implementation of a context-centric access control middleware, called COSMOS, for the wireless Internet. COSMOS dynamically determines the contexts of mobile proxies, and effectively rules the access to them, by taking into account different types of metadata (user profiles and system/user-level authorization policies), expressed at a high level of abstraction and cleanly separated from the service logic. The paper also shows how COSMOS facilitates the development of articulated access control strategies in the case study of a context-dependent movie-info service deployed over IEEE 802.11 network localities. <s> BIB005 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> The advancement of wireless networks and mobile computing necessitates more advanced applications and services to be built with context-awareness enabled and adaptability to their changing contexts. Today, building context-aware services is a complex task due to the lack of an adequate infrastructure support in pervasive computing environments. In this article, we propose a Service-Oriented Context-Aware Middleware (SOCAM) architecture for the building and rapid prototyping of context-aware services. It provides efficient support for acquiring, discovering, interpreting and accessing various contexts to build context-aware services. We also propose a formal context model based on ontology using Web Ontology Language to address issues including semantic representation, context reasoning, context classification and dependency. We describe our context model and the middleware architecture, and present a performance study for our prototype in a smart home environment. <s> BIB006 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> A new smart meeting room system called EasyMeeting explores the use of multi-agent systems, Semantic Web ontologies, reasoning, and declarative policies for security and privacy. Building on an earlier pervasive computing system, EasyMeeting provides relevant services and information to meeting participants based on their situational needs. The system also exploits the context-aware support provided by the Context Broker Architecture (Cobra). Cobra's intelligent broker agent maintains a shared context model for all computing entities in the space and enforces user-defined privacy policies. <s> BIB007 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> Among the difficulties faced by designers of mobile context-aware applications is the increased burden of having to deal with context and also the processing and memory constraints of small mobile computers. Although progress has been made in the area of frameworks and toolkits for contextawareness, there is still a need for middleware that supports higher-level context abstractions and is both flexible and extensible in its treatment of <s> BIB008 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> We present a context-aware middleware for mobile multimedia applications. The middleware offers functionality for service discovery, asynchronous messaging, publish/subscribe event management, storing and management of context information, building the user interface, and handling the local and network resources. It supports a wide range of context information including location, time, and user's preferences. Further, it allows controlling the connectivity of the device; the middleware is capable of switching traffic from one network connection to another. It can locate the services and software components as well. It facilitates development of multimedia applications by handling such functions as capture and rendering, storing, retrieving and adapting of media content to various mobile devices. The middleware offers facilities for media alerts, which are multimedia messages that are generated when predefined context is recognized. With these capabilities, it enables development of complex context-aware multimedia applications for mobile devices. <s> BIB009 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> Understanding user mobility is critical for simula- tions of mobile devices in a wireless network, but current mobility models often do not reflect real user movements. In this paper, we provide a foundation for such work by exploring mobility characteristics in traces of mobile users. We present a method to estimate the physical location of users from a large trace of mobile devices associating with access points in a wireless network. Using this method, we extracted tracks of always-on Wi-Fi devices from a 13-month trace. We discovered that the speed and pause time each follow a log-normal distribution and that the direction of movements closely reflects the direction of roads and walkways. Based on the extracted mobility characteristics, we developed a mobility model, focusing on movements among popular regions. Our validation shows that synthetic tracks match real tracks with a median relative error of 17%. <s> BIB010 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> As ubiquitous systems become increasingly complex, traditional solutions to manage and control them reach their limits and pose a need for self-manageability. Also, heterogeneity of the ubiquitous components, standards, data formats, etc, creates significant obstacles for interoperability in such complex systems. The promising technologies to tackle these problems are the Semantic technologies, for interoperability, and the Agent technologies for management of complex systems. This paper describes our vision of a middleware for the Internet of Things, which will allow creation of self-managed complex systems, in particular industrial ones, consisting of distributed and heterogeneous components of different nature. We also present an analysis of issues to be resolved to realize such a middleware. <s> BIB011 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> Recent advances in portable client devices are enabling new scenarios where mobile users assume to continuously access to various services, such as email, printing, and social computing applications, by opportunistically exploiting any computing resource and any wireless connectivity possibility encountered during their roam. That requirement calls for suitable context-aware middlewares capable of retrieving and using context data to personalize service provisioning. However, existing solutions still exhibit very limited support for context data management and distribution, especially in wide-scale and highly heterogeneous systems. The paper proposes a novel context-aware middleware to achieve scalability in context data dissemination. The primary design guideline is to reduce context data traffic by using a hierarchical distributed architecture and pervasive physical/logical caching techniques. To validate our design choices, we exploited our context-aware middleware to realize an advertisements service and a service discovery facility in our university campus. Obtained performance results demonstrate that our solution positively affects system scalability and average context dissemination time. <s> BIB012 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> This paper describes the Context Awareness Framework developed for the HYDRA Middleware Project. The HYDRA project aims to develop middleware to support intelligent networked embedded system based on a service-oriented architecture, deployable on both new and existing networks of distributed wireless and wired devices. A well developed Context Awareness Framework (CAF) is crucial for the success of such intelligent networked systems. Changing requirements and dynamic environments are drivers for context-aware applications. The automatic execution of system adaptations leads to a successful and effective information and communication system that provides information and functionality that is relevant and at the right level of complexity with respect to the current situation. This paper elaborates on the various issues involved in the design and development of a Context Awareness Framework for an intelligent networked embedded system. <s> BIB013 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> Human activity recognition is a challenging problem for context-aware systems and applications. Research in this field has mainly adopted techniques based on supervised learning algorithms, but these systems suffer from scalability issues with respect to the number of considered activities and contextual data. In this paper, we propose a solution based on the use of ontologies and ontological reasoning combined with statistical inferencing. Structured symbolic knowledge about the environment surrounding the user allows the recognition system to infer which activities among the candidates identified by statistical methods are more likely to be the actual activity that the user is performing. Ontological reasoning is also integrated with statistical methods to recognize complex activities that cannot be derived by statistical methods alone. The effectiveness of the proposed technique is supported by experiments with a complete implementation of the system using commercially available sensors and an Android-based handheld device as the host for the main activity recognition module. <s> BIB014 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> Advances in wireless and sensing technology and the proliferation of context-aware systems have highlighted the requirement to reduce the complexity of system development by establishing a middleware framework of context management. The middleware aims to manage different aspects of context and location management as well as situation reasoning and other related tasks. In this paper, a middleware framework of context management and situation reasoning in MANET environment is proposed. It includes components to model and reason about contexts and situations, to construct location models and estimate the relevance of contexts used for situation reasoning. We also incorporate On-Demand Multicast Routing Protocol (ODMRP) as the underlying messaging protocol among the collaborative hosts to deal with MANET communication issues. We discuss implementation and experimentation issues of the framework in personal digital assistance (PDA) devices which form the ad hoc network as proof-of-concept of the framework. Our preliminary implementation and experimentation shows the capability of the framework to work in such limited devices and to perform the designed capabilities of the middleware <s> BIB015 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> A new context management framework, which supports the interaction between different domain context managers, is proposed. Two different context producer-consumer patterns are defined to support context-aware applications. To deal with the mobile entity problem in cross-domain context sharing, a transparent query mechanism that enables applications to obtain context information about mobile entities from remote domains is presented. The capability of our framework is demonstrated through a user scenario. <s> BIB016 </s> Context-Awareness for Mobile Sensing: A Survey and Future Directions <s> D. Context-Aware Middleware <s> The phrase Internet of Things (IoT) heralds a vision of the future Internet where connecting physical things, from banknotes to bicycles, through a network will let them take an active part in the Internet, exchanging information about themselves and their surroundings. This will give immediate access to information about the physical world and the objects in it--leading to innovative services and increase in efficiency and productivity. This paper studies the state-of-the-art of IoT and presents the key technological drivers, potential applications, challenges and future research areas in the domain of IoT. IoT definitions from different perspective in academic and industry communities are also discussed and compared. Finally some major issues of future research in IoT are identified and discussed briefly. <s> BIB017
The growing deployment of sensor technologies in smart devices and innumerable software applications utilizing sensors to sense the surrounding physical environment in order to offer a wide range of user-specific services have led the creation of a layered system architecture (i.e., context-aware middleware). In this way, the desired architecture can response effectively for optimal sensor utilization, large sensory data acquisitions as well as meeting ever-increasing application requirements, leveraging the pervasive context-processing software libraries, and considering mobile device resource constraints. Due to the ubiquity of these computing devices in a dynamic environment where the sensor network topologies actively change, it yields applications to behave opportunistically and adaptively with no initial assumptions in response to the availability of diverse resources in physical world, and also to scalability, modularity, extensibility and interoperability of heterogeneous physical hardwares BIB017 . As shown in Fig. 3 , within the ISO/OSI Reference Model, a conventional middleware takes place of the Session and Presentation Layers by providing a higher level of abstraction built over the network operating systems (OS), offering fault tolerant resource sharing, and masking out the problems to facilitate heterogeneity, stability and efficiency of distributed systems. On the other hand, the context-aware middleware is defined as an abstract layer between OS and up-running applications. It aims at dealing with the heterogeneity of physical world through edge technology, by adding more specialized mechanisms and services than an OS can provide. It is capable of wrapping (i.e., controlling physical devices and interacting with them to receive data), analyzing and delivering the physical world information (e.g., through sensor networks, embedded systems, RFID or NFC tags, etc.) to the application services in a transparent way, as shown in Fig. 4 . This degree of transparency separates the application layer from the internal middleware operations and from the detailed implementations of lower layers directly. In essence, the middleware creates a shielded interface by both enhancing the level of abstraction support needed by the application, and intending to hide lower layer operations between the physical layer (i.e., hardware and communications) at the bottom and the application layer at the top. Furthermore, it allows the computational burden required for context management to shift from the application to the middleware by letting the developers only deal with implementation logic, and easily control the created entities (i.e., characterized context) by context management. In this regard, robust optimization in many system constraints (e.g., relative computational cost associated with entity relevant operations, limited battery power, insufficient information storage etc.) can be achieved. Moreover, the middleware will take the responsibility of all context-related entity management, and provide a complete global access into common resources needed by all applications residing on the same host without any conflict BIB010 ,  . Fig. 4 also depicts the core components within the contextaware middleware design. Context Manager is responsible for collecting, processing and maintaining low-level context information (i.e., physical context) acquired through context sources. Basically, it converts low-level information to a highlevel event (i.e., sensed context), handles context dissemination and inconsistency detection, and notifies the adaption manager of the high-level event. Adaptation Manager queries, processes and regulates all contextual information/objects (i.e., inferred context) actively being used by each application, and also automatically receives a context change in case where a different context is observed due to the heterogeneity of context sources. In addition, it filters unnecessary information to have an optimal and effective result based on current context together with inclination or preference of user activity. Application controller has the highest-level context (i.e., presumed context) obtained through inter-working with the adaptation manager. It processes the final context and sends attribute information back to the context manager. Most importantly, the application controller does not have to interact with context sources, and even it does not know what context coming from which context sources at any time. It is also worth noting that semantic metadata plays an important role in context-aware middleware, since it is defined at a high level of abstraction to represent contexts as structure and meaning of entities, and also to present context-related adaptation strategies, which enable the middleware to behave dynamically with a minimal human intervention. Having semantic metadata allows unambiguously specification of context models and knowledge share among entities without loss of meaning. Thanks to its interoperability and openness, it also allows to infer some other complex knowledge at the upper layers in presence of variant semantic metadata. However, the complexity of context resources in heterogeneous physical world, and also interactions among diverse context resources make it difficult to describe the relevant metadata explicitly. Other properties supported by the context-aware middleware include: • It either runs standalone for managing entire physical environments or accept the existence of an infrastructure which can deliver required services. This differentiation is caused by heterogeneous sensing environment. • It can have a reflective property that represents the obtained entities through context as semantic metadata. The metadata may belong to application, middleware itself, a context, or interconnected contexts (i.e., composition). Note that a context can differ (e.g., asynchronously obtainable over different sensors), and inter-operate with other contexts. This reflection property allows the middleware to monitor its computation and detects a possible change in the semantic world, allowing the middleware model itself self-represented. For example, manipulation of its behavior may be changed. Hence, any change occurred at the meta-level can affect the underlying base level, or vice versa. • Adaptation is an important design merit that empowers users to customize systems according to individual preferences. This adaptation is defined by an autonomous process triggered by a set of requirements to improve quality of service (QoS) at the application layer. It intends to sense the physical world, reason the obtained context, and react dynamically toward the changing context. It also supports proactive adaptations that describe the capability to envision future application requirements caused by the context change, and to adjust the functionality accordingly to prevent/minimize direct application interaction with neither interfering nor modifying the application logic. • It may constitute entities from physical/virtual context for all types of applications, or it can provide an application specific information delivery (i.e., service provider). • It must run smoothly with the underlying OS. Since mobile applications run on a resource limited devices with low memory size, slow CPU frequency, and low power supply, light-weight middleware systems need to be designed. A middleware for context-awareness supports the application development task by enhancing the level of abstraction and providing services in dealing with context. By this means, there are many middleware studies in the literature. The notable ones are listed in the followings, and compared in Table II. • Context Toolkit BIB001 is one of the earliest efforts in this domain. It delivers a combination of features and abstractions to capture and manage context source, and also to aggregate and share them among applications. • Aura BIB002 is an architectural ubiquitous sensing framework. It provides context, application and task managements. Tasks are abstract representations of a collection of services. The framework detects environment changes, and migrates task operations into available service providers in the new environment. It is capable of adapting in the presence of dynamic resource variability, thereby it supports continuity of service for applications. • CARISMA BIB004 provides a reflective middleware for mobile systems. It is also adaptive to dynamic environment changes. The tasks in context providing services are prioritized and resolved depending on importance ruled by applications, policies, and configurations under different environmental and user conditions. • Gaia BIB003 is a distributed probabilistic based contextaware middleware that coordinates ontology based software entities and heterogeneous physical networking devices. It provides context management, detection of events, workload partitioning event handling, and virtual context file management. • SOCAM BIB006 is a service oriented ontology based context-aware middleware. It supports semantic representation and reasoning of context. It also divides context into upper and lower level ontologies such as interpreted context through physical world, and memory and battery status respectively. It allows adaptability by listening, detecting and invocating events for application services. • COSMOS BIB005 is a context-aware middleware that accepts contextual information as a context node, and organized many context nodes in a hierarchical structure. Each context node runs independently while collecting, processing and reasoning context. The middleware follows this distributed architectural model to create scability by supporting many heterogeneous contextual sources, and their relations to each other. • CoBrA BIB007 is a centralized middleware architecture that connects various context brokers. Each context broker runs independently, but the middleware creates a knowledgeable context network share. The middleware also addresses resource limitation and privacy issues in mobile computing. • Hydra BIB013 is an IoT based middleware design to deliver solutions to wireless devices and sensor used in ambient awareness. It contains powerful reasoning toward various context sources including physical device based, semantic and abstract layer based. Therefore, it uses hybrid modeling scheme to represent low level context by object oriented modeling with key based approach, and high level context by ontologies. • CASS BIB008 is a centralized middleware for context-aware mobile applications. Mobile clients connect to the middleware service through wireless network, and the middleware listens sensors on mobile clients, and gathers information. • COSAR BIB014 is a context sharing architecture for mobile network services. It reasons human activity based contextawareness. • QoSDREAM BIB009 is a component based middleware framework for the construction and management of context-aware multimedia applications. It also provides handling of location data derived from a variety of location-sensing technologies. • Ubiware BIB011 is a self-managed middleware platform that utilizes different context agents in decentralized manner to manage mobility and scalability, enable autonomous context discovery, and configure complex functionalities such as composition and interoperability of relations among agents. Therefore, the middleware plans to create a collaboration among heterogeneous sources through semantic communication services. • SALES BIB012 and CoMiHoc BIB015 are mobile environment based middleware platforms that support context management and situation reasoning through interconnection of various mobile devices. • TinyRest  and Feel@Home BIB016 create an IoT based smart offices/homes by actuating wireless sensor networks through Internet connection. They act like a gateway to access different types of sensors and actuators, and fuse them to be able to support diverse application domains. Like noted in Table II , the middleware design can accept different architectural structures. Centralized architecture, i.e. context server, offers a complete middleware design, and allows applications to be developed on top of it. The architecture connects to sensors and devices to provide rich resources and computational power. Communications among devices are handled by queries on the context server. The drawback for this type of middleware could stem from congestion of received queries. Stand-alone, or self-contained, architecture offers a direct access to sensors, but it does not allow context sharing of devices, connection to external services, or any type of device collaboration. It is ideally designed for small-scale solutions. Distributed architecture creates a hierarchical topology of connected many devices running independently and also having capable of their own context management services. It does not require the existence of a context server. Physical devices are connected through ad-hoc communication for information sharing, but the architecture lacks of processing computationally intensive resources. Component based architecture partitions entire middleware solutions on a few major components that interact each others. There are also some other design types available for middleware architecture such as node or clientserver based. On the other hand, privacy issue arises when user related contexts are collected, used and shared autonomously. Therefore, many middleware designs try to secure the context by making queries as in who controls what information out of context. Basically, they introduce the concept of context ownership to determine which application needs to be granted or to be denied to access on a specific concept. 