Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Swarrot, a library to consume them all!
Search
Olivier Dolbeau
October 20, 2015
Programming
0
370
Swarrot, a library to consume them all!
Talk given at BlaBlaCar Tech Meetup in Warsaw
Olivier Dolbeau
October 20, 2015
Tweet
Share
More Decks by Olivier Dolbeau
See All by Olivier Dolbeau
Jane & Webby
odolbeau
0
290
Translating a monolingual application
odolbeau
2
390
DX: Developer eXperience
odolbeau
0
50
DX: Developer eXperience
odolbeau
0
390
EasyAdminBundle introduction
odolbeau
0
130
REX API Platform
odolbeau
0
1k
Features flags at BlaBlaCar
odolbeau
4
830
25+ million members in 22 countries, how to scale with Symfony2
odolbeau
1
390
Be gentle with your prod!
odolbeau
1
600
Other Decks in Programming
See All in Programming
ソースコードを美しくたもつために ~コードレビューの認知限界を突破し、年間400リリースを達成する~
kotauchisunsun
1
770
WinActorの勉強を継続する方法
tamai_63
0
130
Timeline エディター拡張入門
yucchiy
0
450
Long journey of Ruby standard library RubyKaigi 2024
andpad
2
230
How to implement a RubyVM with PHP?
memory1994
PRO
2
330
HonoのRPCで真の型安全が欲しかった
kosei28
1
140
Introducing Kotlin Multiplatform in an existing mobile app - Workshop Edition | AndroidMakers Paris
prof18
0
180
RaaP
ksss
0
160
Sheets API使ってみた
toshi0383
2
180
2024 コーディング研修
ckazu
2
660
The Final Frontier of Web Development: React Server Components vs Jakarta EE
ivargrimstad
0
110
The grand strategy of Ruby Parser
yui_knk
5
310
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
242
1.2M
Raft: Consensus for Rubyists
vanstee
133
6.3k
Music & Morning Musume
bryan
41
5.6k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
7k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
Optimizing for Happiness
mojombo
370
69k
KATA
mclloyd
16
12k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Gamification - CAS2011
davidbonilla
77
4.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
47k
Transcript
None
@odolbeau Web Architect Olivier Dolbeau
None
What happens when you publish a trip?
We send an email to the driver. We index the
trip in ElasticSearch. We send the comment to moderation spooler. We store all relevant informations in Hadoop for BI.
I’m gonna sleep, tell me when you’re done!
None
None
“RabbitMQ is a message broker. The principal idea is pretty
simple: it accepts and forwards messages.”
Publisher Queue1 Exchange Queue2 Queue3 Consumer Consumer Consumer Consumer RabbitMQ
What happens when you publish a trip?
We send an email to the driver. We index the
trip in ElasticSearch. We sent the comment in moderation. We store all relevant informations in Hadoop for BI.
RabbitMQ Application mail publication indexation bi Consumer mail Consumer bi
Consumer indexation Consumer moderation moderation
So cool!
That’s fast! At least for the user.
We have several small applications.
We can scale!
Problems...
Long running processes.
Expect errors. Deal with them. • Catch them! • Retry
when needed. • Don’t stop your consumer.
Your worker need to be stopped correctly.
None
Goals
Solve mentioned problems.
Be able to change the broker used.
Implementation
We need a MessageProvider. We use the pecl extension.
Here is our “business” logic.
Let’s consume them all!
Encapsulation FTW! <3
Let’s create a stack.
The result.
None
Used in production.
None
Sometimes, dealing with consumers can be a pain...
Use a message broker, that’s awesome!
Sometimes, dealing with consumers can be a pain, BUT you
should definitively use a Message Broker! <3 Olivier Dolbeau @odolbeau