SlideShare uma empresa Scribd logo
1 de 32
Stay Connected Mobile Pushing Apps with WebSockets Alexander Schulze Predrag Stojadinovic jWebSocket – Open Source Cross-Browser/Cross-Platform WebSocket Solution
Today's session ,[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Apps in Transition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
WebSockets Basics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
What we have: HTTP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Nearly Realtime Mechanisms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Costs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
WebSockets ?  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
TCP instead of HTTP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Establishing Connection ,[object Object],jWebSocket – Stay Connected 09/12/10 Client GET {path} HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: {hostname}:{port} Origin: http://{host}[:{port}] Sec-WebSocket-Key1: {sec-key1} Sec-WebSocket-Key2: {sec-key2} 8 Bytes generated {sec-key3}  
Establishing Connection ,[object Object],jWebSocket – Stay Connected 09/12/10 Client GET /services/chat/;room=Foyer HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: jwebsocket.org Origin: http://jwebsocket.org Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5 Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 ^n:ds[4U Server HTTP/1.1 101 WebSocket Protocol Handshake Upgrade: WebSocket Connection: Upgrade Sec-WebSocket-Origin: http://jwebsocket.org Sec-WebSocket-Location: ws://jwebsocket.org/   services/chat 8jKS'y:G*Co,Wxa-
Bi-directional data exchange ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
WebSockets TCP vs. HTTP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
WebSockets – Why? ,[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
WebSockets – What for ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
HTML5 Browser ,[object Object],jWebSocket – Stay Connected 09/12/10 var lWebSocketClient = new WebSocket("ws://jwebsocket.org:8787"); // tries to open the TCP connection and to exchange handshake lWebSocketClient. onopen  = function(aEvent) { // connection has successfully been established } lWebSocketClient. onmessage  = function(aEvent) { // a data packet has completely been received in aEvent.data } lWebSocketClient. onclose  = function(aEvent) { // the connection has been terminated } lWebSocketClient. send ("Hello World!"); // sends a UTF-8 text message to the server lWebSocketClient. close (); // terminates the connection
Compatibility ,[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Token ,[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
jWebSocket Server ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
jWebSocket JavaScript Client ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
WebSockets – How? ,[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Android - Dalvik VM ,[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Low-Level-Interface ,[object Object],jWebSocket – Stay Connected 09/12/10 public interface WebSocketClient { void  open (String aURL) throws WebSocketException; void  send (WebSocketPacket aPacket) throws WebSocketException; void  close () throws WebSocketException; boolean  isConnected (); void  addListener (WebSocketClientListener aListener); void  removeListener (WebSocketClientListener aListener); void  notifyOpened (WebSocketClientEvent aEvent); void  notifyPacket (WebSocketClientEvent aEvent, WebSocketPacket(aPacket); void  notifyClosed (WebSocketClientEvent aEvent); }
Listener ,[object Object],jWebSocket – Stay Connected 09/12/10 public interface WebSocketClientListener { void  processOpened (WebSocketClientEvent aEvent); void  processPaket (WebSocketClientEvent aEvent, WebSocketPacket aPacket); void  processClosed (WebSocketClientEvent aEvent); }
Java WebSocket Client jWebSocket – Stay Connected 09/12/10
Android Demo App ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Android Fundamentals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Android Canvas Demo ,[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Android - transfer photos ,[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
In-house ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10
Thank you for your attention! ,[object Object],[object Object],[object Object],[object Object],[object Object],jWebSocket – Stay Connected 09/12/10

Mais conteúdo relacionado

Mais procurados

Sencha touchonbb10 bootcamp
Sencha touchonbb10 bootcampSencha touchonbb10 bootcamp
Sencha touchonbb10 bootcamp
n_adam_stanley
 

Mais procurados (14)

WebRTC. Yet Another Overview, for IT Technicians.
WebRTC. Yet Another Overview, for IT Technicians.WebRTC. Yet Another Overview, for IT Technicians.
WebRTC. Yet Another Overview, for IT Technicians.
 
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
 
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone Bordet
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone BordetHTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone Bordet
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone Bordet
 
5. HTML5
5. HTML55. HTML5
5. HTML5
 
Web Browser as Universal client for IoT
Web Browser as Universal client for IoTWeb Browser as Universal client for IoT
Web Browser as Universal client for IoT
 
Proxy Not A Product
Proxy Not A ProductProxy Not A Product
Proxy Not A Product
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
Building a Next Generation Mobile Browser using Web technologies
Building a Next Generation Mobile Browser using Web technologiesBuilding a Next Generation Mobile Browser using Web technologies
Building a Next Generation Mobile Browser using Web technologies
 
WebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyWebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco Strategy
 
The WebKit project
The WebKit projectThe WebKit project
The WebKit project
 
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time CommunicationsBoost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
 
Html5 features: location, history and offline apps
Html5 features: location, history and offline appsHtml5 features: location, history and offline apps
Html5 features: location, history and offline apps
 
Sencha touchonbb10 bootcamp
Sencha touchonbb10 bootcampSencha touchonbb10 bootcamp
Sencha touchonbb10 bootcamp
 
Sg conference multiplatform_apps_adam_stanley
Sg conference multiplatform_apps_adam_stanleySg conference multiplatform_apps_adam_stanley
Sg conference multiplatform_apps_adam_stanley
 

Semelhante a jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry

V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
brent bucci
 
Dev con kolkata 2012 websockets
Dev con kolkata 2012   websocketsDev con kolkata 2012   websockets
Dev con kolkata 2012 websockets
SANKARSAN BOSE
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
Viktor Gamov
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
Paul Klipp
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
Volodymyr Lavrynovych
 
A new interface between smart device and web using html5 web socket and qr code
A new interface between smart device and web using html5 web socket and qr codeA new interface between smart device and web using html5 web socket and qr code
A new interface between smart device and web using html5 web socket and qr code
Matthew Chang
 

Semelhante a jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry (20)

J web socket
J web socketJ web socket
J web socket
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocket
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
 
Dev con kolkata 2012 websockets
Dev con kolkata 2012   websocketsDev con kolkata 2012   websockets
Dev con kolkata 2012 websockets
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the Web
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
Web-Socket
Web-SocketWeb-Socket
Web-Socket
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
Introduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and SilverlightIntroduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and Silverlight
 
HTML5, Websockets & the Mobile Web
HTML5, Websockets & the Mobile WebHTML5, Websockets & the Mobile Web
HTML5, Websockets & the Mobile Web
 
WebSockets in JEE 7
WebSockets in JEE 7WebSockets in JEE 7
WebSockets in JEE 7
 
WebSocket Server - Jul 2010
WebSocket Server - Jul 2010WebSocket Server - Jul 2010
WebSocket Server - Jul 2010
 
WebRCT
WebRCTWebRCT
WebRCT
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
 
DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
 
Oracle JET and WebSocket
Oracle JET and WebSocketOracle JET and WebSocket
Oracle JET and WebSocket
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 
A new interface between smart device and web using html5 web socket and qr code
A new interface between smart device and web using html5 web socket and qr codeA new interface between smart device and web using html5 web socket and qr code
A new interface between smart device and web using html5 web socket and qr code
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry

  • 1. Stay Connected Mobile Pushing Apps with WebSockets Alexander Schulze Predrag Stojadinovic jWebSocket – Open Source Cross-Browser/Cross-Platform WebSocket Solution
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Java WebSocket Client jWebSocket – Stay Connected 09/12/10
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.