Enviar pesquisa
Carregar
Cowboy rabbit-websockets
•
1 gostou
•
4,941 visualizações
Wade Mealing
Seguir
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 45
Baixar agora
Baixar para ler offline
Recomendados
Websocket 101 in Python
Websocket 101 in Python
Juti Noppornpitak
dotNetConf2019
dotNetConf2019
Andrea Tosato
Alex carcea, radu macovei a story of how java script joined the big league
Alex carcea, radu macovei a story of how java script joined the big league
Codecamp Romania
Using Websockets in Play !
Using Websockets in Play !
Knoldus Inc.
Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09
Ilya Grigorik
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
tdc-globalcode
SPDY
SPDY
Andreas Bjärlestam
Liberating the Black Box - Real-Time Communications for the Internet of Things
Liberating the Black Box - Real-Time Communications for the Internet of Things
Peter Moskovits
Recomendados
Websocket 101 in Python
Websocket 101 in Python
Juti Noppornpitak
dotNetConf2019
dotNetConf2019
Andrea Tosato
Alex carcea, radu macovei a story of how java script joined the big league
Alex carcea, radu macovei a story of how java script joined the big league
Codecamp Romania
Using Websockets in Play !
Using Websockets in Play !
Knoldus Inc.
Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09
Ilya Grigorik
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
tdc-globalcode
SPDY
SPDY
Andreas Bjärlestam
Liberating the Black Box - Real-Time Communications for the Internet of Things
Liberating the Black Box - Real-Time Communications for the Internet of Things
Peter Moskovits
Communication in Python and the C10k problem
Communication in Python and the C10k problem
Jose Galarza
Websocket protocol overview
Websocket protocol overview
allenmeng
A look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architecture
Aimee Maree Forsstrom
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
Alessandro Pilotti
HTTP/2 and SAP Fiori
HTTP/2 and SAP Fiori
Sascha Wenninger
Smuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTP
Dávid Halász
Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09
funkatron
SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0
Andreas Bjärlestam
Websockets at tossug
Websockets at tossug
clkao
Php Performance On Windows
Php Performance On Windows
ruslany
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
Jackson F. de A. Mafra
Zendcon magento101
Zendcon magento101
Mathew Beane
Implement server push in flask framework
Implement server push in flask framework
Chi-Chia Huang
Open web mail setup
Open web mail setup
Chacheng Oo
T3DD12 Caching with Varnish
T3DD12 Caching with Varnish
AOE
PHP Custom Web application development
PHP Custom Web application development
Marion Welch
Perl ides
Perl ides
Naim Shafiev
Tomcat openssl
Tomcat openssl
Jean-Frederic Clere
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
sullis
Word press workflows and gulp
Word press workflows and gulp
Eli McMakin
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the Web
Peter Lubbers
WebSockets On Fire
WebSockets On Fire
Jef Claes
Mais conteúdo relacionado
Mais procurados
Communication in Python and the C10k problem
Communication in Python and the C10k problem
Jose Galarza
Websocket protocol overview
Websocket protocol overview
allenmeng
A look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architecture
Aimee Maree Forsstrom
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
Alessandro Pilotti
HTTP/2 and SAP Fiori
HTTP/2 and SAP Fiori
Sascha Wenninger
Smuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTP
Dávid Halász
Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09
funkatron
SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0
Andreas Bjärlestam
Websockets at tossug
Websockets at tossug
clkao
Php Performance On Windows
Php Performance On Windows
ruslany
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
Jackson F. de A. Mafra
Zendcon magento101
Zendcon magento101
Mathew Beane
Implement server push in flask framework
Implement server push in flask framework
Chi-Chia Huang
Open web mail setup
Open web mail setup
Chacheng Oo
T3DD12 Caching with Varnish
T3DD12 Caching with Varnish
AOE
PHP Custom Web application development
PHP Custom Web application development
Marion Welch
Perl ides
Perl ides
Naim Shafiev
Tomcat openssl
Tomcat openssl
Jean-Frederic Clere
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
sullis
Word press workflows and gulp
Word press workflows and gulp
Eli McMakin
Mais procurados
(20)
Communication in Python and the C10k problem
Communication in Python and the C10k problem
Websocket protocol overview
Websocket protocol overview
A look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architecture
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
HTTP/2 and SAP Fiori
HTTP/2 and SAP Fiori
Smuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTP
Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09
SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0
Websockets at tossug
Websockets at tossug
Php Performance On Windows
Php Performance On Windows
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
Zendcon magento101
Zendcon magento101
Implement server push in flask framework
Implement server push in flask framework
Open web mail setup
Open web mail setup
T3DD12 Caching with Varnish
T3DD12 Caching with Varnish
PHP Custom Web application development
PHP Custom Web application development
Perl ides
Perl ides
Tomcat openssl
Tomcat openssl
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
Word press workflows and gulp
Word press workflows and gulp
Semelhante a Cowboy rabbit-websockets
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the Web
Peter Lubbers
WebSockets On Fire
WebSockets On Fire
Jef Claes
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 Developers
Viktor Gamov
Pushing the web — WebSockets
Pushing the web — WebSockets
Roland M
Ws
Ws
Sunghan Kim
Socket.io
Socket.io
Diego Pacheco
The HTML5 WebSocket API
The HTML5 WebSocket API
David Lindkvist
Progressive Enhancement
Progressive Enhancement
Zach Leatherman
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
Richard Banks
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Edgar Silva
WebSockets in JEE 7
WebSockets in JEE 7
Shahzad Badar
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
Sascha Corti
Web sockets - Pentesting
Web sockets - Pentesting
Vandana Verma
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
brent bucci
Owasp AppSecEU 2015 - BeEF Session
Owasp AppSecEU 2015 - BeEF Session
Bart Leppens
DEV301- Web Service Programming with WCF 3.5
DEV301- Web Service Programming with WCF 3.5
Eyal Vardi
Building Real-Time Applications in Ember.js
Building Real-Time Applications in Ember.js
Steve Kinney
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Mark West
Ibm tivoli access manager for e business tracing http connections redp4622
Ibm tivoli access manager for e business tracing http connections redp4622
Banking at Ho Chi Minh city
Connected Web Systems
Connected Web Systems
Damir Dobric
Semelhante a Cowboy rabbit-websockets
(20)
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the Web
WebSockets On Fire
WebSockets On Fire
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 Developers
Pushing the web — WebSockets
Pushing the web — WebSockets
Ws
Ws
Socket.io
Socket.io
The HTML5 WebSocket API
The HTML5 WebSocket API
Progressive Enhancement
Progressive Enhancement
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
WebSockets in JEE 7
WebSockets in JEE 7
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
Web sockets - Pentesting
Web sockets - Pentesting
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
Owasp AppSecEU 2015 - BeEF Session
Owasp AppSecEU 2015 - BeEF Session
DEV301- Web Service Programming with WCF 3.5
DEV301- Web Service Programming with WCF 3.5
Building Real-Time Applications in Ember.js
Building Real-Time Applications in Ember.js
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Ibm tivoli access manager for e business tracing http connections redp4622
Ibm tivoli access manager for e business tracing http connections redp4622
Connected Web Systems
Connected Web Systems
Último
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
WSO2
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
johnbeverley2021
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Zilliz
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Zilliz
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Orbitshub
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Edi Saputra
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
danishmna97
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
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
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
apidays
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Zilliz
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Angeliki Cooney
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
MadyBayot
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Bhuvaneswari Subramani
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
Sandro Moreira
Architecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
Último
(20)
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
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 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Elevate Developer Efficiency & build GenAI Application with Amazon Q
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
Architecting Cloud Native Applications
Architecting Cloud Native Applications
Cowboy rabbit-websockets
1.
Erlang + Message Queue + HTML 5
Tech
2.
= Over-engineered Chat Server
3.
What Cowboy ? https://github.com/extend/cowboy Small, fast
modular web server written in erlang.
4.
What Gen Bunny https://github.com/mochi/gen_bunny RabbitMQ client
library for simple pubsub in erlang.
5.
What Websocket ? https://www.websocket.org/ Bi-directional web
communication mechanism.
6.
Over Architecturing You want
it. I deliver !
7.
Server Moving parts Cowboy Gen Bunny Browser
8.
Client Moving parts Cowboy Gen Bunny Browser
9.
Websockets Technical Detour
10.
Client Moving parts BrowserBrowser Server HTTP Port 80Port
80
11.
Client Moving parts BrowserBrowser Server WS UpgradeUpgradePort 80Port
80
12.
WHY ? WORKS WITH EXISTING PROXIES
13.
Client JS Data is
live chat stream
14.
JS Connection wsUrl =
"ws://server:8081/websocket"; websocket = new WebSocket(wsUrl);
15.
Websocket Setup websocket =
new WebSocket(wsURL); websocket.onopen = ... websocket.onmessage = function(evt){ onMessage(e) }; websocket.onerror = ...
16.
onMessage Handler function onMessage(e)
{ Msg = '<p>' + txt + '</p>' $('#output').prepend(Msg); };
17.
Smooth Yeah
18.
Server Side Server WS
19.
Cowboy What comes to mind
?
20.
Kid Rock
21.
Fresh Leather
22.
Pretty Lil' web
server
23.
Cowboy Routes, REST, middleware, web
sockets and more.
24.
Cowboy follows OTP principals.
25.
Cowboy WS Required Callbacks init websocket_init websocket_handle websocket_info websocket_terminate
26.
Cowboy WS init Upgrades from http
→ web socket
27.
Cowboy WS init({tcp, http},
_Req, _Opts) → {upgrade,protocol,cowboy_websocket}.
28.
Cowboy WS websocket_init Run on
each connection.
29.
Cowboy WS websocket_init(_Name, Req,
_Opts) → Pid = consumer:start_link(), {ok, Req, #state{pid=Pid}}.
30.
Cowboy WS websocket_handle Recv data
from client, optionally return data.
31.
Cowboy WS websocket_handle(Data, Req,
State) → {text, Msg} = Data, {reply, {text, << "recv: ", Msg/binary >>}, Req, State};
32.
Cowboy WS websocket_info Live Push
data to client
33.
Cowboy WS websocket_info(Data, Req,
State) → {reply, {text, Data}, Req,State};
34.
Sending to RabbitMQ RabbitMQ websocket_handle
35.
Recv from RabbitMQ RabbitMQ websocket_info gen_bunny CONSUMER
36.
Message Queues gen bunny
37.
gen_bunny follows OTP principals.
38.
callbacks Required: ● handle_message ● init ●
handle_call ● handle_cast ● handle_info ● terminate
39.
callbacks handle_message Handle messages from
the message subscribed message queue.
40.
callbacks handle_message(Msg, State) → NewState
= act_on_msg(Msg,State) {noreply, NewState};
41.
MQ perspective Exchange Exchange “Fanout” MSG MSG MSG MSG MSG MSG MSG MSG MSG MSG MSG MSG
42.
Live demo Wireless Network: Name:
rabbit Password: carrot VISIT: http://10.1.1.1:8081/
43.
Benchmarking Method: Connect to Websocket Wait
for signal. Send 100 messages. Receive all messages
44.
Benchmarking Results: (Didn't get this
done in time, sorry) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 0 2 4 6 8 10 12 Column 1 Column 2 Column 3
45.
Source Code github.com/wmealing/ bunny-cowboy-websocket
Baixar agora