SlideShare a Scribd company logo
Time to Push to the Mobile Web!
HTML5, Websockets, Mobile Web and Java!




Dominique Guinard
ETH Zurich / MIT Auto-ID Labs
Java Track 8.2
[www.flickr.com/photos/moragcasey/]



Who needs Web Push to a mobile phone?
MOTIVATION
                                        2
Mobile Monitoring of RFID Data

> Use-case:
   –   Simple Web app to monitor RFID
       readers
   –   Scan and run (no install)
   –   Real-time push
> General idea:
   –   No app / install & Cross device
   –   Real-world monitoring apps
   –   Lightweight (near) real-time




                                         3
[ www.flickr.com/photos/docman ]




Web Sockets? Quesako?
BACKGROUND
                                   4
The Problem: (a History of Web Push Hacks)

                            > Long-polling (Comet)
                              – Request – Wait – Request
                            > HTTP Streaming
                              – Connect – Keepalive
                            > …
                            > 101 of how to DoS a thread-
                              blocking Webserver.




                                                           5
The Solution: (HTML5) Websockets

 > Bi-directional & full duplex connection
   on a single TCP socket.
 > Direct support in the browser.
 > NAT, Firewall and (Proxy) traversal




http://jazoon.com/2010/Conference/Wednesday/Lubbers   6
The Solution: (HTML5) Websockets cont’d

> Client in 9 lines of
  Javascript
> Neat! But:
  – DRAFT, DRAFT & DRAFT!
  – Different browsers support
  – Safari for iOS 4.2 is the only
    mobile browser supporting it
    (more coming soon!)
                                     [www.wikipedia.org]




                                                           7
[ www.flickr.com/photos/dhedwards ]




Using Mobile Web Push today… for Java Developers!
TOOLS
                                                    8
Atmosphere

> Atmosphere is a great          Server            Version         Websocket
                                                                   Support
  portable “Web Push”
                                 Glassfish         >3.1            Yes (not
  framework
                                                                   default)
  – Transparent deployment       Tomcat            7               No (but NIO)
    across App/Web Servers
                                 Jetty             > 8 M2          Yes
    (Grizzly/Glassfish, Jetty,
    JBoss, etc.)                 Grizzly           2               Yes

> JQuery Plugin as a portable
  “Web Push” client
                                         I’m just a happy user, check it out
  – Transparent usage across              here: http://atmosphere.java.net/
    browsers, even for mobile
    apps (e.g., using Sencha
    Touch)                                                                        9
[www.flickr.com/photos/lpettinati]




Let’s get our hands dirty
DEMONSTRATION
                                             10
PubSub Server with Atmosphere

                      > A cross-server PubSub in a
                        few lines:
                        – Deployable in Jetty, Tomcat,
                          Glassfish, JBoss, etc.
                      > Smoothly combines with
                        REST and JAX-RS (Jersey)




                                                         11
Mobile Websocket Client

                          > Based on the Atmosphere
                            JQuery Plugin
                            – Cross browser!
                          > Mobile App flavor with
                            Sencha Touch
                          > RFID tags read by the
                            reader are pushed to the
                            mobile Web app!



                                                       12
App & Tomcat 6.26: Uses HTTP Streaming




                                         13
App & Jetty 8.0 M2: True Websocket Connection




                                                14
Architecture of the Demo




                           15
Take home!

> Web Push enables new apps
  – Also for the mobile Web (e.g., with Sencha Touch, Jo, etc.)!
   –   No install, cross-platform
   –   Real-world monitoring apps
  – Short-living interactions with real-time requirements
> HTML5 Websockets are not quite here yet
   –   Wide support in the Web galaxy (Node.js, Socket.io, Pusherapp, etc.)
   –   Emerging support in the Java galaxy…
   –   Glassfish / Grizzly, Jetty and cont’d
   –   Atmosphere and the JQuery plugin is of great help for client and server
       portability!
> Websockets also exist beyond the browser, e.g. for Android/Java

                                                                                 16
Thanks for your attention!
Dominique Guinard                        home: guinard.org
ETH Zurich / MIT Auto-ID Labs            blog: webofthings.com
                                         twitter: @domguinard


Tools/links mentioned in this talk on:
delicious.com/misterdom/jazoon2011

More Related Content

PPTX
Giving RFID a REST: Web-enabled EPCIS
PDF
Web Based Virtual Reality - Tanay Pant - Codemotion Rome 2017
PDF
"Getting started with Web Based Virtual Reality" Pant Tanay, Mozilla Foundation
PDF
Dumb Products can be Smart Too!
KEY
Plack at OSCON 2010
PDF
3 Cups of Java Drivers with a Slice of MongoDB
PPTX
Evrythng @ Web of Things
PDF
If Spock had an Android phone: QRs, 1D, NFC, BLE, Arduinos & the Web of Things
Giving RFID a REST: Web-enabled EPCIS
Web Based Virtual Reality - Tanay Pant - Codemotion Rome 2017
"Getting started with Web Based Virtual Reality" Pant Tanay, Mozilla Foundation
Dumb Products can be Smart Too!
Plack at OSCON 2010
3 Cups of Java Drivers with a Slice of MongoDB
Evrythng @ Web of Things
If Spock had an Android phone: QRs, 1D, NFC, BLE, Arduinos & the Web of Things

Viewers also liked (8)

PPTX
A Universal Application Platform for Sensors, RFID, NFC and Embedded Devices
PDF
Activity Digital Identities in the Web of Things
PDF
Android and the Web of Things: NFC, QR, BLE, Bluetooth, EPC, Arduino
PDF
Workshop: Learning Elasticsearch
PDF
The Art of API Crafting for the IoT
PPTX
Tourism and the Web of Things
PPTX
Business Aspects of the IoT: Making Products Smart
PDF
Web of Things Application Architecture
A Universal Application Platform for Sensors, RFID, NFC and Embedded Devices
Activity Digital Identities in the Web of Things
Android and the Web of Things: NFC, QR, BLE, Bluetooth, EPC, Arduino
Workshop: Learning Elasticsearch
The Art of API Crafting for the IoT
Tourism and the Web of Things
Business Aspects of the IoT: Making Products Smart
Web of Things Application Architecture
Ad

Similar to HTML5, Websockets & the Mobile Web (20)

PPS
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
PPS
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
PDF
Bruce lawson-over-the-air
PDF
Don't touch the mobile parts
PDF
Web apps of the future
PPTX
Web assembly with PWA
PDF
FEDM Meetup: Introducing Mojito
PDF
Extending JMS to Web Devices over HTML5 WebSockets - JavaOne 2011
PDF
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
PDF
A new interface between smart device and web using html5 web socket and qr code
DOC
Jetty Vs Tomcat
PDF
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
PDF
PPTX
Enhancing Mobile User Experience with WebSocket
PDF
Web of Things - Connecting People and Objects on the Web
PDF
Ajax Push For Revolutionary Enterprise Applications
DOCX
PDF
Websocket shanon
PDF
openMIC barcamp 11.02.2010
KEY
Pushing the web — WebSockets
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Bruce lawson-over-the-air
Don't touch the mobile parts
Web apps of the future
Web assembly with PWA
FEDM Meetup: Introducing Mojito
Extending JMS to Web Devices over HTML5 WebSockets - JavaOne 2011
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
A new interface between smart device and web using html5 web socket and qr code
Jetty Vs Tomcat
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
Enhancing Mobile User Experience with WebSocket
Web of Things - Connecting People and Objects on the Web
Ajax Push For Revolutionary Enterprise Applications
Websocket shanon
openMIC barcamp 11.02.2010
Pushing the web — WebSockets
Ad

More from Dominique Guinard (17)

PDF
From the internet of things to the web of things course
PDF
1 billion thngs at a time
PDF
5 Years of Web of Things Workshops
PDF
Cloud Computing, REST and Mashups to Simplify RFID Application Development an...
PDF
Comparing SOAs for the Internet of Things
PDF
WoT Tutorial @ Cisco
PPTX
EPC Cloud: Using the Web to Simplify the Global RFID Network
PPTX
WoT @ Oracle-Labs
PPTX
A ROA for the WOT
PPTX
Epc Mashup Dashboard Salespitch
PDF
Web Messaging for Open for Web of Things
PDF
Physical Mashups in the Web-Home
PPT
RESTifying WS-* Services: Case Study in RFID
PPTX
Social Sharing In a Web of Things
PPT
When Things will Speak "Web" (Lecture)
PPT
Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009
PPT
Using Spatial Conditions for Mobile Applications
From the internet of things to the web of things course
1 billion thngs at a time
5 Years of Web of Things Workshops
Cloud Computing, REST and Mashups to Simplify RFID Application Development an...
Comparing SOAs for the Internet of Things
WoT Tutorial @ Cisco
EPC Cloud: Using the Web to Simplify the Global RFID Network
WoT @ Oracle-Labs
A ROA for the WOT
Epc Mashup Dashboard Salespitch
Web Messaging for Open for Web of Things
Physical Mashups in the Web-Home
RESTifying WS-* Services: Case Study in RFID
Social Sharing In a Web of Things
When Things will Speak "Web" (Lecture)
Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009
Using Spatial Conditions for Mobile Applications

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
sap open course for s4hana steps from ECC to s4
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Diabetes mellitus diagnosis method based random forest with bat algorithm
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Understanding_Digital_Forensics_Presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
MIND Revenue Release Quarter 2 2025 Press Release
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf

HTML5, Websockets & the Mobile Web

  • 1. Time to Push to the Mobile Web! HTML5, Websockets, Mobile Web and Java! Dominique Guinard ETH Zurich / MIT Auto-ID Labs Java Track 8.2
  • 2. [www.flickr.com/photos/moragcasey/] Who needs Web Push to a mobile phone? MOTIVATION 2
  • 3. Mobile Monitoring of RFID Data > Use-case: – Simple Web app to monitor RFID readers – Scan and run (no install) – Real-time push > General idea: – No app / install & Cross device – Real-world monitoring apps – Lightweight (near) real-time 3
  • 4. [ www.flickr.com/photos/docman ] Web Sockets? Quesako? BACKGROUND 4
  • 5. The Problem: (a History of Web Push Hacks) > Long-polling (Comet) – Request – Wait – Request > HTTP Streaming – Connect – Keepalive > … > 101 of how to DoS a thread- blocking Webserver. 5
  • 6. The Solution: (HTML5) Websockets > Bi-directional & full duplex connection on a single TCP socket. > Direct support in the browser. > NAT, Firewall and (Proxy) traversal http://jazoon.com/2010/Conference/Wednesday/Lubbers 6
  • 7. The Solution: (HTML5) Websockets cont’d > Client in 9 lines of Javascript > Neat! But: – DRAFT, DRAFT & DRAFT! – Different browsers support – Safari for iOS 4.2 is the only mobile browser supporting it (more coming soon!) [www.wikipedia.org] 7
  • 8. [ www.flickr.com/photos/dhedwards ] Using Mobile Web Push today… for Java Developers! TOOLS 8
  • 9. Atmosphere > Atmosphere is a great Server Version Websocket Support portable “Web Push” Glassfish >3.1 Yes (not framework default) – Transparent deployment Tomcat 7 No (but NIO) across App/Web Servers Jetty > 8 M2 Yes (Grizzly/Glassfish, Jetty, JBoss, etc.) Grizzly 2 Yes > JQuery Plugin as a portable “Web Push” client I’m just a happy user, check it out – Transparent usage across here: http://atmosphere.java.net/ browsers, even for mobile apps (e.g., using Sencha Touch) 9
  • 11. PubSub Server with Atmosphere > A cross-server PubSub in a few lines: – Deployable in Jetty, Tomcat, Glassfish, JBoss, etc. > Smoothly combines with REST and JAX-RS (Jersey) 11
  • 12. Mobile Websocket Client > Based on the Atmosphere JQuery Plugin – Cross browser! > Mobile App flavor with Sencha Touch > RFID tags read by the reader are pushed to the mobile Web app! 12
  • 13. App & Tomcat 6.26: Uses HTTP Streaming 13
  • 14. App & Jetty 8.0 M2: True Websocket Connection 14
  • 16. Take home! > Web Push enables new apps – Also for the mobile Web (e.g., with Sencha Touch, Jo, etc.)! – No install, cross-platform – Real-world monitoring apps – Short-living interactions with real-time requirements > HTML5 Websockets are not quite here yet – Wide support in the Web galaxy (Node.js, Socket.io, Pusherapp, etc.) – Emerging support in the Java galaxy… – Glassfish / Grizzly, Jetty and cont’d – Atmosphere and the JQuery plugin is of great help for client and server portability! > Websockets also exist beyond the browser, e.g. for Android/Java 16
  • 17. Thanks for your attention! Dominique Guinard home: guinard.org ETH Zurich / MIT Auto-ID Labs blog: webofthings.com twitter: @domguinard Tools/links mentioned in this talk on: delicious.com/misterdom/jazoon2011