SlideShare a Scribd company logo
Realtime web:
Not there yet!

           Marek Majkowski
           marek@rabbitmq.com




                                1
Nogi




       2
3
4
5
6
7
WebSockets

hixie-75              4    5.0.0
              4                        11
hixie-76              6    5.0.1
         (disabled)                (disabled)
hybi-07      6

hybi-10      7        14                        10-dev


                                                         8
Spot the difference!
$ nc localhost 8080                            $ nc localhost 12345
GET /broadcast/765/321/websocket HTTP/1.1      GET /echo HTTP/1.1
Origin: http://172.16.173.128:8080             Origin: http://172.16.173.128:12345
Host: 172.16.173.128:8080                      Host: 172.16.173.128:12345
Connection: Upgrade                            Connection: Upgrade
Upgrade: WebSocket                             Upgrade: WebSocket
Sec-WebSocket-Key2: `1]2037 7 GX 'f<Vb1*5$64   Sec-WebSocket-Key2: `1]2037 7 GX 'f<Vb1*5$64
Sec-WebSocket-Key1: 2Uf ?<,4C28E1K7J4+208      Sec-WebSocket-Key1: 2Uf ?<,4C28E1K7J4+208
Cookie2: $Version=1                            Cookie2: $Version=1
Cookie: JSESSIONID=a                           Cookie: JSESSIONID=a

aaaaaaaaaaaaaaa                                aaaaaaaaaaaaaaa
HTTP/1.1 101 WebSocket Protocol Handshake      HTTP/1.1 101 WebSocket Protocol Handshake
Upgrade: websocket                             Upgrade: WebSocket
Connection: Upgrade                            Connection: Upgrade
Sec-WebSocket-Location: ws://[...]             Sec-WebSocket-Location: ws://[...]
Sec-WebSocket-Origin: http://[...]             Sec-WebSocket-Origin: http://[...]

m"7]SDgo0                                      m"7]SDgo0
^C                                             ^C




                                                                                           9
The RFC says
-> If the entry's name is "upgrade"
   If the value is not exactly equal to the string "WebSocket",
   then fail the WebSocket connection and abort these steps.

[...]

|Upgrade|
   The value must be the string "WebSocket".

[...]

|Upgrade|
   Invariant part of the handshake. Will always have a value
   that is an ASCII case-insensitive match for the string
   "WebSocket".




                                                                  10
Proxies
GET /echo/070/lm6wwjpr/websocket HTTP/1.1        CONNECT sockjs1.popcnt.org:80 HTTP/1.1
Host: sockjs1.popcnt.org                         Host: sockjs1.popcnt.org
User-Agent: [...] Gecko/20100101 Firefox/6.0.2   Proxy-Connection: keep-alive
Accept: text/html,application/xhtml [...]
Accept-Language: en-us,en;q=0.5                  GET /echo/855/duzzy2p1/websocket HTTP/1.1
Accept-Encoding: gzip, deflate                   Upgrade: WebSocket
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7   Connection: Upgrade
Sec-WebSocket-Version: 7                         Host: sockjs1.popcnt.org
Sec-WebSocket-Origin: http://sockjs.popcnt.org   Origin: http://sockjs.popcnt.org
Sec-WebSocket-Key: bzG4fOYXabSiy42uFj6vjA==      Sec-WebSocket-Key1: 22p/ D"47900%n7 r90.
Pragma: no-cache                                 Sec-WebSocket-Key2: m49" 5 f 24772 Ra
Cache-Control: no-cache
Upgrade: websocket
Connection: Upgrade

HTTP/1.0 400 Bad Request
Server: squid/2.7.STABLE9
Date: Wed, 21 Sep 2011 06:16:10 GMT
Content-Type: text/html
Content-Length: 1943
X-Squid-Error: ERR_INVALID_REQ 0
X-Cache: MISS from mrstu
X-Cache-Lookup: NONE from mrstu:3128
Via: 1.0 mrstu:3128 (squid/2.7.STABLE9)
Connection: close




                                                                                          11
• #1 Realtime web: Not there yet!



                                    12
Shared nothing + database




                            13
Shared nothing + message bus




                               14
Node.js + Socket.io




                      15
Sync + Async




               16
Sync + Service




                 17
18
Google App Engine




                    19
Google App Engine


•   Simplex




                           19
Google App Engine


•   Simplex

•   No broadcast




                           19
Google App Engine


•   Simplex

•   No broadcast

•   No presence




                           19
PubNub




         20
PubNub

•   Duplex




                      20
PubNub

•   Duplex

•   Broadcast




                         20
PubNub

•   Duplex

•   Broadcast

•   No access rights




                            20
PubNub

•   Duplex

•   Broadcast

•   No access rights

•   No identity




                            20
Pusher




         21
Pusher

•   Simplex




                       21
Pusher

•   Simplex

•   Broadcast




                         21
Pusher

•   Simplex

•   Broadcast

•   Access rights *




                               21
Pusher

•   Simplex

•   Broadcast

•   Access rights *

•   Identity *




                               21
Pusher

•   Simplex

•   Broadcast

•   Access rights *

•   Identity *

•   Presence *



                               21
We can do better




                   22
We can do better

•   Duplex




                           22
We can do better

•   Duplex

•   Broadcast




                           22
We can do better

•   Duplex

•   Broadcast

•   Access rights




                            22
We can do better

•   Duplex

•   Broadcast

•   Access rights

•   Identity




                            22
We can do better

•   Duplex

•   Broadcast

•   Access rights

•   Identity

•   Presence



                            22
23
•   Authorisation




                    23
•   Authorisation

    •   Identity




                    23
•   Authorisation

    •   Identity

    •   Permissions




                      23
•   Authorisation

    •   Identity

    •   Permissions

•   Resource definitions + semantics




                                      23
•   Authorisation

    •   Identity

    •   Permissions

•   Resource definitions + semantics

•   Value + updates?




                                      23
•   Authorisation

    •   Identity

    •   Permissions

•   Resource definitions + semantics

•   Value + updates?

•   Messages back to App (WebHooks)




                                      23
•   Authorisation

    •   Identity

    •   Permissions

•   Resource definitions + semantics

•   Value + updates?

•   Messages back to App (WebHooks)

•   Presence



                                      23
•   Authorisation

    •   Identity

    •   Permissions

•   Resource definitions + semantics

•   Value + updates?

•   Messages back to App (WebHooks)

•   Presence

•   Good luck writing documentation!


                                       23
Service?




           24
Sync + Async




               25
Fully async




              26
SockJS




         27
• #3 Realtime web: Not there yet!



                                    28
29
30
#sockjs

github.com/sockjs
                    31
1. token




           32
2. token




           33
3. token




           34
So?




      35
36

More Related Content

Viewers also liked

K O N P E T E N T Z I A D I G I T A L A
K O N P E T E N T Z I A  D I G I T A L AK O N P E T E N T Z I A  D I G I T A L A
K O N P E T E N T Z I A D I G I T A L AJoakintxo
 
Presentation
PresentationPresentation
Presentationnuttynico
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12mercetorrasgali
 
Martin sustrik future_of_messaging
Martin sustrik future_of_messagingMartin sustrik future_of_messaging
Martin sustrik future_of_messaging
Skills Matter Talks
 
Real World Scalaz
Real World ScalazReal World Scalaz
Real World Scalaz
Skills Matter Talks
 

Viewers also liked (10)

K O N P E T E N T Z I A D I G I T A L A
K O N P E T E N T Z I A  D I G I T A L AK O N P E T E N T Z I A  D I G I T A L A
K O N P E T E N T Z I A D I G I T A L A
 
Couch db skillsmatter-prognosql
Couch db skillsmatter-prognosqlCouch db skillsmatter-prognosql
Couch db skillsmatter-prognosql
 
Presentation
PresentationPresentation
Presentation
 
;)
;);)
;)
 
12
1212
12
 
Pdhpe pp
Pdhpe ppPdhpe pp
Pdhpe pp
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12
 
Martin sustrik future_of_messaging
Martin sustrik future_of_messagingMartin sustrik future_of_messaging
Martin sustrik future_of_messaging
 
Audit toolkit
Audit toolkitAudit toolkit
Audit toolkit
 
Real World Scalaz
Real World ScalazReal World Scalaz
Real World Scalaz
 

Similar to Marek pubsubhuddle realtime_web

ekb.py: KISS REST API
ekb.py: KISS REST APIekb.py: KISS REST API
ekb.py: KISS REST APIYury Yurevich
 
Inside Of Mbga Open Platform
Inside Of Mbga Open PlatformInside Of Mbga Open Platform
Inside Of Mbga Open PlatformHideo Kimura
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerJohn Willis
 
BitcoinJS Webtuesday Presentation
BitcoinJS Webtuesday PresentationBitcoinJS Webtuesday Presentation
BitcoinJS Webtuesday Presentationjustmoon
 
ekbpy'2012- Юрий Юревич - Как сделать REST API на Python
ekbpy'2012- Юрий Юревич - Как сделать REST API на Pythonekbpy'2012- Юрий Юревич - Как сделать REST API на Python
ekbpy'2012- Юрий Юревич - Как сделать REST API на Pythonit-people
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
Gunnar Hillert
 
Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web Servers
Troy Miles
 
The data layer
The data layerThe data layer
The data layer
Ian Holsman
 
Creating social games for millions of users
Creating social games for millions of usersCreating social games for millions of users
Creating social games for millions of users
Bastian Hofmann
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
Roy Clarkson
 
Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forward
Mark Roden
 
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
Heejong Ahn
 
Html5: Something wicked this way comes (Hack in Paris)
Html5: Something wicked this way comes (Hack in Paris)Html5: Something wicked this way comes (Hack in Paris)
Html5: Something wicked this way comes (Hack in Paris)
Krzysztof Kotowicz
 
Web前端性能优化 2014
Web前端性能优化 2014Web前端性能优化 2014
Web前端性能优化 2014
Yubei Li
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bend
Raj Lal
 
Comunicando nuestras apps con el mundo exterior
Comunicando nuestras apps con el mundo exteriorComunicando nuestras apps con el mundo exterior
Comunicando nuestras apps con el mundo exterior
Roberto Luis Bisbé
 
DockerCon14 Keynote
DockerCon14 KeynoteDockerCon14 Keynote
DockerCon14 KeynoteDocker, Inc.
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben Golub
dotCloud
 
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soulLet's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Swanand Pagnis
 
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015Jonas Rosland
 

Similar to Marek pubsubhuddle realtime_web (20)

ekb.py: KISS REST API
ekb.py: KISS REST APIekb.py: KISS REST API
ekb.py: KISS REST API
 
Inside Of Mbga Open Platform
Inside Of Mbga Open PlatformInside Of Mbga Open Platform
Inside Of Mbga Open Platform
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
BitcoinJS Webtuesday Presentation
BitcoinJS Webtuesday PresentationBitcoinJS Webtuesday Presentation
BitcoinJS Webtuesday Presentation
 
ekbpy'2012- Юрий Юревич - Как сделать REST API на Python
ekbpy'2012- Юрий Юревич - Как сделать REST API на Pythonekbpy'2012- Юрий Юревич - Как сделать REST API на Python
ekbpy'2012- Юрий Юревич - Как сделать REST API на Python
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
 
Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web Servers
 
The data layer
The data layerThe data layer
The data layer
 
Creating social games for millions of users
Creating social games for millions of usersCreating social games for millions of users
Creating social games for millions of users
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forward
 
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`
 
Html5: Something wicked this way comes (Hack in Paris)
Html5: Something wicked this way comes (Hack in Paris)Html5: Something wicked this way comes (Hack in Paris)
Html5: Something wicked this way comes (Hack in Paris)
 
Web前端性能优化 2014
Web前端性能优化 2014Web前端性能优化 2014
Web前端性能优化 2014
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bend
 
Comunicando nuestras apps con el mundo exterior
Comunicando nuestras apps con el mundo exteriorComunicando nuestras apps con el mundo exterior
Comunicando nuestras apps con el mundo exterior
 
DockerCon14 Keynote
DockerCon14 KeynoteDockerCon14 Keynote
DockerCon14 Keynote
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben Golub
 
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soulLet's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
 
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015
 

More from Skills Matter Talks

Project kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scalaProject kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scala
Skills Matter Talks
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
Skills Matter Talks
 
Prediction suretogowrong
Prediction suretogowrongPrediction suretogowrong
Prediction suretogowrong
Skills Matter Talks
 

More from Skills Matter Talks (7)

Zaharia spark-scala-days-2012
Zaharia spark-scala-days-2012Zaharia spark-scala-days-2012
Zaharia spark-scala-days-2012
 
Cnc scala-presentation
Cnc scala-presentationCnc scala-presentation
Cnc scala-presentation
 
Arvindsujeeth scaladays12
Arvindsujeeth scaladays12Arvindsujeeth scaladays12
Arvindsujeeth scaladays12
 
Scala days mizushima
Scala days mizushimaScala days mizushima
Scala days mizushima
 
Project kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scalaProject kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scala
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
 
Prediction suretogowrong
Prediction suretogowrongPrediction suretogowrong
Prediction suretogowrong
 

Recently uploaded

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 

Recently uploaded (20)

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 

Marek pubsubhuddle realtime_web

  • 1. Realtime web: Not there yet! Marek Majkowski marek@rabbitmq.com 1
  • 2. Nogi 2
  • 3. 3
  • 4. 4
  • 5. 5
  • 6. 6
  • 7. 7
  • 8. WebSockets hixie-75 4 5.0.0 4 11 hixie-76 6 5.0.1 (disabled) (disabled) hybi-07 6 hybi-10 7 14 10-dev 8
  • 9. Spot the difference! $ nc localhost 8080 $ nc localhost 12345 GET /broadcast/765/321/websocket HTTP/1.1 GET /echo HTTP/1.1 Origin: http://172.16.173.128:8080 Origin: http://172.16.173.128:12345 Host: 172.16.173.128:8080 Host: 172.16.173.128:12345 Connection: Upgrade Connection: Upgrade Upgrade: WebSocket Upgrade: WebSocket Sec-WebSocket-Key2: `1]2037 7 GX 'f<Vb1*5$64 Sec-WebSocket-Key2: `1]2037 7 GX 'f<Vb1*5$64 Sec-WebSocket-Key1: 2Uf ?<,4C28E1K7J4+208 Sec-WebSocket-Key1: 2Uf ?<,4C28E1K7J4+208 Cookie2: $Version=1 Cookie2: $Version=1 Cookie: JSESSIONID=a Cookie: JSESSIONID=a aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa HTTP/1.1 101 WebSocket Protocol Handshake HTTP/1.1 101 WebSocket Protocol Handshake Upgrade: websocket Upgrade: WebSocket Connection: Upgrade Connection: Upgrade Sec-WebSocket-Location: ws://[...] Sec-WebSocket-Location: ws://[...] Sec-WebSocket-Origin: http://[...] Sec-WebSocket-Origin: http://[...] m"7]SDgo0 m"7]SDgo0 ^C ^C 9
  • 10. The RFC says -> If the entry's name is "upgrade" If the value is not exactly equal to the string "WebSocket", then fail the WebSocket connection and abort these steps. [...] |Upgrade| The value must be the string "WebSocket". [...] |Upgrade| Invariant part of the handshake. Will always have a value that is an ASCII case-insensitive match for the string "WebSocket". 10
  • 11. Proxies GET /echo/070/lm6wwjpr/websocket HTTP/1.1 CONNECT sockjs1.popcnt.org:80 HTTP/1.1 Host: sockjs1.popcnt.org Host: sockjs1.popcnt.org User-Agent: [...] Gecko/20100101 Firefox/6.0.2 Proxy-Connection: keep-alive Accept: text/html,application/xhtml [...] Accept-Language: en-us,en;q=0.5 GET /echo/855/duzzy2p1/websocket HTTP/1.1 Accept-Encoding: gzip, deflate Upgrade: WebSocket Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: Upgrade Sec-WebSocket-Version: 7 Host: sockjs1.popcnt.org Sec-WebSocket-Origin: http://sockjs.popcnt.org Origin: http://sockjs.popcnt.org Sec-WebSocket-Key: bzG4fOYXabSiy42uFj6vjA== Sec-WebSocket-Key1: 22p/ D"47900%n7 r90. Pragma: no-cache Sec-WebSocket-Key2: m49" 5 f 24772 Ra Cache-Control: no-cache Upgrade: websocket Connection: Upgrade HTTP/1.0 400 Bad Request Server: squid/2.7.STABLE9 Date: Wed, 21 Sep 2011 06:16:10 GMT Content-Type: text/html Content-Length: 1943 X-Squid-Error: ERR_INVALID_REQ 0 X-Cache: MISS from mrstu X-Cache-Lookup: NONE from mrstu:3128 Via: 1.0 mrstu:3128 (squid/2.7.STABLE9) Connection: close 11
  • 12. • #1 Realtime web: Not there yet! 12
  • 13. Shared nothing + database 13
  • 14. Shared nothing + message bus 14
  • 18. 18
  • 20. Google App Engine • Simplex 19
  • 21. Google App Engine • Simplex • No broadcast 19
  • 22. Google App Engine • Simplex • No broadcast • No presence 19
  • 23. PubNub 20
  • 24. PubNub • Duplex 20
  • 25. PubNub • Duplex • Broadcast 20
  • 26. PubNub • Duplex • Broadcast • No access rights 20
  • 27. PubNub • Duplex • Broadcast • No access rights • No identity 20
  • 28. Pusher 21
  • 29. Pusher • Simplex 21
  • 30. Pusher • Simplex • Broadcast 21
  • 31. Pusher • Simplex • Broadcast • Access rights * 21
  • 32. Pusher • Simplex • Broadcast • Access rights * • Identity * 21
  • 33. Pusher • Simplex • Broadcast • Access rights * • Identity * • Presence * 21
  • 34. We can do better 22
  • 35. We can do better • Duplex 22
  • 36. We can do better • Duplex • Broadcast 22
  • 37. We can do better • Duplex • Broadcast • Access rights 22
  • 38. We can do better • Duplex • Broadcast • Access rights • Identity 22
  • 39. We can do better • Duplex • Broadcast • Access rights • Identity • Presence 22
  • 40. 23
  • 41. Authorisation 23
  • 42. Authorisation • Identity 23
  • 43. Authorisation • Identity • Permissions 23
  • 44. Authorisation • Identity • Permissions • Resource definitions + semantics 23
  • 45. Authorisation • Identity • Permissions • Resource definitions + semantics • Value + updates? 23
  • 46. Authorisation • Identity • Permissions • Resource definitions + semantics • Value + updates? • Messages back to App (WebHooks) 23
  • 47. Authorisation • Identity • Permissions • Resource definitions + semantics • Value + updates? • Messages back to App (WebHooks) • Presence 23
  • 48. Authorisation • Identity • Permissions • Resource definitions + semantics • Value + updates? • Messages back to App (WebHooks) • Presence • Good luck writing documentation! 23
  • 49. Service? 24
  • 52. SockJS 27
  • 53. • #3 Realtime web: Not there yet! 28
  • 54. 29
  • 55. 30
  • 57. 1. token 32
  • 58. 2. token 33
  • 59. 3. token 34
  • 60. So? 35
  • 61. 36