Enviar búsqueda
Cargar
Cowboy rabbit-websockets
•
1 recomendación
•
4,941 vistas
Wade Mealing
Seguir
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 45
Descargar ahora
Descargar para leer sin conexión
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
Más contenido relacionado
La actualidad más candente
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
La actualidad más candente
(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
Similar 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
Similar 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
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
Sujit Pal
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
ThousandEyes
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Último
(20)
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Slack Application Development 101 Slides
Slack Application Development 101 Slides
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
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
Descargar ahora