Mobile Publish/Subscribe Services in Cloud Environments ... Insight Centre for Data Analytics .... analytics and processing are vital for IoT platforms integrating ...
IoT Data Management Methods and Optimisation Algorithms for Mobile Publish/Subscribe Services in Cloud Environments Ivana Podnar Žarko*, Krešimir Pripužić
Martin Serrano, Manfred Hauswirth
University of Zagreb Faculty of Electrical Engineering and Computing Department of Telecommunications Zagreb, Croatia (ivana.podnar_zarko, kresimir.pripuzic)@fer.hr
National University of Ireland Galway Insight Centre for Data Analytics (Digital Enterprise Research Institute) Galway, Ireland (matin.serrano, manfred.hauswirth)@deri.org (*corresponding author)
Abstract— Recent advances in the Internet of Things (IoT) domain for deploying IoT data systems within the cloud have generated Internet-connected silos of sensor technology which make the collection and processing of sensor-generated information more complex. A viable solution to this problem is the use of local sub-servers acting as collector’s hubs between mobile sensing devices and the cloud. Publish/subscribe mechanisms have the capacity to provide full control over the data acquisition and filtering process in mobile IoT environments as well as the methods for implementing optimisations related to energy-efficient data harvesting. The paper formulates design principles for IoT data management methods and optimisation algorithms by means of publish/subscribe middleware and linked data which span over mobile networks and cloud infrastructures to produce a coherent IoT ecosystem. Mobile sensing thus becomes a prominent feature of the OpenIoT platform 1 , the flaghship Open Source IoT middleware for services based on the automated cloud-based formulation of societies of Internetconnected objects. Keywords: Internet of Things, Cloud Computing, Mobile Sensors, Publish/Subscribe, Linked Data, Open Source.
I. INTRODUCTION The computing and communication environments are experiencing a transformation towards a unified converged environment offering various applications and services according to the utility-based model. For example, the Internet of Things (IoT) [1], with all its embedded systems and complex pervasive services, plays a crucial role in this transformation together with cloud computing [2], where there is no clear separation between the infrastructure and applications supported by the essential virtualization of services. Thus components that used to be considered exclusively as parts of the application domain are now being loosely integrated within this unified environment to support the new era of information services that rely on both fixed and mobile infrastructure. 1
www.openiot.eu EU FP7 OpenIoT Project is the winner of the Open Source Rookie of the year 2013. http://www.blackducksoftware.com/news/releases
Various definitions of the Future Internet (FI) where services and networks should be seamlessly and smoothly integrated with various service delivery models, such as the Internet-of-Services (IoS) and the associated utility computing paradigms [2] offering computing resources as a metered service, are getting a wider adoption. Similarly, the ubiquity of wearable sensors and proliferation of mobile devices with high computing capacity and a large number of built-in sensors creates a vast amount of data sources to be integrated into the FI. These data sources, known as Mobile Internet-connected Objects (MIOs) [4], continuously generate sensor data streams to be relayed through mobile devices into an IoT cloud for further processing [3]. During its life-cycle, sensor data readings undergo a series of transformations, such as data aggregation and abstraction as well as semantic enrichment, analysis and interpretation to create “actionable knowledge” [5]. Such knowledge can be actively delivered in forms of notifications and alerts to mobile devices, and act as the driving force for creating contextualized and smarter living environments. It paves the way to innovative mobile IoT applications, e.g., applications that fall within the domain of smart cities, real-time traffic monitoring, crowd sourced environmental monitoring, ambient assisted living, or social sensing. In this paper we present an open source publish/subscribe middleware solution that aspires to enable dynamic and selforganizing formulation of cloud-based applications based on mobile IoT sensor data. The middleware enables sensor discovery and mobility management alike flexible data filtering on mobile devices based on the global requirements from the cloud, enabled by the publish/subscribe mechanism. The proposed solution entitled CloUd-based PUblish/Subscribe for the Internet of Things (CUPUS) is researched and implemented in the scope of the EU cofunded FP7-287305 project OpenIoT, which designs and implements an open source middleware platform for the delivery of IoT services in a dynamic fashion and according to a utility-based model. This paper presents the main characteristics and building blocks of the CUPUS middleware which are vital for mobile resource management and optimisation. The integration of CUPUS as a module within the OpenIoT platform is also explained and assessed in a proof-of-concept smart city application.
The structure of the paper is as follows: Section II presents the main characteristics of the publish/subscribe middleware which is adequate for integrating mobile IoT environments and the cloud. Section III delves into more details about mobility aspects of Internet connected objects and optimisation techniques for energy-efficient data harvesting. Section IV specifies the CUPUS approach to the orchestration of mobiles nodes supporting wearable and built-in sensors. Section V describes the use of Linked Sensor Data to facilitate the linking and combination of the data outputs with the OpenIoT platform. Section VI describes an example application in the smarter cities domain towards the validation of the middleware framework for air quality monitoring. Finally, Section VII concludes the paper. II. THE MAIN DESIGN CHARACTERISTICS OF MOBILE IOT PUBLISH/SUBSCRIBE MIDDLEWARE Since the IoT continuously generates data which fall in the Big Data domain, solutions for efficient continuous data analytics and processing are vital for IoT platforms integrating mobile sensors. The acquired raw data needs to be pre-processed, filtered and enriched to produce information which has value to end users. What is more, the sensed information may need to be actively delivered to mobile devices in near real-time. For example, mobile IoT applications running on user mobile phones and tablets are greatly affected by frequent changes of user context which results in varying user needs for sensor-generated information. Thus all alerts and notifications delivered to mobile devices need to be relevant, both in time and space. In view of an urban crowdsourcing application where either pedestrians or cyclists use an environmental or traffic monitoring application which provides them with notifications affecting their movement throughout the city, one can conclude that the time period from sensor data acquisition until notification delivery to mobile devices needs to be extremely short. Publish/subscribe middleware offers the mechanisms to deal with the previously identified challenges: It enables selective acquisition and filtering of sensor data on mobile devices, efficient continuous processing of large data volumes within the cloud, and near real-time delivery of notifications to mobile devices. Publish/subscribe is a continuous processing and communication infrastructure for efficient and flexible data filtering as well as push-based data dissemination from data sources, i.e. publishers, to data destinations, i.e. subscribers. Data filtering and distribution is flexible because it takes into account user preferences expressed as subscriptions (or continuous queries) [6]. Although at different level and scale, both the cloud and mobile devices can act as continuous data processors that match incoming sensor data to subscriptions, and deliver matching or aggregated data to subscribers, typically processes running on mobile devices. Publish/subscribe middleware is adequate for data acquisition in mobile IoT environments where MIOs generate sensor data that are relayed through mobile devices into a data cloud [4]. The communication between publishers
and subscribers is persistent and asynchronous. This enables a subscriber to be disconnected while remaining registered, which means that messages matching the subscriber's subscriptions are saved and delivered to its mobile device as soon as it reconnects to the system. III. INTEGRATION OF MOBILE SENSORS INTO THE OPENIOT PLATFORM The OpenIoT platform enables the acquisition of sensor data from large and heterogeneous deployments through its cloud-based infrastructure according to the utility-driven service model, as depicted in Figure 1. A user can define a Sensing-as-a-Service request which formulates a specific sensor cloud for the given request, while the platform gathers and processes the data streaming from deployed sensors that are mapped to the sensor cloud. In the end of this process the produced results are delivered to the user. In case of mobile sensors, the publish/subscribe middleware is used to integrate sensor clouds spanning over mobile sensors with the OpenIoT platform.
Integrated Sensor Data Silos
Figure 1. High-Level OpenIoT General Architecture.
The publish/subscribe middleware acts as an integrator of domain silos from a data perspective, and is in charge of mobility management and data acquisition from mobile sensors, while the rest of the OpenIoT platform utilizes mobile sensors in the same fashion as static sensors. Mobility management is needed to track the current location of mobile sensors since users express their interest in sensor data by defining service requests for sensor readings at a specific location of interest. Our approach to mobility management is comparable to the one which is used in cellular networks: A geographical area is divided into location areas. A mobile sensor announces its presence in a certain area upon entry in this area since it becomes a potential data source for user requests related to the area. Obviously, the sensor also needs to announce the type of data it is able to generate, which is in accordance with the OpenIoT ontology that is explained further in Section V. The announced type of data is matched against user subscriptions, and if the future sensor data might potentially match current subscriptions, we trigger the sensor acquisition process.
The data acquisition from mobile sensors is flexible since the OpenIoT cloud has the capacity to select the sensors adequate for a user request, and choose them based on, e.g., the quality of their readings or energy levels of mobile devices that transmit sensor readings into the cloud. The publish/subscribe middleware has the capability to trigger the sensing process on mobile sensors through mobile devices by running specific processes that we call mobile brokers. Mobile brokers are capable to filter out sensor data in accordance with global needs for such data within the OpenIoT cloud, and serve as the means for optimised energy-efficient data acquisition in mobile IoT environments because the platform collects the data that is truly needed and from mobile devices with sufficient energy level.
the CPSP engine in cases when there is interest from other subscribers or the OpenIoT platform to receive sensor data published by it local publishers, a mobile broker can start or stop the corresponding sensor, or it can perform the filtering of sensor-generated data on the mobile device.
IV. THE ORCHESTRATION OF MOBILE NODES FOR THE INTERNET OF THINGS The CUPUS middleware provides readings from mobile sensors to the rest of the OpenIoT platform. To integrate them seamlessly with the OpenIoT platform, the platform offers the functionality for adding and deleting sensors, for changing their locations, and also for subscribing to sensor readings when there is interest in such data. The main components comprising the CUPUS architecture and their interactions are depicted in Figure 2. The lefthand side of this figure shows typical publish/subscribe components: publisher and subscriber interacting with the Cloud-based Publish/Subscribe Processing Engine (CPSP) engine. Publishers and subscribers are processes that can connect to and disconnect from the CPSP engine (methods connect and disconnect). Publishers can publish a publication or revoke a previously published publication (methods publish and unpublished). Subscribers can define a new subscription or cancel an existing subscription (methods subscribe and unsubscribe). The CPSP engine notifies a subscriber with a publication matching at least one of its active subscriptions (method notify). The main novelty of CUPUS compared to existing publish/subscribe solutions is the implementation of mobile brokers running on mobile devices. A mobile broker is a component running on mobile devices that is used in our architecture for sensor discovery in mobile IoT environments as well as energy-efficient and selective data acquisition from sensors attached to mobile devices. Mobile brokers perform the matching of publications generated by local publishers attached to mobile devices before they are sent to the CPSP engine. This enables the filtering of sensor data close to data sources and can suppress the redundant sensing process and data delivery to the CPSP engine. The CPSP engine is aware of all available sensors in the system as mobile brokers use the method announce to introduce sensor data types and their location. The CPSP engine can initiate the sensing process on wearable or built-in sensors by sending subscriptions matching defined data types to mobile brokers. When receiving subscribe messages from
Figure 2. CUPUS: High-level architecture.
Finally, as we can see in the right-hand side of Figure 2, the CPSP engine communicates with the OpenIoT platform via the edge intelligence server through an OpenIoT module entitled Linked Sensor Middleware (LSM-Light) which is used for storage of sensor data acquired through mobile devices to provide such readings for other OpenIoT services. In addition, the CPSP engine can receive sensor readings from the OpenIoT platform to enhance the quality of information delivered to CPSP engine subscribers.
Figure 3. CUPUS: Sequence Diagram.
Figure 3 shows an example sequence diagram depicting a potential interaction between CUPUS components. When a new sensor becomes available as it connects to a mobile broker, the mobile broker announces its presence to the CPSP engine. In case a subscription matching the announcement is received by the CPSP engine from a subscriber process residing, e.g., on another mobile device, this subscription is forwarded to the corresponding mobile broker. The subscription thus becomes the mobile broker filter. When in future the broker receives a new sensor reading which matches the
subscription, it is forwarded to the CPSP engine that in turn submits it to the adequate subscriber process. To enable integration of CUPUS with the OpenIoT platform, the CPSP engine forwards each announce message to the rest of the OpenIoT platform to either add a new sensor to the OpenIoT cloud, or to update the location of an existing sensor. Analogously, each publish messages results in a new sensor reading which is stored in the OpenIoT RDF store. V. MOBILE SENSORS AND DATA ANNOTATION The Open Geospatial Consortium (OGC) has defined a vocabulary for sensors, SensorML 2 , which has also been included into the SSN-XG ontology [7] of the W3C Semantic Sensor Network Incubator Group. The ontology provides cross-domain concepts for sensors, inspired by several domain-specific ontologies that already existed. It supports the annotation of sensor-related features such as deployment, observations and measurement capabilities, thus enabling the automation of further tasks like finegrained discovery (e.g., search for sensors which are observing wind direction with a specific accuracy level) and maintenance scheduling. Several research projects have followed the Semantic Sensor Web vision and are currently using the W3C SSNXG ontology, e.g. SENSEI 3 , the Spanish Meteorological Agency4, Sensor Masher [8] the work done by the Kno.e.sis Center 5 , CSIRO 6 and the 52 North projects 7 , SemSorGrid4Env8, and Exalted9. The representation of sensor data on the Semantic Web requires all aspects of sensors to be described consistently, i.e., sensor capabilities, physical properties, observations, network characteristics, etc. To overcome the common limitations of pre-existing XML-based formats [9] and the fragmentation of sensor ontologies into specific domains or applications, the ontology for the OpenIoT platform was extended following the two main objectives of the SSN-XG: (a) the development of ontologies for describing sensors, and (b) the extension of the Sensor Model Language (SensorML), one of the four Sensor Web Enablement (SWE) languages, to support semantic annotations. Likewise two main extensions were required in CUPUS to enable the support for semantic reasoning and querying of mobile sensor data in the OpenIoT platform. The OpenIoT ontology was extended to support mobile sensors with dynamically changing locations, and the data from mobile 2
http://www.opengeospatial.org/standards/sensorml 3 http://www.sensei-project.eu 4 http://aemet.linkeddata.es 5 http://knoesis.wright.edu/ 6 http://www.csiro.au/science/Sensors-and-networktechnologies.html 7 http://52north.org/ 8 www.semsorgrid4env.eu/ 9 http://www.ict-exalted.eu/
sensors had to be annotated. By annotating the data, we enabled structured mobile sensor readings to become instances in the OpenIoT ontology. In practice, for the annotation of mobile sensor data we reused the already available annotation layer from the OpenIoT platform implemented by the X-GSN (Global Sensor Network) module. This layer annotates the sensor readings streaming from virtual sensors, and efficiently solves the data annotation problem since mobile sensors are identical to other sensors in the OpenIoT platform. VI. IMPLEMENTATION AND VALIDATION: OPENIOT-CUPUS IN SMART CITY ENVIRONMENTS In this section a validating application for the OpenIoT platform integrating MIOs through the CUPUS module in the framework of the OpenIoT architecture is outlined. The smart city use case for air quality monitoring leverages the capabilities of the CUPUS platform in formulating societies of MIOs, managing connectivity services, measuring utility, optimizing energy consumption on mobile devices, and ultimately delivering sensor data to application services. This use case address major challenges that are not adequately confronted by the existing IoT frameworks: (a) Support for large-scale deployments in mobile IoT environments and (b) orchestration and optimization of data acquisition from mobile sensors based on utility-driven selection of MIOs. A. Smarter Cities A Smart City is a complex ecosystem composed mainly of the city-wide infrastructure with embedded computing functionality (e.g. traffic lights, security cameras, pipe network monitoring) and IT technology solutions and software systems that in conjunction with public bodies and service operators makes use of information for providing more efficient services. The ultimate goal is to optimize the operation of the city without changing dramatically the behaviour and customs of its citizens. In smart cities, citizens are supposed to use the provided city services by submitting requests to the infrastructure and they expect authoritative answers to their requests. Such request would target information that could be provided on the basis of urban sensor responses, such as meteorological information, traffic information, parking occupancy, etc., in conjunction with city maps for example. The OpenIoT platform offers the ability to automatically define and formulate requests, while at the same time provides services in a utility-based fashion. B. Air Quality Monitoring – Crowdsensing Use Case The problem of air pollution is significant in urban environments. Since the air contamination is usually location-dependent, e.g., transport junctions and industrial areas increase air pollution, the air quality should be monitored in city areas at greater granularity. This can be achieved by involving citizens in the air quality monitoring process such that they carry wearable sensors while moving through the city. Such mobile measurements can provide
support to understand urban dynamics and can put new perspectives in population-wide empirical public health research [10]. For example, it has been recognized that car drivers are highly exposed to airborne pollution, and are at risk of developing several types of cancer. The Air Quality Monitoring use case is realized as an opportunistic crowd sensing application that requires active citizen involvement.
VII.
CONCLUSIONS
The paper presents an approach to data management in mobile IoT environments. It identifies the design challenges which have guided the design of the OpenIoT publish/ subscribe module CUPUS supporting the orchestration of the data acquisition process from mobile sensors and related energy optimisation aspects for mobile IoT applications. We introduce the main characteristics of CUPUS which enables service providers to request formulation of IoT services in mobile environments. Moreover, we explain the integration of CUPUS with the OpenIoT platform, mainly its RDF store and semantic processing environment. The developed platform is assessed in the context of a smart city application for urban crowd sensing targeting environmental monitoring. ACKNOWLEDGMENTS Part of this work has been carried out in the scope of the project ICT OpenIoT Project, which is co-funded by the European Commission under seventh framework program, contract number FP7-ICT-2011-7-287305-OpenIoT. The Author(s) acknowledge the support and contributions from all partners of the OpenIoT project.
REFERENCES Figure 4. Crowd Sensing Scenario – Smart City Use Case.
The sensing process involves smartphones and air quality sensors that contribute the sensed data to the OpenIoT cloud. To support opportunistic data collection, we have developed an air quality monitoring application on top of the CUPUS middleware. The air quality monitoring application integrates the data produced by low-cost and customized mobile sensing nodes measuring temperature, humidity, CO, NO2 and SO2. Sensor readings are transmitted through an Android phone application and CUPUS middleware into the OpenIoT cloud. The acquired air quality data can be visualized either on a web application or on the phone, and is available to all interested citizens. Figure 4 depicts the mobile interface that allows a user to define subscriptions (the green rectangle marks a subscription area) and visualizes received alerts that match defined subscriptions. CUPUS allows users to subscribe to environmental data of their interest (e.g. temperature, humidity and CO levels) within a specific area of interes. Users can change or cancel their subscriptions over time. They can also start the discovery process that identifies all nearby devices with an enabled Bluetooth module. If a sensor node can be discovered, it will respond with the information about itself, and the sensor becomes a potential data source for the OpenIoT cloud. We believe that such environmental monitoring application involving active citizen participation can raise awareness about environmental factors that strongly influence human health and provide incentives to city officials to devise actions which can ensure safe and healthy living conditions to all citizens.
[1] Ovidiu Vermesan, Peter Friess (eds), “Internet of Things: Converging Technologies for Smart Environments Integrated Ecosystems”, 97887-92982-73-5, River Publishers, 2013. [2] Michael Armbrust, Armando Fox, Rean Grith, Anthony D. Joseph, Randy H. Katz, Andrew Konwinski, Gunho Lee, David A. Patterson, Ariel Rabkin, Ion Stoica, and Matei Zaharia. “Above the Clouds: A Berkeley View of Cloud Computing”. Technical Report UCB/EECS2009-28, EECS Department, University of California, Berkeley, Feb 2009. [3] Harald Sundmaeker, Patrick Guillemin, Peter Friess, Sylvie Woelfflé (eds), “Vision and Challenges for Realising the Internet of Things”, March 2010, ISBN 978-92-79-15088-3, doi:10.2759/26127, © European Union, 2010. [4] Ivana Podnar Žarko, Aleksandar Antonić, and Krešimir Pripužić. “Publish/subscribe middleware for energy-efficient mobile crowdsensing.” Proceedings of the 2013 ACM conference on Pervasive and ubiquitous computing adjunct publication (UbiComp '13 Adjunct). ACM, New York, NY, USA, 1099-1110. [5] Payam Barnaghi, Amit Sheth, and Cory Henson, "From Data to Actionable Knowledge: Big Data Challenges in the Web of Things [Guest Editors' Introduction]," Intelligent Systems, IEEE, vol.28, no.6, pp.6,11, Nov.-Dec. 2013 [6] G. Mühl, L. Fiege, and P. Pietzuch. Distributed Event-Based Systems. Springer, 2006. [7] Compton et al. “The SSN ontology of the W3C semantic sensor network incubator group”, Web Semantics: Science, Services and Agents on the World Wide Web, Volume 17, December 2012, 15708268, 10.1016/j.websem.2012.05.003. [8] Danh Le Phuoc, Manfred Hauswirth "Kerry Taylor, Arun Ayyagari, David De Roure (editors) "Linked Open Data in Sensor Data Mashups", 2nd Intl Workshop on Semantic Sensor Networks (SSN09), in ISWC 2009, Vol-522, CEUR, 2009. [9] Nikos Kefalakis, John Soldatos, Nikolaos Konstantinou, Neeli R. Prasad “APDL: A reference XML schema for process-centered definition of RFID solutions”. Journal of Systems and Software 84(7): 1244-1259 (2011) [10] H.-Y. Liu, E. Skjetne, M. Kobernus, Mobile phone tracking: in support of modelling traffic-related air pollution contribution to individual exposure and its implications for public health impact assessment, Environmental Health 12.