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
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
LoriGlavin3
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
BkGupta21
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
Alfredo García Lavilla
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
DianaGray10
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Precisely
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Stephanie Beckett
Último
(20)
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
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