Building Real-Time Enterprise Applications for the Internet of Things

Post on 20-Aug-2015

615 views 4 download

Tags:

transcript

© 2013 Kaazing Corporation. All Rights Reserved. 1

David Witherspoon Prashant Khanal Oct 30, 2013

© 2013 Kaazing Corporation. All Rights Reserved.

About Us

§  Prashant Khanal §  Software Engineer – Kaazing §  Prashant.Khanal@kaazing.com §  Twitter: @ipras

§  David Witherspoon §  Software Engineer – Kaazing §  David.Witherspoon@kaazing.com §  Twitter: @dpwspoon

© 2013 Kaazing Corporation. All Rights Reserved.

Demo!

© 2013 Kaazing Corporation. All Rights Reserved.

Agenda

§  Requirements for the IoT

§  Creating a reference architecture for IoT

§  Live Demos, Live Demos, Live Demos

§  Source Code, Source Code, Source Code

§  WoT and IoT

© 2013 Kaazing Corporation. All Rights Reserved.

Internet of Things

Ubiquitous/Pervasive

Heterogeneous

Highly Interconnected

Event-Driven/Real Time

Identifiable Components

Always On

Scalable

Manageable

© 2013 Kaazing Corporation. All Rights Reserved.

Raspberry Pi

Image source: http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html

© 2013 Kaazing Corporation. All Rights Reserved.

Demo!

© 2013 Kaazing Corporation. All Rights Reserved.

Demo Setup

© 2013 Kaazing Corporation. All Rights Reserved.

Raspberry Pi Controlling the Light Directly

© 2013 Kaazing Corporation. All Rights Reserved.

Raspberry Pi Controlling the Light Directly

© 2013 Kaazing Corporation. All Rights Reserved.

Raspberry Pi Controlling the Light Directly

© 2013 Kaazing Corporation. All Rights Reserved.

Raspberry Pi Controlling the Light Directly

© 2013 Kaazing Corporation. All Rights Reserved.

Demo Setup

© 2013 Kaazing Corporation. All Rights Reserved.

Demo Setup

© 2013 Kaazing Corporation. All Rights Reserved.

Message Systems/Protocols for the IoT

§  Java Message Service (JMS) § Standard messaging API

§ Vendor independent

§ Pub / Sub

§ Loosely Coupled

© 2013 Kaazing Corporation. All Rights Reserved.

Controlling the Light Remotely Using Pub-Sub

© 2013 Kaazing Corporation. All Rights Reserved.

Demo!

© 2013 Kaazing Corporation. All Rights Reserved.

LightJmsTcpController Using JMS to Control a Light

© 2013 Kaazing Corporation. All Rights Reserved.

LightJmsTcpController Using JMS to Control a Light

© 2013 Kaazing Corporation. All Rights Reserved.

LightJmsTcpController Using JMS to Control a Light

© 2013 Kaazing Corporation. All Rights Reserved.

LightJmsTcpController Using JMS to Control a Light

© 2013 Kaazing Corporation. All Rights Reserved.

ToggleJmsTcpListener Using JMS to Send Events

© 2013 Kaazing Corporation. All Rights Reserved.

ToggleJmsTcpListener Using JMS to Send Events

© 2013 Kaazing Corporation. All Rights Reserved.

Controlling the Light Remotely Using Pub-Sub

© 2013 Kaazing Corporation. All Rights Reserved.

Challenges with TCP

§  Isolated networks

§  Firewalls

§  Ports

§  Web browsers

© 2013 Kaazing Corporation. All Rights Reserved.

How to Extend This to the Web

© 2013 Kaazing Corporation. All Rights Reserved.

Controlling the Light Remotely Using Pub-Sub Over the Web

© 2013 Kaazing Corporation. All Rights Reserved.

HTML5 WebSocket: TCP for the Web

§  Standard Protocol (IETF): RFC-6455

§  Standard API:

§  W3C: JavaScript

§  Java, iOS, Android, Flash, .NET/Silverlight

§  Single socket, full-duplex

§  Low overhead: <1% of HTTP

§  Low latency: low milliseconds

§  SSL support Full duplex

© 2013 Kaazing Corporation. All Rights Reserved.

Protocol Layering

TCP

JMS XMPP AMQP B2B FTP VNC mktdata etc

Browsers, Native Applications and IoT Devices

WebSocket Gateway

Internet

WebSocket Gateway

© 2013 Kaazing Corporation. All Rights Reserved.

Controlling the Light Remotely Using Pub-Sub Over the Web

© 2013 Kaazing Corporation. All Rights Reserved.

Demo!

© 2013 Kaazing Corporation. All Rights Reserved.

WebSocket with Brokers

© 2013 Kaazing Corporation. All Rights Reserved.

WebSocket with Brokers

© 2013 Kaazing Corporation. All Rights Reserved.

WebSocket with Brokers

© 2013 Kaazing Corporation. All Rights Reserved.

The Architecture

© 2013 Kaazing Corporation. All Rights Reserved.

WebSocket Powering the Web of Things

WS

WS

WS WS WS WS

WS

WS

WS

© 2013 Kaazing Corporation. All Rights Reserved.

Extending Protocols to the Web of Things

MQTT/WS

AMQP/WS

JMS/WS STOMP/WS

XMPP/WS

© 2013 Kaazing Corporation. All Rights Reserved.

Find Out More

§  The Zinger – Blog: §  http://blog.kaazing.com

§  JMS WebSocket Tutorial §  http://tutorial.kaazing.com

§  More developer content §  http://developer.kaazing.com

§  RC Car / Light and Switch Code §  https://github.com/dpwspoon/kaazingPi

§  The Definitive Guide to HTML5 WebSocket, (Apress, 2013) §  First comprehensive guide on WebSocket

§  Use WSK214 for 40% of the e-book

38

© 2013 Kaazing Corporation. All Rights Reserved.

© 2013 Kaazing Corporation. All Rights Reserved.

The End