Californium: Scalable Cloud Services for the Internet of Things with CoAP

Post on 15-Jul-2015

127 views 0 download

Tags:

transcript

Californium: Scalable Cloud Services for the Internet of Things with CoAP 1|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Matthias Kovatsch, Martin Lanter, and Zach Shelby

kovatsch@inf.ethz.ch

Californium: Scalable Cloud Services

for the Internet of Things with CoAP

Monday, 06 Oct 20144th International Conference on the Internet of Things (IoT 2014)

Cambridge, MA, USA

Californium: Scalable Cloud Services for the Internet of Things with CoAP 2|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Tiny Resource-constrained Devices

Low unit

costs

Low-power

networks

Californium: Scalable Cloud Services for the Internet of Things with CoAP 3|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Web Technology

Web mashups

Well-known patterns

Cloud

services

Californium: Scalable Cloud Services for the Internet of Things with CoAP 4|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

RESTful protocol designed from scratch

Transparent mapping to HTTP

Additional features for IoT/M2M scenarios

Constrained Application Protocol (CoAP)

Message Sub-layer

Reliability

UDP DTLS …

Request-Response Sub-layer

RESTful interaction

GET, POST, PUT, DELETE,

URIs, and Internet Media Types

Deduplication

Optional retransmissions

Co

AP

Californium: Scalable Cloud Services for the Internet of Things with CoAP 5|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

e.g., Observing Resources

Server

Client

Resource state at origin server

Replicated state at client Max-Age

(caching)

Californium: Scalable Cloud Services for the Internet of Things with CoAP 6|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

e.g., Group Communication

PUT /control/color#00FF00

Enabled by IP multicast

Californium: Scalable Cloud Services for the Internet of Things with CoAP 7|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

CoAP for Tiny Resource-constrained Devices

Web mashups

Well-known patterns

Cloud

services

Californium: Scalable Cloud Services for the Internet of Things with CoAP 8|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Myriads of IoT Devices

New traffic

patterns

Small but numerous

messages

Very high

concurrency factors

for IoT services

Californium: Scalable Cloud Services for the Internet of Things with CoAP 9|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Based on high-performance

HTTP Web servers

Staged Event-Driven Architecture[Welsh et al. 2001]

PIPELINED architecture[Choi et al. 2005]

Reference implementation

Californium (Cf) Coap framework (>=0.18.*)

Updates Initial-Cf implementation

Scalable Architecture for IoT Cloud Services

Californium: Scalable Cloud Services for the Internet of Things with CoAP 10|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Californium

Architecture

3 stages

Central state

management

Independent

concurrency

models

B2

B1

A2

A

Root

Sta

ge

3: C

lien

t

Client for Y

Client for X

Async. ClientB

A1

Sta

ge

1S

tag

e 2

: P

roto

co

l (C

oA

P)

Sta

ge

3: B

usin

ess L

og

.

Network Transport (socket I/O)

Exch

an

ge

Sto

re

Blockwise Layer

Observe Layer

Token Layer

Reliability Layer

Matching & Deduplication

Message Serialization

ma

in

Californium: Scalable Cloud Services for the Internet of Things with CoAP 11|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Experiment Setup

Netgear GS108 Gigabit Switch

3x i7-4770 CPU @ 3.40 GHz

CoAPBench CoAP and HTTP servers

System under test

Californium: Scalable Cloud Services for the Internet of Things with CoAP 12|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Laptop

Intel Core i7-3720M

CPU @ 2.6 GHz

(Hyperthreading and

Turboboost disabled)

24 GiB RAM

Intel 82579 LM Gigabit

Multi-core Utilization

Californium: Scalable Cloud Services for the Internet of Things with CoAP 13|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Multi-core Utilization

0 k

20 k

40 k

60 k

80 k

100 k

120 k

140 k

10 100 1,000 10,000

1 core

2 cores

3 cores

4 cores

0 k

20 k

40 k

60 k

80 k

100 k

120 k

140 k

10 100 1,000 10,000

Number of concurrent clients Number of concurrent clients

Re

qu

es

tsp

er

se

co

nd

Initial-Cf Californium

Californium: Scalable Cloud Services for the Internet of Things with CoAP 14|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Lab machine

Intel Core i7-4770

CPU @ 3.40 GHz

(Hyperthreading and

Turboboost disabled)

16 GiB RAM

Intel Ethernet

Connection I217-V

Comparison with the State of the Art

Californium: Scalable Cloud Services for the Internet of Things with CoAP 15|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Throughput with HTTP Keep-Alive

0 k

50 k

100 k

150 k

200 k

250 k

300 k

350 k

400 k

10 100 1,000 10,000

Re

qu

est

s p

er

seco

nd

Number of concurrent clientsCalifornium Initial Cf Sensinode txThings OpenWSN nCoAPJetty Vert.x Grizzly Tomcat Node.js Apache + PHP

Californium: Scalable Cloud Services for the Internet of Things with CoAP 16|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Throughput without HTTP Keep-Alive

0 k

50 k

100 k

150 k

200 k

250 k

300 k

350 k

400 k

10 100 1,000 10,000

Re

qu

est

s p

er

seco

nd

Number of concurrent clientsCalifornium Initial Cf Sensinode txThings OpenWSN nCoAPJetty Vert.x Grizzly Tomcat Node.js Apache + PHP

Californium: Scalable Cloud Services for the Internet of Things with CoAP 17|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Throughput without HTTP Keep-Alive

100

1,000

10,000

100,000

1,000,000

10 100 1,000 10,000

Re

qu

est

s p

er

seco

nd

(lo

g.)

Number of concurrent clientsCalifornium Initial Cf Sensinode txThings OpenWSN nCoAPJetty Vert.x Grizzly Tomcat Node.js Apache + PHP

Californium: Scalable Cloud Services for the Internet of Things with CoAP 18|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Californium architecture outperforms other solutions

CoAP’s low overhead also facilitates IoT service backend

Up to 64 times the throughput of HTTP

Choose native CoAP support over HTTP cross-proxies

Wait for (D)TLS 1.3 and DICE profile for next evaluation

Conclusions

Californium: Scalable Cloud Services for the Internet of Things with CoAP 19|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Project Web site

https://www.eclipse.org/californium/

Five repositories at GitHub

https://github.com/eclipse?query=californium

Core library and example projects

Abstraction for modular network stage (Connectors)

DTLS 1.2 implementation for network stage (DtlsConnector)

Stand-alone CoAP tools (console client, CoAPBench, …)

RESTful runtime container for server-side JavaScript

Californium (Cf) at

Questions?

Matthias Kovatsch https://github.com/mkovatsc/

kovatsch@inf.ethz.ch http://people.inf.ethz.ch/mkovatsc/

Californium: Scalable Cloud Services for the Internet of Things with CoAP 21|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Intel Xeon E3-1265LV2 @ 2.5 GHz

0 k

40 k

80 k

120 k

160 k

200 k

240 k

10 100 1,000 10,000

Re

qu

est

s p

er

seco

nd

Number of concurrent clients

Cf 1/2/2 Initial-Cf Sensinode nCoAP Cf 4/4/4

Californium: Scalable Cloud Services for the Internet of Things with CoAP 22|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Embedded CoAP Web server

for Contiki OS

Thin server architecture

Small size and intuitive

resource handler API

Application-agnostic

device infrastructure

Resource-constrained Devices and Efficiency

https://github.com/contiki-os/contiki

Californium: Scalable Cloud Services for the Internet of Things with CoAP 23|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

Java CoAP framework

at the Eclipse Foundation

IETF “running code”

Unconstrained service backend

for myriads of IoT devices

DTLS 1.2 implementation

Basis for Actinium (Ac)

IoT Cloud Services and Scalability

http://www.eclipse.org/californium/

Californium: Scalable Cloud Services for the Internet of Things with CoAP 24|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

App-server for Californium

IoT mashups for automation

in the background

Server-side JavaScript

CoapRequest object API

RESTful lifecycle management

The Human in the Loop I

http://www.eclipse.org/californium/

Californium: Scalable Cloud Services for the Internet of Things with CoAP 25|Matthias Kovatsch

http://people.inf.ethz.ch/mkovatsc

CoAP protocol handler

for Mozilla Firefox

Browsing and bookmarking

of CoAP URIs

Interaction with resource like

RESTClient or Poster

Treat tiny devices like

normal RESTful Web services

The Human in the Loop II

https://addons.mozilla.org/firefox/addon/copper-270430/