SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
full-stack-bus
communicating ALL your applications
with RabbitMQ, postal.js and
javascript
javier arias losada @javier_arilos
imagine...
imagine your app needs growing (*)
it’s easy if you try
(*) by growing I mean functionality and/or performance and/or scalability
message bus
A message bus enables separate
applications to work together, but in
a decoupled fashion [1].
[1] http://bit.ly/1GI9W3B
message what?
Message bus technologies have been
used in backend for more than 20
years: IBM MQSeries in 1992 [2].
[2] http://bit.ly/1GIbV8f
did you say backend?
Nowadays we can use message bus in the
browser with the help of libraries
such as postal.js [3].
[3] http://bit.ly/1zozbq9
what’s full-stack-bus?
Yet Another Buzzword...
seriously, what’s full-stack-bus?
By uniting frontend and backend bus
technologies we can create
applications that work out together in
a decoupled fashion.
frontend => frontend
frontend => backend
backend => frontend
backend => backend
… but I already do that!!!!
frontend => frontend: eventEmitters, listeners, global variables...
frontend => backend: HTTP, Websockets...
backend => frontend: Websockets, Long-polling...
backend => backend : HTTP, sockets, shared Db...
Some of this are good
mechanisms.
...others are just
antipatterns…
Unifying approachs has
its own beauty.
why then, a message bus?
Message bus allow to offer decoupled
interfaces, based in Events/Messages.
No callbacks, no request-reply,
producers and consumers are decoupled.
Off-the-shelf communication patterns:
topics, queues, ...
is it for me?
Probably not. Message bus is not
everybody’s cup of tea.
If your platform is growing a lot in
terms of load and/or complexity then
it will help.
can we now start with the tech?
This is one possible way to
communicate all your applications.
postal.js
js
module
js
module
js
module
RabbitMQ
STOMP
over
Websokets
(SockJS)
μService μService μService
RabbitMQ
RabbitMQ is a Message Broker
implementing of the AMQP protocol. [4]
Fast and easy to use.
Open source :-)
Almost certainly it is supported in your language /
platform
Very advanced concepts:
● Messaging: exchanges, queues, routing, …
● Built-in clustering and replication
[4] http://www.rabbitmq.com
Postal.js
JS pub/sub library supporting some advanced
subscription features [5]
➔ in-memory message bus - very loosely inspired by AMQP
➔ runs in the browser, or on the server using node.js
➔ only pub/sub, no queues
➔ opensource (> 1K in github)
[5] https://github.com/postaljs/postal.js
javascript
Javascript is THE full-stack language: runs on
the client, server, databases and even on a
toaster [6]
[6] http://bit.ly/1uX9s44
In our sample game:
➔ node.js: μ-services
➔ angular: almost magical binding
.js
STOMP SockJS
[7] http://stomp.github.io/
[8] https://github.com/sockjs
[9] http://www.rabbitmq.com/web-stomp.html
STOMP Simple Text
Orientated Messaging
Protocol [7].
STOMP clients communicate
with any STOMP message
broker (eg. RabbitMQ).
SockJS is a browser JS
library that provides a
WebSocket-like object [8]
SockJS uses native
WebSockets or a variety of
browser-specific transport
protocols.
RabbitMQ provides a plugin that implements STOMP over
SockJS: Web-Stomp plugin [9].
It is very simple to setup and use.
full-stack-bus ballgame example
application example: multiplayer ping-pong
[10] https://github.com/javierarilos/full-stack-bus-ballgame
postal.js
classi
ficati
on
game
log
ball
mgmt
score
aggregator
μService
ballgame UX
aggregated
scores and
classification gamelog
playfield
rabbit-
>postal
rabbit-
>postal
logical structure & messages
ball
management classification gamelogball
managementball
management
classification
classification
score
aggregator
gamelog
gamelog
topic/ballgamequeue/balls
sendBall
receiveBall
single.score
single.*
aggregated.scores
single.score
aggregated.scores
rabbit-
>postal
N x Browser
RabbitMQ
Node.js
gamelog
gameloggame
management
single.new-player
single.pong
single.ping
single.ping-fail
single.ball-picked
understood, show me the code!!!!
➔ RabbitMQ connection and subscriptions
http://bit.ly/1Gy7JcR#L140
➔ postal.js subscriptions
http://bit.ly/1Gy7JcR#L177
➔ routing msgs: RabbitMQ => postal.js
http://bit.ly/1Gy7JcR#L133
➔ sending a message to RabbitMQ
http://bit.ly/1Gy7JcR#L117
➔ aggregate scores μ-service
http://bit.ly/1Gy9V4f
we are done
with the
full stack
bus thing...
thank you
for your
attention!
media used. thanks to:
➔ Quentin Lebourgeois https://www.flickr.com/photos/quentinlebourgeois/5514792500/in/photostream/
➔ pargon https://flic.kr/p/4J3Yqo
➔ chriscroninimages www.flickr.com/photos/chriscroninimages/29963364
➔ Jim Landon https://flic.kr/p/p3zyZv

Contenu connexe

Tendances

User Interface Design Module 5 screen based controls
User Interface Design Module 5  screen based controlsUser Interface Design Module 5  screen based controls
User Interface Design Module 5 screen based controlsbrindaN
 
User Interface Design- Module 2 Uid Process
User Interface Design- Module 2 Uid ProcessUser Interface Design- Module 2 Uid Process
User Interface Design- Module 2 Uid ProcessbrindaN
 
Online Ticket Reservation System-SRS, ERD, DFD, Structured Charts
Online Ticket Reservation System-SRS, ERD, DFD, Structured ChartsOnline Ticket Reservation System-SRS, ERD, DFD, Structured Charts
Online Ticket Reservation System-SRS, ERD, DFD, Structured Chartsgrandhiprasuna
 
Online movie ticket booking system
Online movie ticket booking systemOnline movie ticket booking system
Online movie ticket booking systemSikandar Pandit
 
Movie Ticket Booking Website Project Presentation
Movie Ticket Booking Website Project PresentationMovie Ticket Booking Website Project Presentation
Movie Ticket Booking Website Project PresentationAvinandan Ganguly
 
Introduction to Storyboarding for User Experience Design
Introduction to Storyboarding for User Experience DesignIntroduction to Storyboarding for User Experience Design
Introduction to Storyboarding for User Experience DesignDeb Aoki
 
Assignment hci : Draw the Users Mental Model for a Transfer of Money from one...
Assignment hci : Draw the Users Mental Model for a Transfer of Money from one...Assignment hci : Draw the Users Mental Model for a Transfer of Money from one...
Assignment hci : Draw the Users Mental Model for a Transfer of Money from one...Lahore Garrison University
 
ER diagrams for Railway reservation system
ER diagrams for Railway reservation systemER diagrams for Railway reservation system
ER diagrams for Railway reservation systemSoham Nanekar
 
User interfaces presentation
User interfaces presentationUser interfaces presentation
User interfaces presentationsomipam1
 
Human Computer Interface (HCI)
Human Computer Interface (HCI)Human Computer Interface (HCI)
Human Computer Interface (HCI)Shobha Rani
 
UI/UX presentation by Roshan Karunarathna
UI/UX presentation by Roshan KarunarathnaUI/UX presentation by Roshan Karunarathna
UI/UX presentation by Roshan KarunarathnaRoshan Karunarathna
 
Human computer interaction
Human computer interactionHuman computer interaction
Human computer interactionsai anjaneya
 
Usability: Part of User Experience (UX)
Usability: Part of User Experience (UX)Usability: Part of User Experience (UX)
Usability: Part of User Experience (UX)Edneil Jocusol
 

Tendances (20)

User Interface Design Module 5 screen based controls
User Interface Design Module 5  screen based controlsUser Interface Design Module 5  screen based controls
User Interface Design Module 5 screen based controls
 
College admission system
College admission system College admission system
College admission system
 
Graphical User Interface
Graphical User InterfaceGraphical User Interface
Graphical User Interface
 
User Interface Design- Module 2 Uid Process
User Interface Design- Module 2 Uid ProcessUser Interface Design- Module 2 Uid Process
User Interface Design- Module 2 Uid Process
 
Online Ticket Reservation System-SRS, ERD, DFD, Structured Charts
Online Ticket Reservation System-SRS, ERD, DFD, Structured ChartsOnline Ticket Reservation System-SRS, ERD, DFD, Structured Charts
Online Ticket Reservation System-SRS, ERD, DFD, Structured Charts
 
Online movie ticket booking system
Online movie ticket booking systemOnline movie ticket booking system
Online movie ticket booking system
 
Movie Ticket Booking Website Project Presentation
Movie Ticket Booking Website Project PresentationMovie Ticket Booking Website Project Presentation
Movie Ticket Booking Website Project Presentation
 
ChatGPT General Meeting
ChatGPT General MeetingChatGPT General Meeting
ChatGPT General Meeting
 
Introduction to Storyboarding for User Experience Design
Introduction to Storyboarding for User Experience DesignIntroduction to Storyboarding for User Experience Design
Introduction to Storyboarding for User Experience Design
 
Assignment hci : Draw the Users Mental Model for a Transfer of Money from one...
Assignment hci : Draw the Users Mental Model for a Transfer of Money from one...Assignment hci : Draw the Users Mental Model for a Transfer of Money from one...
Assignment hci : Draw the Users Mental Model for a Transfer of Money from one...
 
ER diagrams for Railway reservation system
ER diagrams for Railway reservation systemER diagrams for Railway reservation system
ER diagrams for Railway reservation system
 
User interfaces presentation
User interfaces presentationUser interfaces presentation
User interfaces presentation
 
Human Computer Interface (HCI)
Human Computer Interface (HCI)Human Computer Interface (HCI)
Human Computer Interface (HCI)
 
UI/UX presentation by Roshan Karunarathna
UI/UX presentation by Roshan KarunarathnaUI/UX presentation by Roshan Karunarathna
UI/UX presentation by Roshan Karunarathna
 
Module 1
Module 1Module 1
Module 1
 
Interaction devices in human Computer Interface(Human Computer interface tut...
 Interaction devices in human Computer Interface(Human Computer interface tut... Interaction devices in human Computer Interface(Human Computer interface tut...
Interaction devices in human Computer Interface(Human Computer interface tut...
 
Hci
HciHci
Hci
 
Human computer interaction
Human computer interactionHuman computer interaction
Human computer interaction
 
User interface-design
User interface-designUser interface-design
User interface-design
 
Usability: Part of User Experience (UX)
Usability: Part of User Experience (UX)Usability: Part of User Experience (UX)
Usability: Part of User Experience (UX)
 

Similaire à Full Stack Bus with Javascript, RabbitMQ and Postal.js

Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsJohn Staveley
 
WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?Brainhub
 
What's new in MQ 9.1.* on z/OS
What's new in MQ 9.1.* on z/OSWhat's new in MQ 9.1.* on z/OS
What's new in MQ 9.1.* on z/OSMatt Leming
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Marc Müller
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationBrad Beiermann
 
Language agnostic technologies introduced in pi web-agent 0.4rc2
Language agnostic technologies  introduced in pi web-agent 0.4rc2Language agnostic technologies  introduced in pi web-agent 0.4rc2
Language agnostic technologies introduced in pi web-agent 0.4rc2Andreas Galazis
 
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...Animesh Singh
 
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platformOCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platformMarc Dutoo
 
Serverless + Machine Learning – Bringing the best of two worlds together
Serverless + Machine Learning – Bringing the best of two worlds togetherServerless + Machine Learning – Bringing the best of two worlds together
Serverless + Machine Learning – Bringing the best of two worlds togetherVidyasagar Machupalli
 
Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning Jim Dowling
 
Introducing apache stratos (incubating) & wso2 paa s foundation
Introducing apache stratos (incubating) & wso2 paa s foundationIntroducing apache stratos (incubating) & wso2 paa s foundation
Introducing apache stratos (incubating) & wso2 paa s foundationLakmal Warusawithana
 
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware
 
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...OW2
 
Apache Kafka
Apache KafkaApache Kafka
Apache KafkaJoe Stein
 
Add the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitAdd the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitIgalia
 
SignalR Intro + WPDev
SignalR Intro + WPDevSignalR Intro + WPDev
SignalR Intro + WPDevSam Basu
 
Introduction to MANTL Data Platform
Introduction to MANTL Data PlatformIntroduction to MANTL Data Platform
Introduction to MANTL Data PlatformCisco DevNet
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesRobert Lemke
 
Running and Supporting MQ Light Applications
Running and Supporting MQ Light ApplicationsRunning and Supporting MQ Light Applications
Running and Supporting MQ Light Applicationsmatthew1001
 

Similaire à Full Stack Bus with Javascript, RabbitMQ and Postal.js (20)

Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
 
WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?
 
What's new in MQ 9.1.* on z/OS
What's new in MQ 9.1.* on z/OSWhat's new in MQ 9.1.* on z/OS
What's new in MQ 9.1.* on z/OS
 
TRWResume-10-2016
TRWResume-10-2016TRWResume-10-2016
TRWResume-10-2016
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction Presentation
 
Language agnostic technologies introduced in pi web-agent 0.4rc2
Language agnostic technologies  introduced in pi web-agent 0.4rc2Language agnostic technologies  introduced in pi web-agent 0.4rc2
Language agnostic technologies introduced in pi web-agent 0.4rc2
 
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
 
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platformOCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
 
Serverless + Machine Learning – Bringing the best of two worlds together
Serverless + Machine Learning – Bringing the best of two worlds togetherServerless + Machine Learning – Bringing the best of two worlds together
Serverless + Machine Learning – Bringing the best of two worlds together
 
Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning
 
Introducing apache stratos (incubating) & wso2 paa s foundation
Introducing apache stratos (incubating) & wso2 paa s foundationIntroducing apache stratos (incubating) & wso2 paa s foundation
Introducing apache stratos (incubating) & wso2 paa s foundation
 
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
 
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
Add the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitAdd the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKit
 
SignalR Intro + WPDev
SignalR Intro + WPDevSignalR Intro + WPDev
SignalR Intro + WPDev
 
Introduction to MANTL Data Platform
Introduction to MANTL Data PlatformIntroduction to MANTL Data Platform
Introduction to MANTL Data Platform
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
Running and Supporting MQ Light Applications
Running and Supporting MQ Light ApplicationsRunning and Supporting MQ Light Applications
Running and Supporting MQ Light Applications
 

Plus de Javier Arias Losada

Why do lazy developers write beautiful code?
Why do lazy developers write beautiful code?Why do lazy developers write beautiful code?
Why do lazy developers write beautiful code?Javier Arias Losada
 
Europython - Machine Learning for dummies with Python
Europython - Machine Learning for dummies with PythonEuropython - Machine Learning for dummies with Python
Europython - Machine Learning for dummies with PythonJavier Arias Losada
 
Pybcn machine learning for dummies with python
Pybcn machine learning for dummies with pythonPybcn machine learning for dummies with python
Pybcn machine learning for dummies with pythonJavier Arias Losada
 
OSCON - ES6 metaprogramming unleashed
OSCON -  ES6 metaprogramming unleashedOSCON -  ES6 metaprogramming unleashed
OSCON - ES6 metaprogramming unleashedJavier Arias Losada
 
Elastically scalable architectures with microservices. The end of the monolith?
Elastically scalable architectures with microservices. The end of the monolith?Elastically scalable architectures with microservices. The end of the monolith?
Elastically scalable architectures with microservices. The end of the monolith?Javier Arias Losada
 
Rabbitmq, amqp Intro - Messaging Patterns
Rabbitmq, amqp Intro - Messaging PatternsRabbitmq, amqp Intro - Messaging Patterns
Rabbitmq, amqp Intro - Messaging PatternsJavier Arias Losada
 
NoSQL Matters BCN 2013. Sprayer Low Latency, Reliable, Mutichannel Messaging
NoSQL Matters BCN 2013. Sprayer Low Latency, Reliable, Mutichannel MessagingNoSQL Matters BCN 2013. Sprayer Low Latency, Reliable, Mutichannel Messaging
NoSQL Matters BCN 2013. Sprayer Low Latency, Reliable, Mutichannel MessagingJavier Arias Losada
 
From Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndromeFrom Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndromeJavier Arias Losada
 

Plus de Javier Arias Losada (9)

Why do lazy developers write beautiful code?
Why do lazy developers write beautiful code?Why do lazy developers write beautiful code?
Why do lazy developers write beautiful code?
 
Europython - Machine Learning for dummies with Python
Europython - Machine Learning for dummies with PythonEuropython - Machine Learning for dummies with Python
Europython - Machine Learning for dummies with Python
 
Pybcn machine learning for dummies with python
Pybcn machine learning for dummies with pythonPybcn machine learning for dummies with python
Pybcn machine learning for dummies with python
 
OSCON - ES6 metaprogramming unleashed
OSCON -  ES6 metaprogramming unleashedOSCON -  ES6 metaprogramming unleashed
OSCON - ES6 metaprogramming unleashed
 
ES6 metaprogramming unleashed
ES6 metaprogramming unleashedES6 metaprogramming unleashed
ES6 metaprogramming unleashed
 
Elastically scalable architectures with microservices. The end of the monolith?
Elastically scalable architectures with microservices. The end of the monolith?Elastically scalable architectures with microservices. The end of the monolith?
Elastically scalable architectures with microservices. The end of the monolith?
 
Rabbitmq, amqp Intro - Messaging Patterns
Rabbitmq, amqp Intro - Messaging PatternsRabbitmq, amqp Intro - Messaging Patterns
Rabbitmq, amqp Intro - Messaging Patterns
 
NoSQL Matters BCN 2013. Sprayer Low Latency, Reliable, Mutichannel Messaging
NoSQL Matters BCN 2013. Sprayer Low Latency, Reliable, Mutichannel MessagingNoSQL Matters BCN 2013. Sprayer Low Latency, Reliable, Mutichannel Messaging
NoSQL Matters BCN 2013. Sprayer Low Latency, Reliable, Mutichannel Messaging
 
From Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndromeFrom Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndrome
 

Dernier

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 

Dernier (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 

Full Stack Bus with Javascript, RabbitMQ and Postal.js

  • 1. full-stack-bus communicating ALL your applications with RabbitMQ, postal.js and javascript javier arias losada @javier_arilos
  • 2. imagine... imagine your app needs growing (*) it’s easy if you try (*) by growing I mean functionality and/or performance and/or scalability
  • 3. message bus A message bus enables separate applications to work together, but in a decoupled fashion [1]. [1] http://bit.ly/1GI9W3B
  • 4. message what? Message bus technologies have been used in backend for more than 20 years: IBM MQSeries in 1992 [2]. [2] http://bit.ly/1GIbV8f
  • 5. did you say backend? Nowadays we can use message bus in the browser with the help of libraries such as postal.js [3]. [3] http://bit.ly/1zozbq9
  • 7. seriously, what’s full-stack-bus? By uniting frontend and backend bus technologies we can create applications that work out together in a decoupled fashion. frontend => frontend frontend => backend backend => frontend backend => backend
  • 8. … but I already do that!!!! frontend => frontend: eventEmitters, listeners, global variables... frontend => backend: HTTP, Websockets... backend => frontend: Websockets, Long-polling... backend => backend : HTTP, sockets, shared Db... Some of this are good mechanisms. ...others are just antipatterns… Unifying approachs has its own beauty.
  • 9. why then, a message bus? Message bus allow to offer decoupled interfaces, based in Events/Messages. No callbacks, no request-reply, producers and consumers are decoupled. Off-the-shelf communication patterns: topics, queues, ...
  • 10. is it for me? Probably not. Message bus is not everybody’s cup of tea. If your platform is growing a lot in terms of load and/or complexity then it will help.
  • 11. can we now start with the tech? This is one possible way to communicate all your applications. postal.js js module js module js module RabbitMQ STOMP over Websokets (SockJS) μService μService μService
  • 12. RabbitMQ RabbitMQ is a Message Broker implementing of the AMQP protocol. [4] Fast and easy to use. Open source :-) Almost certainly it is supported in your language / platform Very advanced concepts: ● Messaging: exchanges, queues, routing, … ● Built-in clustering and replication [4] http://www.rabbitmq.com
  • 13. Postal.js JS pub/sub library supporting some advanced subscription features [5] ➔ in-memory message bus - very loosely inspired by AMQP ➔ runs in the browser, or on the server using node.js ➔ only pub/sub, no queues ➔ opensource (> 1K in github) [5] https://github.com/postaljs/postal.js
  • 14. javascript Javascript is THE full-stack language: runs on the client, server, databases and even on a toaster [6] [6] http://bit.ly/1uX9s44 In our sample game: ➔ node.js: μ-services ➔ angular: almost magical binding .js
  • 15. STOMP SockJS [7] http://stomp.github.io/ [8] https://github.com/sockjs [9] http://www.rabbitmq.com/web-stomp.html STOMP Simple Text Orientated Messaging Protocol [7]. STOMP clients communicate with any STOMP message broker (eg. RabbitMQ). SockJS is a browser JS library that provides a WebSocket-like object [8] SockJS uses native WebSockets or a variety of browser-specific transport protocols. RabbitMQ provides a plugin that implements STOMP over SockJS: Web-Stomp plugin [9]. It is very simple to setup and use.
  • 16. full-stack-bus ballgame example application example: multiplayer ping-pong [10] https://github.com/javierarilos/full-stack-bus-ballgame postal.js classi ficati on game log ball mgmt score aggregator μService
  • 18. rabbit- >postal rabbit- >postal logical structure & messages ball management classification gamelogball managementball management classification classification score aggregator gamelog gamelog topic/ballgamequeue/balls sendBall receiveBall single.score single.* aggregated.scores single.score aggregated.scores rabbit- >postal N x Browser RabbitMQ Node.js gamelog gameloggame management single.new-player single.pong single.ping single.ping-fail single.ball-picked
  • 19. understood, show me the code!!!! ➔ RabbitMQ connection and subscriptions http://bit.ly/1Gy7JcR#L140 ➔ postal.js subscriptions http://bit.ly/1Gy7JcR#L177 ➔ routing msgs: RabbitMQ => postal.js http://bit.ly/1Gy7JcR#L133 ➔ sending a message to RabbitMQ http://bit.ly/1Gy7JcR#L117 ➔ aggregate scores μ-service http://bit.ly/1Gy9V4f
  • 20. we are done with the full stack bus thing... thank you for your attention!
  • 21. media used. thanks to: ➔ Quentin Lebourgeois https://www.flickr.com/photos/quentinlebourgeois/5514792500/in/photostream/ ➔ pargon https://flic.kr/p/4J3Yqo ➔ chriscroninimages www.flickr.com/photos/chriscroninimages/29963364 ➔ Jim Landon https://flic.kr/p/p3zyZv