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

Tendances (20)

Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
JavaScript Basics
JavaScript BasicsJavaScript Basics
JavaScript Basics
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
jQuery
jQueryjQuery
jQuery
 
react-js-notes-for-professionals-book.pdf
react-js-notes-for-professionals-book.pdfreact-js-notes-for-professionals-book.pdf
react-js-notes-for-professionals-book.pdf
 
Flex box
Flex boxFlex box
Flex box
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
 
What is JavaScript? Edureka
What is JavaScript? EdurekaWhat is JavaScript? Edureka
What is JavaScript? Edureka
 
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginnersPHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginners
 
Introduction to ajax
Introduction  to  ajaxIntroduction  to  ajax
Introduction to ajax
 
Asp net
Asp netAsp net
Asp net
 
Html events with javascript
Html events with javascriptHtml events with javascript
Html events with javascript
 
Transformed By Trouble
Transformed By TroubleTransformed By Trouble
Transformed By Trouble
 
Laravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansLaravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web Artisans
 
All you need to know about crawlers
All you need to know about crawlersAll you need to know about crawlers
All you need to know about crawlers
 
Java script array
Java script arrayJava script array
Java script array
 
Javascript - Numbers
Javascript   - NumbersJavascript   - Numbers
Javascript - Numbers
 
JNDI
JNDIJNDI
JNDI
 
Functions in javascript
Functions in javascriptFunctions in javascript
Functions in javascript
 

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

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
Andreas Galazis
 
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
Lakmal Warusawithana
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
Joe 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 WebKit
Igalia
 
SignalR Intro + WPDev
SignalR Intro + WPDevSignalR Intro + WPDev
SignalR Intro + WPDev
Sam Basu
 

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: 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...
 
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...
 
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

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

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 

Dernier (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
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
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 

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