iotaconf 2014 - iot connectivity, standards, and architecture

Post on 01-Jul-2015

742 Views

Category:

Software

7 Downloads

Preview:

Click to see full reader

DESCRIPTION

Communication Patterns, Protocols, and Architecture in IoT.

TRANSCRIPT

IoT Connectivity, Standards & ArchitectureTodd L. Montgomery @toddlmontgomery

IOTAConf!October 20-21, 2014!

Protocols (Standards?)

Architecture

Communication PatternsLead to…

Lead to…

“Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering.”

— Yoda

Communication Patterns

What most of us think happens

Request

Response

Request

Response

And that is… what really happens… but…

Request

Response

What also really happens

But… Who does this?

@toddlmontgomery

Request

Response

Support (UI/Device)

Security (Challenge)

Keep-Alive or Watchdog

User State Query

Stream

What also really happens

News, Stocks, Texts/SMS, Video, Audio, Social, …

Ingest

What also really happens

Temperature, Heart Rate, Web Logs, Sensor Data, Seismic Readings, Steps, Stairs, Gyro

Data, GPS, Acceleration, Breathing, EKG, EEG, …

Request

Response

What also really happens

Stream & Ingest

Pretty much how everything actually works…

What also REALLY happens

Message

Message

The Break Down

Request, Response, Stream, and Ingest are really types

Message-Driven

Message-Driven

Reactive Applications

Message Driven

Responsive Resilient

Elastic

http://www.reactivemanifesto.org/

Meanwhile… IoT…

@toddlmontgomery

HTCPCP RFC 2324, Extended by RFC 7168

http://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol

"there is a strong, dark, rich requirement for a protocol designed espressoly [sic] for the brewing of coffee"

@toddlmontgomery

@toddlmontgomery

418 I’m a teapot

BREW

WHEN

"This has a serious purpose – it identifies many of the ways in which HTTP has

been extended inappropriately.” — Larry Masinter, author http://larry.masinter.net/

courtesy of

Sometimes it is good to reinvent the wheel

@toddlmontgomery

What History Has Taught Us

THE IoT Language!

THE IoT Protocol!

THE IoT Runtime!

THE IoT ______!

Internet of Things

Multi-Lingual (and Polyglot)

Multi-Protocol & Multi-Standard

Multi-“Platform” Massive Scale Highly Integrated

What is already is…

Connected. Integrated.

Great time to be a protocol geek!

@toddlmontgomery

pro·to·col noun \ˈprō-tə-ˌko ̇l, -ˌkōl, -ˌkäl, -kəl\ !

... !3 b : a set of conventions governing the treatment and especially the formatting of data in an electronic communications system <network protocols>

...

3 a : a code prescribing strict adherence to correct etiquette and precedence (as in diplomatic exchange and in the military services) <a breach of protocol> !

@toddlmontgomery

Protocols are the key to Integration

REST has demonstrated this!

@toddlmontgomery

Protocols & Standards

@toddlmontgomery

Battery Life

Persistent connections help a LOT! (fewer frames)

Well designed protocols help a LOT MORE!

Many simultaneous connections hurt!

Using the wrong protocol with the wrong pattern hurts A LOT!

Stay out of High Energy State!

One reason why we should care about Protocols…

ASCII Encoding hurts CPU & Bandwidth!

Binary Encoding helps save CPU & Bandwidth!

@toddlmontgomery

Request

Response

HTTP RFC 2068, 2616, …, 7230-7240

Synchronous Request/Response

Bi-Directional… kinda, but…

Event

Event

… only one direction

at-a-time

June 2014

@toddlmontgomery

Request

ACKResponse

ACK

Sync Request

Sync Response

Web Services

But… Async Request/Response… kinda

Event

Event

http://en.wikipedia.org/wiki/List_of_web_service_specifications

No, seriously, lots of these!!

@toddlmontgomery

Async Request/ Response

Streaming

WebSocket RFC 6455

Full Duplex, Asynchronous “TCP over the Web”

EventsEvents

101 Switch

HTTP Upgrade

Ingest

https://tools.ietf.org/html/rfc6455

Really a Transport Protocol

@toddlmontgomery

Async Request

Async Response

SPDY & HTTP/2 IETF Drafts

Async Request/Response Multiple Streams

Efficient Headers (HPACK) Binary Encoding

EventsEvents

http://www.ietf.org/id/draft-ietf-httpbis-http2-14.txt

There is emerging implementation experience and interest in a protocol that retains the semantics of HTTP without the legacy of HTTP/1.x message framing and syntax, which have been identified as hampering performance and encouraging misuse of the underlying transport.

— IETF httpbis Charter http://datatracker.ietf.org/wg/httpbis/charter/

@toddlmontgomery

Async Request

Async Response

WebSocket over HTTP/2 IETF Draft

Streaming Ingest

Full Duplex, Asynchronous with Multiple Channels/Streams

Events Events

http://www.ietf.org/id/draft-hirano-httpbis-websocket-over-http2-01.txt

@toddlmontgomery

MQ Telemetry Transport (MQTT)

http://mqtt.org/

Lightweight Publish/Subscribe

Messaging Transport

Runs over TCP or WebSocket (v3.1.1)

MQTT-SN for non-TCP/IP

Broker-Based

OASIS Standard

@toddlmontgomery

Constrained Application Protocol (CoAP)

https://tools.ietf.org/html/rfc7252

Runs over UDP, DTLS, or WebSocket

Request/Response (either direction), Publish/Subscribe

Standardized HTTP Mapping

Resource Discovery, Linking, etc.

IETF CoRE WG (Constrained RESTful Environments) RFC 7252

@toddlmontgomery

Extensible Messaging & Presence Protocol (XMPP)

https://tools.ietf.org/html/rfc6120

Brokered TCP + TLS + SASL

Presence & Persistent Streams

XMPP Standards Foundation

(Semi) Structured XML

IETF RFC 6120 (obsoletes 3920)

Protocols?

Shared Memory IPC

WebSocket

JMS

WebRTC

Not just in the traditional sense…

HTTP/1.1MQTT

HTTP/2

AMQPCoAP

TCP/UDP/IP

Aeron 0MQ

DDS

XMPP

@toddlmontgomery

Architectures

@toddlmontgomery

Micro-Services Architectures

http://martinfowler.com/articles/microservices.html

Languages

Erlang & Elixir

Akka Rust

Go

And Frameworks

RxJS

Rx

RxJava

Akka Streams

@toddlmontgomery

Client? Device? Browser?

Back-End? DMZ?

Protocols ProtocolsProtocols

@toddlmontgomery

Micro Architecture

Protocols

Nuklei

Deployment Container

LogicReactive

Message Stream

Depends on language, runtime, platform, etc. Asynchronous

Binary “Loose” Ordering

Client? Server? Browser? Device? ALL!

Protocols

NukleiLogic

Reactive Message Stream

Asynchronous Binary Boundary

Consistent ABI

Various Protocol Options

Choice of protocols becomes deployment concern

Deployment Container

Message

Message

To Sum Up

Message-Driven

Message-Driven

@toddlmontgomery

Questions?• Kaazing http://www.kaazing.com • GitHub https://github.com/kaazing • Reactive Manifesto http://www.reactivemanifesto.com • SlideShare http://www.slideshare.com/toddleemontgomery • Twitter @toddlmontgomery

Thank You!

top related