500 likes | 660 Views
JMS, WebSocket , and the Internet of Things. Controlling Physical Devices on the Real Time Web. David Witherspoon Prashant Khanal Sep 25, 2013. About Us. Prashant Khanal Software Engineer – Kaazing Prashant.Khanal@kaazing.com Twitter : @ ipras. David Witherspoon
E N D
JMS, WebSocket, and the Internet of Things Controlling Physical Devices on the Real Time Web David Witherspoon Prashant Khanal Sep 25, 2013
About Us • Prashant Khanal • Software Engineer – Kaazing • Prashant.Khanal@kaazing.com • Twitter: @ipras • David Witherspoon • Software Engineer – Kaazing • David.Witherspoon@kaazing.com • Twitter: @dpwspoon
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
Raspberry Pi • Image source: http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html
Raspberry Pi Resources • RaspberryPi.org • Wheezy (OS) • Oracle JVM • Pi4J (Raspberry Pi Java Library)
Messaging for the IoT • Messaging Style • Interconnected / Bidirectional • Dynamic States (Could be on or off) • Messaging Protocol Requirements • Identity • Data formats • Transactions • Acknowledgments • And more …
Message Systems/Protocols for the IoT • Java Message Service (JMS) • Standard messaging API • Vendor independent • Pub / Sub • Loosely Coupled
Challenges with TCP • Isolated networks • Firewalls • Ports • Web browsers
HTML5 WebSocket: TCP for the Web • Standard Protocol (IETF): RFC-6455 • Standard API: • W3C: JavaScript • JSR 356: Java EE • Single socket, full-duplex • Low overhead: <1% of HTTP • Low latency: low milliseconds • SSL support Full duplex
Protocol Layering Browsers, Native Applications and IoT Devices WebSocket JMS XMPP AMQP B2B FTP VNC mktdata etc TCP Internet WebSocket Gateway WebSocket Gateway
WebSocket Powering the Web of Things WS WS WS WS WS WS WS WS WS
Extending Protocols to the Web of Things XMPP/WS MQTT/WS AMQP/WS STOMP/WS JMS/WS
Raspberry Pi Resources • RaspberryPi.org • http://www.raspberrypi.org/ • Wheezy (OS) • http://www.raspberrypi.org/downloads • Oracle JVM on the Pi • http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html • Pi4J (Raspberry Pi Java Library) • http://pi4j.com/
Find Out More • The Zinger – Blog: • http://blog.kaazing.com • HTML5 Developer Conference • October 22-23, 2013, San Francisco, Moscone North • 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