SlideShare a Scribd company logo
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

More Related Content

What's hot (20)

resume-theorique-m212-cybersecurite-v1-1509-_2.pdf
resume-theorique-m212-cybersecurite-v1-1509-_2.pdfresume-theorique-m212-cybersecurite-v1-1509-_2.pdf
resume-theorique-m212-cybersecurite-v1-1509-_2.pdf
FootballLovers9
 
Gestion de soutenance
Gestion de soutenanceGestion de soutenance
Gestion de soutenance
VatosoaRazafindrazak
 
Adama Coulibaly.pptx
Adama Coulibaly.pptxAdama Coulibaly.pptx
Adama Coulibaly.pptx
IdrissaDembl
 
Introduction to Apache Synapse
Introduction to Apache SynapseIntroduction to Apache Synapse
Introduction to Apache Synapse
Hiranya Jayathilaka
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
Martin Toshev
 
HazelCast
HazelCastHazelCast
HazelCast
NexThoughts Technologies
 
[오픈소스컨설팅] 서비스 메쉬(Service mesh)
[오픈소스컨설팅] 서비스 메쉬(Service mesh)[오픈소스컨설팅] 서비스 메쉬(Service mesh)
[오픈소스컨설팅] 서비스 메쉬(Service mesh)
Open Source Consulting
 
Rapport sécurité
Rapport sécuritéRapport sécurité
Rapport sécurité
dihiaselma
 
OpenStack Telco Architecture: OpenStack Summit Boston 2017
OpenStack Telco Architecture: OpenStack Summit Boston 2017OpenStack Telco Architecture: OpenStack Summit Boston 2017
OpenStack Telco Architecture: OpenStack Summit Boston 2017
Christian "kiko" Reis
 
BigData_TP3 : Spark
BigData_TP3 : SparkBigData_TP3 : Spark
BigData_TP3 : Spark
Lilia Sfaxi
 
Hazelcast Introduction
Hazelcast IntroductionHazelcast Introduction
Hazelcast Introduction
CodeOps Technologies LLP
 
Apache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patternsApache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patterns
Florent Ramiere
 
Big Data, Hadoop & Spark
Big Data, Hadoop & SparkBig Data, Hadoop & Spark
Big Data, Hadoop & Spark
Alexia Audevart
 
BigData_TP1: Initiation à Hadoop et Map-Reduce
BigData_TP1: Initiation à Hadoop et Map-ReduceBigData_TP1: Initiation à Hadoop et Map-Reduce
BigData_TP1: Initiation à Hadoop et Map-Reduce
Lilia Sfaxi
 
Présentation resto
Présentation restoPrésentation resto
Présentation resto
Mehdi Labidi
 
Architecture réparties et les services web
Architecture réparties et les services webArchitecture réparties et les services web
Architecture réparties et les services web
CHOUAIB EL HACHIMI
 
Support developpement applications mobiles avec ionic v3 et v4
Support developpement applications mobiles avec ionic v3 et v4Support developpement applications mobiles avec ionic v3 et v4
Support developpement applications mobiles avec ionic v3 et v4
ENSET, Université Hassan II Casablanca
 
Une introduction à HBase
Une introduction à HBaseUne introduction à HBase
Une introduction à HBase
Modern Data Stack France
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
All Things Open
 
Introduction à Laravel
Introduction à LaravelIntroduction à Laravel
Introduction à Laravel
Abdoulaye Dieng
 
resume-theorique-m212-cybersecurite-v1-1509-_2.pdf
resume-theorique-m212-cybersecurite-v1-1509-_2.pdfresume-theorique-m212-cybersecurite-v1-1509-_2.pdf
resume-theorique-m212-cybersecurite-v1-1509-_2.pdf
FootballLovers9
 
Adama Coulibaly.pptx
Adama Coulibaly.pptxAdama Coulibaly.pptx
Adama Coulibaly.pptx
IdrissaDembl
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
Martin Toshev
 
[오픈소스컨설팅] 서비스 메쉬(Service mesh)
[오픈소스컨설팅] 서비스 메쉬(Service mesh)[오픈소스컨설팅] 서비스 메쉬(Service mesh)
[오픈소스컨설팅] 서비스 메쉬(Service mesh)
Open Source Consulting
 
Rapport sécurité
Rapport sécuritéRapport sécurité
Rapport sécurité
dihiaselma
 
OpenStack Telco Architecture: OpenStack Summit Boston 2017
OpenStack Telco Architecture: OpenStack Summit Boston 2017OpenStack Telco Architecture: OpenStack Summit Boston 2017
OpenStack Telco Architecture: OpenStack Summit Boston 2017
Christian "kiko" Reis
 
BigData_TP3 : Spark
BigData_TP3 : SparkBigData_TP3 : Spark
BigData_TP3 : Spark
Lilia Sfaxi
 
Apache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patternsApache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patterns
Florent Ramiere
 
Big Data, Hadoop & Spark
Big Data, Hadoop & SparkBig Data, Hadoop & Spark
Big Data, Hadoop & Spark
Alexia Audevart
 
BigData_TP1: Initiation à Hadoop et Map-Reduce
BigData_TP1: Initiation à Hadoop et Map-ReduceBigData_TP1: Initiation à Hadoop et Map-Reduce
BigData_TP1: Initiation à Hadoop et Map-Reduce
Lilia Sfaxi
 
Présentation resto
Présentation restoPrésentation resto
Présentation resto
Mehdi Labidi
 
Architecture réparties et les services web
Architecture réparties et les services webArchitecture réparties et les services web
Architecture réparties et les services web
CHOUAIB EL HACHIMI
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
All Things Open
 

Similar to Full Stack Bus with Javascript, RabbitMQ and Postal.js (20)

Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
ColdFusionConference
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
devObjective
 
Js remote conf
Js remote confJs remote conf
Js remote conf
Bart Wood
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overview
Geshan Manandhar
 
Enterprise messaging
Enterprise messagingEnterprise messaging
Enterprise messaging
ColdFusionConference
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
Ortus Solutions, Corp
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
Ortus Solutions, Corp
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
James Carr
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
Mike Willbanks
 
Art Of Message Queues
Art Of Message QueuesArt Of Message Queues
Art Of Message Queues
Mike Willbanks
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
Eberhard Wolff
 
Message Queues with RabbitMQ - Brad Wood.pdf
Message Queues with RabbitMQ - Brad Wood.pdfMessage Queues with RabbitMQ - Brad Wood.pdf
Message Queues with RabbitMQ - Brad Wood.pdf
Ortus Solutions, Corp
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
POSSCON
 
RabbitMQ & Hutch
RabbitMQ & HutchRabbitMQ & Hutch
RabbitMQ & Hutch
Peter Hamilton
 
Multi-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQMulti-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQ
Ortus Solutions, Corp
 
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
John Staveley
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
Martin Toshev
 
IRJET- Development of Android Application for Device to Device Communication ...
IRJET- Development of Android Application for Device to Device Communication ...IRJET- Development of Android Application for Device to Device Communication ...
IRJET- Development of Android Application for Device to Device Communication ...
IRJET Journal
 
Real time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalRReal time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalR
Roy Cornelissen
 
Scaling application with RabbitMQ
Scaling application with RabbitMQScaling application with RabbitMQ
Scaling application with RabbitMQ
Nahidul Kibria
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
ColdFusionConference
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
devObjective
 
Js remote conf
Js remote confJs remote conf
Js remote conf
Bart Wood
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overview
Geshan Manandhar
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
Ortus Solutions, Corp
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
Ortus Solutions, Corp
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
James Carr
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
Mike Willbanks
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
Eberhard Wolff
 
Message Queues with RabbitMQ - Brad Wood.pdf
Message Queues with RabbitMQ - Brad Wood.pdfMessage Queues with RabbitMQ - Brad Wood.pdf
Message Queues with RabbitMQ - Brad Wood.pdf
Ortus Solutions, Corp
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
POSSCON
 
Multi-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQMulti-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQ
Ortus Solutions, Corp
 
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
John Staveley
 
IRJET- Development of Android Application for Device to Device Communication ...
IRJET- Development of Android Application for Device to Device Communication ...IRJET- Development of Android Application for Device to Device Communication ...
IRJET- Development of Android Application for Device to Device Communication ...
IRJET Journal
 
Real time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalRReal time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalR
Roy Cornelissen
 
Scaling application with RabbitMQ
Scaling application with RabbitMQScaling application with RabbitMQ
Scaling application with RabbitMQ
Nahidul Kibria
 
Ad

More from 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?
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 Python
Javier 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 python
Javier Arias Losada
 
OSCON - ES6 metaprogramming unleashed
OSCON -  ES6 metaprogramming unleashedOSCON -  ES6 metaprogramming unleashed
OSCON - ES6 metaprogramming unleashed
Javier Arias Losada
 
ES6 metaprogramming unleashed
ES6 metaprogramming unleashedES6 metaprogramming unleashed
ES6 metaprogramming unleashed
Javier 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 Patterns
Javier 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 Messaging
Javier 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 syndrome
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 Python
Javier 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 python
Javier Arias Losada
 
OSCON - ES6 metaprogramming unleashed
OSCON -  ES6 metaprogramming unleashedOSCON -  ES6 metaprogramming unleashed
OSCON - ES6 metaprogramming unleashed
Javier 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 Patterns
Javier 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 Messaging
Javier 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 syndrome
Javier Arias Losada
 
Ad

Recently uploaded (20)

AI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATION
AI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATIONAI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATION
AI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATION
miso_uam
 
Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3
Gaurav Sharma
 
Agile Software Engineering Methodologies
Agile Software Engineering MethodologiesAgile Software Engineering Methodologies
Agile Software Engineering Methodologies
Gaurav Sharma
 
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps CyclesFrom Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
Marjukka Niinioja
 
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The SequelMarketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
BradBedford3
 
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
Insurance Tech Services
 
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
BradBedford3
 
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptxHow AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
kalichargn70th171
 
Design by Contract - Building Robust Software with Contract-First Development
Design by Contract - Building Robust Software with Contract-First DevelopmentDesign by Contract - Building Robust Software with Contract-First Development
Design by Contract - Building Robust Software with Contract-First Development
Par-Tec S.p.A.
 
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
Nacho Cougil
 
Automating Map Production With FME and Python
Automating Map Production With FME and PythonAutomating Map Production With FME and Python
Automating Map Production With FME and Python
Safe Software
 
14 Years of Developing nCine - An Open Source 2D Game Framework
14 Years of Developing nCine - An Open Source 2D Game Framework14 Years of Developing nCine - An Open Source 2D Game Framework
14 Years of Developing nCine - An Open Source 2D Game Framework
Angelo Theodorou
 
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentricIntegration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Natan Silnitsky
 
Best Inbound Call Tracking Software for Small Businesses
Best Inbound Call Tracking Software for Small BusinessesBest Inbound Call Tracking Software for Small Businesses
Best Inbound Call Tracking Software for Small Businesses
TheTelephony
 
How to purchase, license and subscribe to Microsoft Azure_PDF.pdf
How to purchase, license and subscribe to Microsoft Azure_PDF.pdfHow to purchase, license and subscribe to Microsoft Azure_PDF.pdf
How to purchase, license and subscribe to Microsoft Azure_PDF.pdf
victordsane
 
Eliminate the complexities of Event-Driven Architecture with Domain-Driven De...
Eliminate the complexities of Event-Driven Architecture with Domain-Driven De...Eliminate the complexities of Event-Driven Architecture with Domain-Driven De...
Eliminate the complexities of Event-Driven Architecture with Domain-Driven De...
SheenBrisals
 
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdfHow to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
QuickBooks Training
 
FME for Climate Data: Turning Big Data into Actionable Insights
FME for Climate Data: Turning Big Data into Actionable InsightsFME for Climate Data: Turning Big Data into Actionable Insights
FME for Climate Data: Turning Big Data into Actionable Insights
Safe Software
 
Leveraging Foundation Models to Infer Intents
Leveraging Foundation Models to Infer IntentsLeveraging Foundation Models to Infer Intents
Leveraging Foundation Models to Infer Intents
Keheliya Gallaba
 
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI SearchAgentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Maxim Salnikov
 
AI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATION
AI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATIONAI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATION
AI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATION
miso_uam
 
Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3
Gaurav Sharma
 
Agile Software Engineering Methodologies
Agile Software Engineering MethodologiesAgile Software Engineering Methodologies
Agile Software Engineering Methodologies
Gaurav Sharma
 
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps CyclesFrom Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
Marjukka Niinioja
 
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The SequelMarketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
BradBedford3
 
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
Insurance Tech Services
 
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
BradBedford3
 
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptxHow AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
kalichargn70th171
 
Design by Contract - Building Robust Software with Contract-First Development
Design by Contract - Building Robust Software with Contract-First DevelopmentDesign by Contract - Building Robust Software with Contract-First Development
Design by Contract - Building Robust Software with Contract-First Development
Par-Tec S.p.A.
 
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
Nacho Cougil
 
Automating Map Production With FME and Python
Automating Map Production With FME and PythonAutomating Map Production With FME and Python
Automating Map Production With FME and Python
Safe Software
 
14 Years of Developing nCine - An Open Source 2D Game Framework
14 Years of Developing nCine - An Open Source 2D Game Framework14 Years of Developing nCine - An Open Source 2D Game Framework
14 Years of Developing nCine - An Open Source 2D Game Framework
Angelo Theodorou
 
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentricIntegration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Natan Silnitsky
 
Best Inbound Call Tracking Software for Small Businesses
Best Inbound Call Tracking Software for Small BusinessesBest Inbound Call Tracking Software for Small Businesses
Best Inbound Call Tracking Software for Small Businesses
TheTelephony
 
How to purchase, license and subscribe to Microsoft Azure_PDF.pdf
How to purchase, license and subscribe to Microsoft Azure_PDF.pdfHow to purchase, license and subscribe to Microsoft Azure_PDF.pdf
How to purchase, license and subscribe to Microsoft Azure_PDF.pdf
victordsane
 
Eliminate the complexities of Event-Driven Architecture with Domain-Driven De...
Eliminate the complexities of Event-Driven Architecture with Domain-Driven De...Eliminate the complexities of Event-Driven Architecture with Domain-Driven De...
Eliminate the complexities of Event-Driven Architecture with Domain-Driven De...
SheenBrisals
 
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdfHow to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
QuickBooks Training
 
FME for Climate Data: Turning Big Data into Actionable Insights
FME for Climate Data: Turning Big Data into Actionable InsightsFME for Climate Data: Turning Big Data into Actionable Insights
FME for Climate Data: Turning Big Data into Actionable Insights
Safe Software
 
Leveraging Foundation Models to Infer Intents
Leveraging Foundation Models to Infer IntentsLeveraging Foundation Models to Infer Intents
Leveraging Foundation Models to Infer Intents
Keheliya Gallaba
 
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI SearchAgentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Maxim Salnikov
 

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