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

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

The Android Platform in the “era” of Internet of Things

Marco Picone, Ph.D.

Droidcon Torino - 2014

@marcopk

Università degli Studi di Parma

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

@meI am a Postdoctoral Research Associate at 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

@marcopkhttp://wasnlab.tlc.unipr.it/people/picone/

http://dsg.ce.unipr.ithttp://mobdev.ce.unipr.it/

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

Keynote Objectives

- History, Forecast, and IoT Motivations

- Internet of Things Overview

- Mobile World & IoT

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

Where we started ?

Source: ARPANET Completion Report: January 4, 1978.

Since from the beginning of the Internet, there was the desire to connect more “things” to it.

http://www.lk.cs.ucla.edu/index.html

http://www.youtube.com/watch?v=vuiBTJZfeo8

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

Where are we today ? The internet now connects billions devices anywhere!

http://internet-map.net

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

The Internet Growth

We are living the “Mobile-Centric”

age !

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

The mobile-centric world

NFC

RemoteServices

SmartTV/Display

Phone/

Tablet

Payment Social AccountsAddress BookPhone Calls

Location (GPS, 3G, WiFi)

Shared DataBrowsing Data

Photos / Videos...........

WiFiWiFi Direct

3G/4GBluetooth

NFC

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

The mobile-centric world

“What a difference 8 years makes: St. Peter’s Square

in 2005 and yesterday”

Mobile Devices changed almost the entire ICT world in terms of new and already existing software, hardware and

services !

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

What’s next ? Wearable Computing Revolution in 2014 ?

Smart Watches

“Mobile handsets & tablets are attraction points for surrounding personal smart devices”

Glasses

Motion Sensors

SDK

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

The Internet of Things (IoT)

“A network of networks with billions of uniquely identified physical smart objects organized in an

Internet-like structure”

“Smart Objects are items such as sensors, consumer devices, and enterprise assets that are connected to both the Internet and each

other”

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

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 define new standards

• Manage Heterogeneity and dynamism at different levels (Physical, Data Link, Network, Transport, Session, Presentation and Application)

• Open the networks to new services and technologies

• Open the data to create new aggregated and enriched services

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

IoT Application ScenariosParking Building Lighting Grid

Health Agriculture ....Mobility

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 key-

concepts are Integration & interoperability among services and data analysis.

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

The Information Flow

Sensor Stream

Crowdsourcing

Internet

Machine-to-Machine

Human-to-Machine

Information-to-Machine

“Big Data”Analytics

Improve Efficiency

Offer New Services

Power Application

Feedbacks & Updates

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

Multiple Applications (Integration)Application 2

Application 1

Application 3

Efficiency

New Services

Power Applications

Feedbacks & Updates

“Big Data”Analytics

Parking

Lighting

Mobility

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

IoT Building Blocks

Integrated, Shared & Seamless Connectivity (WiFi, ZigBee/802.15.4, 3G/LTE, ...) Se

curity

and

Aut

horiz

ation

for m

ultip

le ac

cess

es

Smart Objects(Data producers and Data Consumers)

Data Collection & Processing (Business Intelligence, Data Mining, Data Aggregation, etc ...)

Services (Mobility, Energy Efficiency, Monitoring, Security, etc ..)

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

Involved Actors

Mobile DevicesUsers

Access Networks

Cloud Services

Smart Objects

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

IoT Open ChallengesThe main challenges that have to be faced in the IoT world are:

- Allow the connectivity of thousands of different devices in the same area using different access technologies and protocols

- Manage heterogeneity and dynamism through Service Discovery and Protocol Translation

- Efficiently collect data from different sources

- Process collected data

- Adapt and improve the deployed systems

- Provide new services

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

IoT and Sensor Network HW & SW- Sensing and actuation capabilities

- 8, 16 or 32-bit MCU

• More and more 32-bit,

• i.e. ARM Cortex M3

- Small memory (tens or hundreds of kB)

- Low-power radio (e.g. sub-GHz, 2.4 GHz)

- Power source: battery or mains

- Sometimes with energy harvesting

- Contiki OS

- Tiny OS

- Arduino-like

- Linux-like

Mainly for constrained nodes

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

IoT Protocols

Sensor StreamZigBee/802.15.4 PLCWiFi Bluetooth ...

IP [ IPv6 (6LoWPAN + RPL) or IPv4]

TCP UDP

HTTP XMPP ... CoAP ...MQTT

Traditional IP stack !

Many IETF Standards

IP connects a variety of link layers

Wired or wireless

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

IoT Transport Layer

Sensor StreamZigBee/802.15.4 PLCWiFi Bluetooth ...

IP [ IPv6 (6LoWPAN + RPL) or IPv4]

TCP UDP

HTTP XMPP ... CoAP ...MQTTLike in the traditional Internet: TCP and UDP

No specific adaptation (other than 6LoWPAN compression)

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

IoT Application Layer

Sensor StreamZigBee/802.15.4 PLCWiFi Bluetooth ...

IP [ IPv6 (6LoWPAN + RPL) or IPv4]

TCP UDP

HTTP XMPP ... CoAP ...MQTTA variety of application layers

Borrowed from the Internet (HTTP, XMPP) or not (CoAP, MQTT)

Most common goal: enable RESTful interaction

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

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.

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

Data Storage

Data Storage

IoT Real Scenario

IoT Hub

Server

Server

Client

S

S

S

S

S

HTTP

HTTP

CoAP

CoAPCoAP

CoAP

CoAP

Data Cache

Data Storage, Processing, Aggregation and Distribution

The Internet IoT Network

Data Source/Stream, manage Incoming and Outgoing requests/responses SO

REST API

Smart Object (SO)

Client

IoT Hub

Internet Server

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

Data Storage

Data Storage

IoT Real Scenario

IoT Hub

Server

Server

Client

S

S

S

S

S

HTTP

HTTP

CoAP

CoAPCoAP

CoAP

CoAP

Smart Objects cooperate among them and with the IoT HubData Cache

The Internet IoT Network

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

Data Storage

Data Storage

IoT Real Scenario

IoT Hub

Server

Server

Client

S

S

S

S

S

HTTP

HTTP

CoAP

CoAPCoAP

CoAP

CoAP

Smart Objects that go directly to Internet

Smart Objects cooperate among them and with the IoT HubData Cache

The Internet IoT Network

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

IoT Real Scenario

IoT Hub

Server

Server

Client

S

S

S

S

S

HTTP

HTTP

CoAP

CoAPCoAP

CoAP

CoAP

Smart Objects that go directly to Internet

Smart Objects cooperate among them and with the IoT Hub

IoT Hub is the bridge between the Internet and the IoT. Translates protocols and cache data.

Data Cache

Data Storage

Data Storage

The Internet IoT Network

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

Real Scenario with Mobile Devices

IoT Hub

Server S

S

S

S

HTTP

CoAPCoAP

CoAPCoAPHTTPHTTP

Data Storage

The Internet

IoT Network

Data Cache

The Internet IoT Network

HTTP

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

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 (identified 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 identified by the given URI

• POST: create a new resource with the supplied state

• PUT: update an existing resource identified by the given URI with the supplied state

• DELETE: delete the resource identified by the given URI

- Advantages of the REST paradigm are: standard, uniform interfaces, semantics of HTTP methods, stateless.

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

REST vs. Web Services

WSDL/WADL

application/xml<?xml?><temp unit=“C”>50</temp>

HTTP

JSON-WSP

application/json{

“temp”=50,“unit”=”C”

}

WSDL/WADL

application/soap+xml

REST Resource SOAP Service

Header

Body RequestSensor(temp)

GET /sensor/temp GET /sensor/temp POST /sensor/service

mysensor.example.com

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

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

- Lightweight, binary protocol that can be translated to HTTP easily in order to guarantee the integration with the WWW

- Support for multicast communication

- CoAP runs on top of a lightweight transport, i.e. UDP

- Request/response communication model, support for asynchronous message exchange

- REST communication paradigm

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

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

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

Service Discovery- Service Discovery is a fundamental component in dynamic

environments to allow consumer devices and applications to find and interact with available services.

- SD could be performed:

• In the local network [e.g. automatically accessing a building and connecting to the available WiFi Network]

• Through different networks [e.g. Inside a target geographic region, “which services are available around me now ?”]

- Different Technologies could be used

• Central infrastructure or repository

• Distributed or peer-to-peer architecture

• Multicast-based protocols Local Network

Other Networks

Internet

SS

SS

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

- The Voilà Project allows to build IoT Networks where involved Actors & Smart Objects automatically and without any configuration 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

Voilà Project

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

Voilà Demo

IoT HUB

DataFetcherSD controller

CoAP

HTTP

JSON

JSON

Discovery of IoT nodesContinuous requests of cached dataUpdate Smart Display (SD)

JSON

HTTP JSON

Presented @ SPS IPC Drives Italia - Parma, May 2013

Fiera dell’automazione 2013

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

Voilà Demo (Sensor Join)

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

Voilà Demo (Sensor Disconnection and Re-Join)

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

Voilà Demo (Interaction with a Mobile Device)

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

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 field 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 !

http://phdschool.tlc.unipr.it

sponsored by

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

References- http://blogs.cisco.com/ioe/beyond-mqtt-a-cisco-view-on-iot-protocols/

- http://mqtt.org/

- http://www.contiki-os.org/

- https://datatracker.ietf.org/doc/draft-ietf-core-coap/

Acknowledgments

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]

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

Thank you ! Marco Picone, Ph.D.

Droidcon Torino - 2014

Università degli Studi di Parma

@marcopk