HTML5 WebSocket for the Real-Time Weband the Internet of Things

Post on 29-Nov-2014

487 views 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

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

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

About Peter

Peter Moskovits Head of Real-Time Solutions peter.moskovits@kaazing.com @pmoskovi

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

Demos

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

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

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

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

How Can I Use?

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

How Can I Use?

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

The WebSocket Handshake

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

Available in Chrome Developer Tools

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

Protocol Layering

TCP

Your application

XMPP IMAP/SMTP/POP3

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

Protocol Layering

TCP

Your application

XMPP IMAP/SMTP/POP3 HTTP

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

Protocol Layering

TCP

Your application

XMPP IMAP/SMTP/POP3 HTTP

WebSocket

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

Win a Copy

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

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

WebSocket Clients and Server

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

Enterprise Messaging Extended to the Web

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

Connected Devices Bridging the Gap Between Hardware and Software

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

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

Demo Setup

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

Controlling the Light Remotely Using Pub-Sub Over the Web

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

Light Switch: Range Extended to the Web

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

Demo

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

Remote Controlling Car Over the Web - The Architecture

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

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

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

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

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

About the Quadcopter: DJI Phantom 2

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

The Sensor Stack

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

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

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

Satellite Terminal: InmarSat – Geostationary Satellites

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

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

The Team

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

DEMO

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

End-to-end latency: under 1 second

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

DEMO

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

It’s More Than “Just” the Web

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

Connected Devices

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

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

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

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

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

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

About Peter

Peter Moskovits Head of Real-Time Solutions peter.moskovits@kaazing.com @pmoskovi

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