The Android Platform in the “era” of Internet of Things - Droidcon Italy 2014

Click here to load reader

  • date post

  • Category


  • view

  • download


Embed Size (px)


The widespread availability of mobile devices, significantly changed the market making them attractive to an endless number of always connected applications and services. At the same time, academia and companies focused and invested significantly on the Internet of Things (IoT) and the Machine- to-Machine (M2M) paradigm. IoT and M2M are inherently ready to be integrated with the World Wide Web and many approaches and techniques have been shared and extended. In this scenario many actors start talking and defining the concept of Web of Thing (WoT) envisioning a world where devices are exposed using WWW languages. In this session, you will be briefly introduced to the main concepts that characterize and define the Internet of Things and how mobile devices will play a fundamental role in the upcoming global scenario. The session will introduce and present the characteristics of the main approaches and protocols adopted in M2M and IoT applications (in particular CoAP, CoSIP, MQTT, and HTTP) and how they could be used on the Android platform through some key libraries and examples. Main challenges that will be faces during the talk are related to the communication among heterogeneous devices, the protocols management and the dynamic service discovery.

Transcript of The Android Platform in the “era” of Internet of Things - Droidcon Italy 2014

  • 1. The Android Platform in the era of Internet of Things Marco Picone, Ph.D.Universit degli Studi di Parma @marcopkDroidcon Torino - 2014

2. @me I am a Postdoctoral Research Associateat the University of Parma. I have received from the same University the Dr. Ing. degree (Master) in Computer Engineering "cum laude" in 2008 and the Ph.D. degree in Information Technologies in 2012. My research activity focuses mainly on:-Distributed and Peer-to-Peer Systems-Vehicle-to-Vehicle and Vehicle-to-Infrastructure communications-Mobile & Pervasive Computing-Internet of Things, Wireless Sensor Networks and Mobile based Sensing @marcopk 3. Keynote ObjectivesInternet of Things Overview Mobile World & IoT -History, Forecast, and IoT Motivations 4. Where we started ? Since from the beginning of the Internet, there was the desire to connect more things to it. Source: ARPANET Completion Report: January 4, 1978. v=vuiBTJZfeo8 5. Where are we today ? The internet now connects billions devices anywhere! 6. The Internet GrowthWe are living the Mobile-Centric age ! 7. The mobile-centric world WiFi WiFi Direct 3G/4G Bluetooth NFCSocial Accounts Address Book Phone Calls Location (GPS, 3G, WiFi) Shared DataPhone / TabletNFCPaymentRemote ServicesBrowsing Data Photos / Videos ...........Smart TV/Display 8. The mobile-centric world What a difference 8 years makes: St. Peters Square in 2005 and yesterdayMobile Devices changed almost the entire ICT world in terms of new and already existing software, hardware and services ! 9. Whats next ? Wearable Computing Revolution in 2014 ? GlassesMotion SensorsSmart Watches SDKMobile handsets & tablets are attraction points for surrounding personal smart devices 10. Where we will be in the next years ? The internet will connect from 10 billion to 15 billion devices ! 50 billion in 2020 ?Internet of Things Age whitepapers/wp-50-billions.pdf internet-of-things-billions-ofconnected-devices-2014-1 11. The Internet of Things (IoT) A network of networks with billions of uniquely identied physical smart objects organized in an Internet-like structureSmart Objects are items such as sensors, consumer devices, and enterprise assets that are connected to both the Internet and each other 12. The Internet of Things (IoT) The vision of IoT is to integrate at the same time new and existing approaches and technologies (such as Mobile & Pervasive Computing, Machine-to-Machine,Ambient Intelligence, Wearable technology, Cloud Computing etc ...) to:Properly use existing protocols and dene new standardsManage Heterogeneity and dynamism at dierent levels (Physical, Data Link, Network, Transport, Session, Presentation and Application)Open the networks to new services and technologiesOpen the data to create new aggregated and enriched services 13. IoT Application Scenarios ParkingBuildingLightingGridMobilityHealthAgriculture....Several of these sub-systems have been already studied as isolated networks. The vision of IoT is, starting from the existing experience, to design new approaches and technologies to connect all these subsystems in a smart Internet-like structure where the keyconcepts are Integration & interoperability among services and data analysis. 14. The Information Flow Machine-to-MachineSensor Stream Human-to-MachineCrowdsourcingImprove EciencyBig Data AnalyticsOer New ServicesInformation-to-MachineInternetPower Application Feedbacks & Updates 15. Multiple Applications (Integration) Application 2 LightingEciencyParkingBig Data AnalyticsApplication 1New Services Power ApplicationsMobilityApplication 3Feedbacks & Updates 16. Services (Mobility, Energy Eciency, Monitoring, Security, etc ..)Data Collection & Processing (Business Intelligence, Data Mining, Data Aggregation, etc ...)Smart Objects (Data producers and Data Consumers)Integrated, Shared & Seamless Connectivity (WiFi, ZigBee/802.15.4, 3G/LTE, ...)Security and Authorization for multiple accessesIoT Building Blocks 17. Involved Actors Cloud Services Access NetworksUsers Mobile DevicesSmart Objects 18. IoT Open Challenges The main challenges that have to be faced in the IoT world are:- Allow the connectivity of thousands of dierent devices in the same area using dierent access technologies and protocols-Manage heterogeneity and dynamism through Service Discovery and ProtocolTranslation- Eciently collect data from dierent sources - Process collected data - Adapt and improve the deployed systems - Provide new services 19. IoT and Sensor Network HW & SW -Sensing and actuation capabilities-Contiki OS-8, 16 or 32-bit MCU-Tiny OS More and more 32-bit,-Arduino-likei.e. ARM Cortex M3-Linux-like-Small memory (tens or hundreds of kB)-Power source: battery or mainsLow-power radio (e.g. sub-GHz, 2.4 GHz)Sometimes with energy harvesting Mainly for constrained nodes 20. IoT Protocols HTTP XMPP MQTT...CoAPTCP...UDPIP [ IPv6 (6LoWPAN + RPL) or IPv4] WiFiZigBee/802.15.4 Sensor Stream Traditional IP stack ! Many IETF StandardsPLCBluetoothIP connects a variety of link layers Wired or wireless... 21. IoT Transport LayerLike in the traditional Internet: TCP and UDPHTTP XMPP MQTT...CoAPTCPNo specic adaptation (other than 6LoWPAN compression)...UDPIP [ IPv6 (6LoWPAN + RPL) or IPv4] WiFiZigBee/802.15.4 Sensor StreamPLCBluetooth... 22. IoT Application Layer A variety of application layersHTTP XMPP MQTTBorrowed from the Internet (HTTP, XMPP) or not (CoAP, MQTT)...CoAPTCPMost common goal: enable RESTful interaction...UDPIP [ IPv6 (6LoWPAN + RPL) or IPv4] WiFiZigBee/802.15.4 Sensor StreamPLCBluetooth... 23. IoT Application Protocols -CoAP [UDP]: is used for resource constrained, low-power sensors and devices connected via lossy networks, especially when there is a high number of sensors and devices within the network.-HTTP (with a RESTful approach) [TCP]: is particularly attractive for connecting consumer devices, given the near universal availability of HTTP stacks for various platforms.-MQTT [TCP]: is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. 24. IoT Real Scenario The InternetREST API Smart Object (SO)IoT NetworkClient IoT Hub Internet ServerClientHTTPData Cache SServer HTTPData StorageCoAP IoT HubSCoAP S CoAPServer Data StorageData Storage, Processing, Aggregation and DistributionS CoAPS CoAPData Source/Stream, manage Incoming and Outgoing requests/responses SO 25. IoT Real Scenario The InternetIoT NetworkClientHTTPSmart Objects cooperate among them and with the IoT HubData Cache SServer HTTPData StorageCoAP IoT HubSCoAP S CoAPServer Data StorageS CoAPS CoAP 26. IoT Real Scenario The InternetIoT NetworkClientHTTPSmart Objects cooperate among them and with the IoT HubData Cache SServer HTTPData StorageCoAP IoT HubSCoAP S CoAPServer Data StorageS CoAPSmart Objects that go directly to InternetS CoAP 27. IoT Real Scenario The InternetClientHTTPIoT NetworkIoT Hub is the bridge between the Internet and the IoT. Translates protocols and cache data.Smart Objects cooperate among them and with the IoT HubData Cache SServer HTTPData StorageCoAP IoT HubSCoAP S CoAPServer Data StorageS CoAPSmart Objects that go directly to InternetS CoAP 28. Real Scenario with Mobile Devices The InternetIoT NetworkThe InternetData CacheIoT NetworkSServer HTTPData StorageCoAPIoT HubHTTP HTTPHTTPSCoAP S CoAPCoAP S 29. REpresentational State Transfer (REST) -REST is an architectural model based on clients and servers, based on the HTTP protocol All requests are related to resources (identied by a URI) and are represented by a document containing the details of its state, e.g. a JSON- or XML-formatted document- It is possible to perform 4 operations on a resource, each mapped to a HTTP request method: GET: retrieve the state of the resource identied by the given URI POST: create a new resource with the supplied state PUT: update an existing resource identied by the given URI with the supplied state DELETE: delete the resource identied by the given URI -Advantages of the REST paradigm are: standard, uniform interfaces, semantics of HTTP methods, stateless. 30. REST vs. Web Services REST ResourceSOAP ServiceWSDL/ WADLJSON-WSPWSDL/ WADLapplication/xmlapplication/jsonapplication/soap+xml 50 GET /sensor/temp{temp=50, unit=C }GET /sensor/tempHTTP mysensor.example.comHeader BodyRequestSensor(temp)POST /sensor/service 31. CoAP Protocol-Application-layer protocol designed to be used by constrained devices in terms of computational capabilities, which may feature limited battery and operate in constrained (low-power and lossy) networks-Designed by the IETF CoRE Working Group - draft 18 now in RFC queue-Support for multicast communication-REST communication paradigmLightweight, binary protocol that can be translated to HTTP easily in order to guarantee the integration with the WWW CoAP runs on top of a lightweight transport, i.e. UDP Request/response communication model, support for asynchronous message exchange 32. CoAP and REST -CoAP uses the four methods GET, POST, PUT, and DELETE in the same way as HTTP to operate on resources-GET: instructs the CoAP server to retrieve the representation of the targeted resource; responses are 2.05 Content or 2.03 Valid in case of success, 4.04 Not Found-POST: instructs the server to create the resource; response is 2.01 Created PUT: instructs the server to update the targeted resource; response is 2.04 Changed DELETE: instructs the server to delete the targeted resource; response is 2.02 Deleted both in case the resource was deleted or did not exist 33. Service Discovery -Service Discovery is a fundamental component in dynamic environments to allow consumer devices and applications to nd and interact with available services.-Other NetworksSD could be performed: In the local network [e.g. automatically accessing a building and connecting to the available WiFi Network]Internet Through dierent networks [e.g. Inside a target geographic region, which services are available around me now ?]-Dierent Technologies could be used Central infrastructure or repository Distributed or peer-to-peer architecture Multicast-based protocolsS S S SLocal Network 34. Voil Project -The Voil Project allows to build IoT Networks where involved Actors & Smart Objects automatically and without any conguration discover, connect to or disconnect from the network using the service discovery protocol and standard protocols such as HTTP & CoAP.- Voil involves - CoAP implementation to the last IETF Draft (Java, Android, and Arduino) (Contiki soon ? ) - Service discovery procedures in local networks and distributed overlays - IoT Hub implementation with: Protocol Translation (HTTP CoAP) Resource Directory Proxy functionalities 35. Voil Demo HTTP JSONSD controllerJSONData Fetcher HTTPDiscovery of IoT nodesJSONIoT HUBContinuous requests of cached data Update Smart Display (SD) Presented @ SPS IPC Drives Italia - Parma, May 2013 Fiera dellautomazione 2013CoAPJSON 36. Voil Demo (Sensor Join) 37. Voil Demo (Sensor Disconnection and Re-Join) 38. Voil Demo (Interaction with a Mobile Device) 39. Internet of Things & Smart Cities Event The aim of the Ph.D. School has been to address young researchers to the forefront of research activity on Smart Cities & Internet of Things, by presenting state-of-the-art research together with the current and future challenges. International speakers from academia and industry gave lectures tailoring their research eld for an interdisciplinary audience. A dedicated discussion panel focused on the interaction and the collaboration between academia and industry in order to depict the future vision of Smart Cities and IoT.2014 Call - Join the Community ! sponsored by 40. References - Daniele Sportillo [BsC] Daniele Gilli [MsC] Mirko Mancin [BsC, MsC] Mattia Antonini [BsC] Gabriele Ferrari [BsC, MsC]Giacomo Brambilla [Ph.D. Student in the DSG Group] 41. @marcopkThank you ! Marco Picone, Ph.D.Universit degli Studi di ParmaDroidcon Torino - 2014