Paper Title Authors Name/s per 1st Affiliation Authors Name/s per 2nd Affiliation Department name Name of organization City, Country E-mail address Department name Name of organization City, Country E-mail address Abstract—Abstract. Keywords—Internet ecosystem; EcoDiF I. of Things; physical devices; IoT INTRODUCTION Introduction. II. ECODIF: A WEB ECOSYSTEM OF PHYSICAL DEVICES IoT environments are typically characterized by a high degree of hardware and software heterogeneity, several devices with different capabilities/functionalities, large amount of network protocols, incompatible applications, and proprietary solutions that are hard to manage. Furthermore, the wide dissemination of the IoT paradigm has the potential of producing a considerable impact in the daily lives of the human beings, so that new applications from several domains and that are based on interacting physical devices and engaged in complex relationships arise. Given such scenario, it is necessary to provide abstractions for physical devices and services to applications and end-users, as well as means to manage the interoperability between such heterogeneous devices. In this context, our recent work [1] has introduced EcoDiF (Web Ecosystem of Physical Devices) [2], which is a Web platform for connecting devices with applications and/or endusers in an IoT ecosystem [3] in which new ideas and products can be developed in an organic way. Therefore, the main goal of EcoDiF is to integrate heterogeneous physical devices in order to provide services for supporting real-time data control, visualization, processing, and storage, and also to enable their use in several application domains, such as environmental monitoring, public urban infrastructure monitoring, health care, prevention of environmental disasters, etc. The applications are built as Web mashups [8] by using data (feeds) provided by several sources and available at EcoDiF and also using other resources from the Web. A. Architecture and Implementation In order to achieve its goals, EcoDiF defines several modules (middleware services) that compose its logical architecture, as illustrated in Fig. 1. Fig. 1. EcoDiF architecture. The Devices Connection Module aims to facilitate the connection of physical devices. In this perspective, device manufacturers can configure their devices according to the EcoDiF’s specific API to enable their integration with the platform, as well as users can connect their pre-configured devices to perform the operations of the provided API. Such devices are connected to EcoDiF through customized drivers developed for each specific device. These drivers play a very important role in terms of the integration of the devices with EcoDiF since the heterogeneity of such devices is abstracted away from the users and applications that make use of the data provided by them. Such transparency and interoperability are the main essential requirements for middleware platforms in the context of the IoT paradigm and consolidates one of the EcoDiF’s main goals. Therefore, EcoDiF is able to provide a unified access to data and services provided by the integrated devices through high-level interfaces, besides contributing to make the development of applications easier in the highly distributed and heterogeneous IoT environments. Furthermore, the complexity of the devices and the underlying network environment are hidden from applications and users, thus releasing them from the task of explicitly manipulating infrastructure protocols and services. Once the respective drivers enable the connection between EcoDiF and the integrated devices, these drivers obtain the data collected by the devices (the so-called feeds) and structure them by using the EEML (Extended Environments Markup Language) protocol [4], which is a XML-based language that describe the data obtained from devices in a specific context (environment). Afterwards, such structured data are sent to EcoDiF through HTTP PUT requests according to the REST (REpresentational State Transfer) architectural style [5, 6] in order to be registered by the Data Manipulation Module. The Visualization and Management Module provides a Web interface to enable users to manage the devices connected to EcoDiF. Through this interface, users can: (i) monitor the state and the localization of their devices; (ii) create alerts and notifications (the so-called triggers) about the feeds, and; (iii) visualize historical data stored in the platform. In turn, the Collaboration Module aims to facilitate the collaboration among EcoDiF users, thus enabling them to perform searches for devices and applications from their respective metadata (type, user, localization, etc.) through the EcoDiF’s Web interface. The Storage Module consists of two basic repositories: (i) a repository for storing data by using a relational database, and; (ii) a repository for storing application scripts in a file system. It is important to highlight that these repositories may use a Cloud Computing infrastructure [7] to store relational data and files, thus providing quality attributes such as robustness, reliability, security, availability, and scalability. The Common Services Module aggregates mechanisms inherent to the platform, such as security (in terms of user authenticity, confidentiality, and integrity), applications life cycle, transactions, etc. Finally, the Applications Module is intended to provide a model and environment for programming and executing applications that make use of the data (feeds) available at EcoDiF and generate new information to be available at the platform. In EcoDiF, these applications are built as Web mashups [8], which are ad-hoc Web applications created from the composition of different types of information provided by several sources. For instance, a sensor monitors the temperature in a given location, but the user wishes to combine this information with a map that informs the localization of the collected measures. Therefore, a single mashup application can compose such temperature and localization information. For developing applications, EcoDiF adopts the EMML (Enterprise Mashup Markup Language) language [9], which is an open XML-based language for developing Web mashup applications from by integrating data from several sources, as well as from Web services and relational databases. Given the features of its modules, EcoDiF envisions four profiles of stakeholders (as depicted in Fig. 1), namely: (i) device manufacturers, which develop drivers to their devices in order to make them compatible with the EcoDiF’s API; (ii) data providers, which are device owners that make the data produced by their devices available at EcoDiF through the specific drivers for each device; (iii) application developers, which build Web applications or services that take as inputs data (raw data provided by the connected devices or more refined data produced as output of other applications) available at EcoDiF or produced by any other Web accessible resource, for their business purposes, and; (iv) data consumers, which are users that interact with EcoDiF in order to consult information (about devices and provided data, applications, etc.) that is available at the platform. III. VALIDATION CASE STUDIES In order to validate our platform and verify its potential for integrating heterogeneous devices and enabling data control, visualization and processing, we have developed some proofof-concept applications in different scenarios. The next subsections describe such applications. A. Participatory Sensing The broad proliferation of mobile devices with Web capabilities have enabled to collect information about the environment, weather, traffic, people, etc. over large areas for little incremental cost [10]. In this perspective, the Participatory Sensing concept [11] emerged as means to retrieve such information by emphasizing the involvement of users as active players for providing these data, which may range from private personal observations to the combination of data from hundreds, or even thousands, of individuals about where they live, work, and play [12]. Through wireless and/or mobile networks, participants scattered across a given place, city, or even the world, can easily send data to servers that process them and integrate them with other data, e.g. GIS map layers and weather reports. Participatory Sensing has shown to be very useful in several scenarios, such as transportation planning, public health maintenance, environmental sustainability, etc. In the context of private planning, which can be viewed as a Participatory Sensing scenario, there is the need of estimating the presence of public (people) in given areas in order to better provide resources to them. In a conference, for example, it may be interesting to address how many participants have attended to workshops, tutorials, etc. or issues related to the appropriate levels for environmental parameters (e.g. temperature, lightness, noise). Under this scenario, we have exploited geolocation capabilities of mobile devices (such as smartphones and tablets) in order to provide the localization of the respective users in given areas within a scientific conference in a building. For experimental purposes and given the devices integration capabilities provided by EcoDiF, we have developed a driver for the Android operating system installed on the mobile devices. Such driver was responsible for: (i) collecting the localization information; (ii) structuring it in EMML, and; (iii) sending it to EcoDiF through a HTTP PUT request. As a result, a presence map application retrieves the localization information registered at EcoDiF and displays the number of attendees that have checked in the sessions of the conference (rooms A and B), as shown in Fig. 2. B. Data Processing Centers Monitoring In data processing centers (DPCs), it is necessary to monitor assets and then notify the stakeholders (managers) when possible abnormalities in the operations arise. Besides the assets and the logical infrastructure of the DPC, it is also necessary to monitor variables related to the physical infrastructure, such as temperature, air humidity, electric power consumption, etc. However, sometimes the employed monitoring solutions in this scenario are not systematized and are unintegrated, so that managers (the main stakeholders in this scenario) typically need to use generic-purpose software or specific proprietary software for each device by explicitly accessing them. Moreover, due to the lack of integration among the existing monitoring solutions, they are not able to have a systemic view about the real situation of the DPC and its physical structure and constituent assets. As illustrated in Error! Reference source not found., EcoDiF can enable the integration of such devices and the data provided by them and make them available to the users through the Web. Therefore, the DPC managers can control what is happening in the ambient and can be notified (through e-mail or messages sent to their mobile devices, for example) about meaningful events. In this scenario, the assets are usually managed by using the SNMP (Simple Network Management Protocol) protocol, which is an application-layer protocol used to manage devices in a network that enable to collect several information about such devices through OIDs (object identifiers) defined in their MIB (Management Information Base). In order to integrate such devices to EcoDiF and make the collected data available, we have developed a driver to the SNMP protocol to: (i) obtain the information through the SNMP protocol with the respective OID and the devices’ IP address; (ii) structure such data in EEML, and finally; (iii) send the information to EcoDiF through a HTTP PUT request. Furthermore, we have developed a mashup application by using the EMML language in order to aggregate information (as feeds) from switches at the UFRN’s DPC (Natal, Brazil). This application performs requests to EcoDiF to obtain such data and displays them to the users through the EcoDiF’s Web interface, thus enabling the users to follow the state of several variables regarding the devices at the UFRN’s DPC at real time. Fig. 3 shows a screenshot of the application that monitors a H3C switch at the UFRN’s DPC. The EcoDiF’s Web interface shows several real-time data regarding this switch, such as temperature, CPU usage, and measures collected from network interfaces. C. Gas Pipeline Monitoring The third application aimed to demonstrate the use of EcoDiF in a real-world scenario, in which the gas flow in a pipeline at Rio de Janeiro (Brazil) is monitored at real-time through EcoDiF. Similarly to the applications presented at the previous subsections, we have developed a driver for Dialog 3GTM Universal sensors, which were used for collecting data regarding the gas flow at the pipeline. After collecting such data, the drivers structure them in EEML and send them to EcoDiF at real-time, so that users can visualize the last measures collected by such sensors at the EcoDiF’s Web interface and also be notified when abnormal conditions are detected, e.g. in cases when the measured values indicate a possible gas leak in the pipeline. Fig. 4 shows historical and current data of gas flow in a pipeline at Rio de Janeiro collected by Dialog 3G Universal sensors and sent to EcoDiF. IV. DISCUSSION From the developed proof-of-concept applications, it was possible to observe the clear potential of EcoDiF for managing any sort of device, thus enabling the easy visualization and control of the data provided by them at real time and making EcoDiF a very useful tool for monitoring activities. Moreover, due to the device integration capabilities provided by EcoDiF, it is possible to develop applications that are able to use data provided by several heterogeneous devices anywhere. In this perspective, we can conclude that the range of applications and real context that can benefit from the functionalities provided by EcoDiF is very broad, with contributions with respect to applied research, industry, and society. For instance, the combination of remote sensing for monitoring with alert and action mechanisms can be enabled by EcoDiF in order to notify authorities and citizens about imminent disasters or take the appropriate actions for avoiding such event, as in the case of the gas pipeline monitoring application presented in Section III.C. Furthermore, as we have already discussed, another important issue is related to the production of large amounts of data from several heterogeneous devices, so that EcoDiF can work as a platform that is able to integrate such devices and easily make the data provided by them available for users and applications. V. DISCUSSION Recent work in the literature has pointed out that middleware platforms are able to provide transparency and interoperability capabilities, as well as multiple services for users and applications in highly distributed and heterogeneous IoT environments [13]. There are several research works that address the conception and implementation of IoT middleware platforms in order to address: (i) the interoperability between heterogeneous devices in several application domains; (ii) adaptation and context-awareness of applications; (iii) dynamic discovery of devices, and; (iv) issues related to the management of massive data, privacy, security, and scalability in the IoT context [14]. In this section, we briefly present some infrastructures for IoT in terms of the integration of heterogeneous devices and composition of applications that take advantage of such integration. Most of them is has not been achieved a mature state and the proposed solutions are still in development. The OpenIoT Project [15] aims to develop an open-source middleware for IoT applications in a Sensing as a Service model, which is available at a cloud environment and can be transparently accessed and configured by the users. OpenIoT connects sensors with the cloud environment, so that the cloud resources can be used for data processing and management, which are useful functionalities that usually cannot be performed at the IoT infrastructure because the resources are limited. In turn, the LinkSmart Project (former Hydra) [16] proposes a service-oriented middleware for embedded systems that supports the development of applications composed of heterogeneous physical devices. Such middleware provides interfaces based on Web services for controlling any kind of physical device and enables developers to incorporate physical devices into their applications. Xively [17] (former Pachube and Cosm) is a cloud-based IoT platform for managing data provided by devices. It provides a RESTful API for directly sending data from the sensors, enables to visualize historical data, and provides mechanisms to trigger events based on the acquired sensing data. In Xively, data are hierarchically organized in terms of feeds, datastreams, and datapoints. As in EcoDiF, feeds represent the environment data with its respective datastreams, which represent the data provided by the sensors, whereas datapoints represent a specific value of a datastream at a given time. In addition, the data available at Xively can be retrieved in the JSON, XML (more specifically, EEML), and CSV formats. Finally, RestThing [18] is a REST-based Web service infrastructure intended to abstract away the heterogeneity of physical de-vices and provide a way to integrate devices embedded in Web applications. RestThing platform enables developers to create REST-based applications by combining physical and Web re-sources so that the devices and information are both represented as resources and manipulated through a uniform RESTful interface, thus enabling accessing them by using the conventional operations defined in the HTTP protocol. In addition, the accessed information can be retrieved in JSON, XML and CSV formats. Table I summarizes the main features of the IoT middleware platforms described in this section and a comparison with the features available at EcoDiF. As can be observed in Table I, all of these proposals have several features in common with EcoDiF mainly in terms of the integration and interoperability among heterogeneous physical devices. However, only EcoDiF enables to build applications by using the mashups technology, which is appropriated for the IoT paradigm [8]. In this sense, EcoDiF is the first initiative that tackles the complexity associated for programming loosely couples, opportunistic applications in the IoT context whose components interact and depend upon each other in an unpredictable way. TABLE I. COMPARATIVE TABLE BETWEEN ECODIF AND EXISTING IOT MIDDLEWARE PLATFORMS. Features REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] IoT middleware platforms OpenIoT LinkSmart Devices management Xively RestThing EcoDiF [14] [15] Web mashups Security and privacy [16] [17] [18] Interoperability Semantic description VI. FINAL REMARKS Final remarks. ACKNOWLEDGEMENTS This work is supported by the Brazilian Education and Research Network (RNP) through the GT-EcoDiF Working Group. F. Delicato et al. “Towards an IoT ecosystem”, Proc. of the First Int. Workshop on Software Engineering for Systems-of-Systems. New York, NY, USA: ACM, 2013, pp. 25-28. EcoDiF: http://www.ecodif.com.br O. Mazhelis, E. Luoma, and H. Warma, “Defining an Internet-of-Things ecosystem”, in Internet of Things, Smart Spaces, and Next Generation Networking, S. Andreev, S. Balandin, and Y. Koucheryavy, Eds. Lecture Notes in Computer Science, vol. 7469. Germany: SpringerVerlag Berlin/Heidelberg, 2012, pp. 1-14. Extended Environments Markup Language: http://www.eeml.org/ R. Fielding, Architectural styles and the design of network-based software architectures, PhD Dissertation. University of California-Irvine, USA, 2000. J. Webber, S. Parastatidis, and I. Robinson, REST in practice: Hypermedia and systems architecture. Sebastopol, CA, USA: O’Reilly, 2010. Mell, P. and Grance, T., The NIST Definition of Cloud Computing, Technical Report. Gaithersburg, MD, USA: National Institute of Standards and Technology, 2011. D. Guinard et al., “Towards physical mashups in the Web of Things”, Proc. of the 6th Int. Conf. on Network Sensing Systems. Piscataway, NJ, USA: IEEE Press, 2009, pp. 196-199. OMA EMML Documentation: http://www.openmashup.org/omadocs/v1.0/index.html J. Goldman et al., Participatory Sensing: A citizen-powered approach to illuminating the patterns that shape our world, White Paper. Washington, DC, USA: Woodrow Wilson International Center for Scholars, 2009. J. Burke et al,, “Participatory Sensing”, Proc. of the First Workshop on World-Sensor-Web: Mobile Device Centric Sensory Networks and Applications. A.T. Campbell et al., “The rise of people-centric sensing”, IEEE Internet Computing, vol. 12, no. 4, 2008, pp. 12-21. S. Bandyopadhyay et al., “Role of middleware for Internet of Things: A study”, International Journal of Computer Science & Engineering Survey, vol. 2, no. 3, 2011, pp. 94-105. T. Teixeira et al., “Service oriented middleware for the Internet of Things: A perspective”, Proc. of the 4th European Conf. on Towards a Service-Based Internet, W. Abramowicz et al., Eds. Lecture Notes in Computer Science, vol. 6994. Germany: Springer-Verlag GmbH Berlin/Heidelberg, 2011, pp. 220-229. J. Soldatos, M. Serrano, and M. Hauswirth, “Convergence of Utility Computing with the Internet of Things”, Proc. of the 6th Int. Conf. on Innovative Mobile and Internet Services in Ubiquitous Computing. Piscataway, NJ, USA: IEEE Computer Society, 2012, pp. 874-879. The Hydra (LinkSmart) Project: http://www.hydramiddleware.eu/ Xively: Public cloud for the Internet of Things: http://xively.com/ W. Qin et al., “RestThing: A Restful Web service infrastructure for mash-up physical and Web resources”, Proc. of the 9th IFIP Int. Conf. on Embedded and Ubiquitous Computing. Piscataway, NJ, USA: IEEE Computer Society, 2011, pp. 197-204. Fig. 2. Conference presence map application at the EcoDiF’s Web interface. Fig. 3. Management of a H3C switch at the UFRN’s DPC through the EcoDiF’s Web interface. Fig. 4. Monitoring the gas flow in pipeline at Rio de Janeiro (Brazil) through the EcoDiF’s Web interface.