html5 websocket for the real-time weband the internet of things

46
Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT HTML5 WebSocket for the Real-Time Web and the Internet of Things Peter Moskovits Head of Real-Time Solutions Palo Alto, Aug 20, 2014

Upload: pmoskovi

Post on 29-Nov-2014

500 views

Category:

Software


1 download

DESCRIPTION

Abstract: In his talk Peter gives a brief introduction to WebSocket and discusses how real-time Web communications technologies can be applied to an always connected Web and mobile world. Then, he walks you through how to provide interactivity and collaboration by controlling physical objects remotely. The presentation features several live demonstrations of the concepts discussed throughout the session.

TRANSCRIPT

Page 1: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

HTML5 WebSocket for the Real-Time Web and the Internet of Things

Peter Moskovits Head of Real-Time Solutions

Palo Alto, Aug 20, 2014

Page 2: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

About Peter

Peter Moskovits Head of Real-Time Solutions [email protected] @pmoskovi

Page 3: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Demos

Page 4: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

The Request-Response Web

Browser

Half Duplex Full duplex

Back-end server

Web

Web Tier Middleware

Legacy Web

Page 5: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

HTML5 WebSocket: TCP for the Web

§  Standard Protocol (IETF): RFC-6455

§  Standard API (W3C): JavaScript

§  Single socket, full-duplex

Full duplex

§  Low overhead: <1% of HTTP

§  Low latency: low milliseconds

§  SSL support

Page 6: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

The Event-Driven Web

Browser

Half Duplex Full duplex

Back-end server

Web

Web Tier Middleware

Legacy Web

Event-Driven Web

Back-end server WebSocket Server

Web

WebSocket Full duplex

Page 7: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

How Can I Use?

Page 8: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

How Can I Use?

Page 9: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

The WebSocket Handshake

Page 10: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Available in Chrome Developer Tools

Page 11: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Protocol Layering

TCP

Your application

XMPP IMAP/SMTP/POP3

Page 12: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Protocol Layering

TCP

Your application

XMPP IMAP/SMTP/POP3 HTTP

Page 13: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Protocol Layering

TCP

Your application

XMPP IMAP/SMTP/POP3 HTTP

WebSocket

Page 14: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Win a Copy

Page 15: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Win a Copy

Chapter 1: Introduction to HTML5 WebSocket Chapter 2: The WebSocket API Chapter 3: The WebSocket Protocol Chapter 4: Building Instant Messaging and Chat over WebSocket with XMPP Chapter 5: Using Messaging over WebSocket with STOMP Chapter 6: VNC with the Remote Framebuffer Protocol Chapter 7: WebSocket Security Chapter 8: Deployment Considerations

http://goo.gl/yrenVT

Page 16: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

WebSocket Clients and Server

Page 17: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Enterprise Messaging Extended to the Web

Page 18: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Connected Devices Bridging the Gap Between Hardware and Software

Page 19: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Raspberry Pi

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

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

Page 20: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Demo Setup

Page 21: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Controlling the Light Remotely Using Pub-Sub Over the Web

Page 22: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Light Switch: Range Extended to the Web

Page 23: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Demo

Page 24: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Remote Controlling Car Over the Web - The Architecture

Page 25: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Telemetry Data Distributed to the Web Over Satellite Network

KWG  

Message Broker

JMS WS

JMS WS

Page 26: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Telemetry Data Distributed to the Web Over Satellite Network

KWG  

Message Broker

JMS WS

JMS WS

Page 27: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Telemetry Data Distributed to the Web Over Satellite Network

KWG  

Message Broker

JMS WS

JMS WS

Java App

Page 28: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Telemetry Data Distributed to the Web Over Satellite Network

KWG  

Message Broker

JMS WS

JMS WS

Java App

Page 29: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

About the Quadcopter: DJI Phantom 2

Page 30: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

The Sensor Stack

Page 31: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Arduino: GPS, thermometer, humidity, compass, accelerometer + Go Pro

Page 32: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Satellite Terminal: InmarSat – Geostationary Satellites

Page 33: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Satellite Terminal: InmarSat – Geostationary Satellites

Warning: Microwave radiation Minimum safe distance: 0.6 metres

Page 34: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

The Team

Page 35: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

DEMO

Page 36: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

End-to-end latency: under 1 second

Page 37: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

DEMO

Page 38: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

It’s More Than “Just” the Web

Page 39: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Connected Devices

Page 40: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Connected Devices Communicating with WebSocket

WS

WS

WS WS

WS

WS

WS

WS WS

Page 41: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Connected Devices Communicating with Proprietary Protocols over WS

AMQP/WS

MQTT/WS

JMS/WS

STOMP/WS

XMPP/WS

Page 42: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

What Does KAAZING do?

Clients disconnect

Network intermediaries

Locked down firewalls

Millions of users

High availability

Disaster recovery

Developer productivity

Integration with existing

security infrastructure

Page 43: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Win a Copy

http://goo.gl/yrenVT

Chapter 1: Introduction to HTML5 WebSocket Chapter 2: The WebSocket API Chapter 3: The WebSocket Protocol Chapter 4: Building Instant Messaging and Chat over WebSocket with XMPP Chapter 5: Using Messaging over WebSocket with STOMP Chapter 6: VNC with the Remote Framebuffer Protocol Chapter 7: WebSocket Security Chapter 8: Deployment Considerations

Page 44: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

Learn More

§  http://kaazing.com

§  http://tutorial.kaazing.com

§  http://kaazing.com/telemetry

§  The Definitive Guide to HTML5 WebSocket

Page 45: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT

About Peter

Peter Moskovits Head of Real-Time Solutions [email protected] @pmoskovi

Page 46: HTML5 WebSocket for the Real-Time Weband the Internet of Things

Copyright © 2014 Kaazing Corporation. All Rights Reserved. http://goo.gl/yrenVT