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
400
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
Throw new \Exception(); Oui, mais laquelle ?
odolbeau
0
80
Jane & Webby
odolbeau
0
310
Translating a monolingual application
odolbeau
2
460
DX: Developer eXperience
odolbeau
0
56
DX: Developer eXperience
odolbeau
0
450
EasyAdminBundle introduction
odolbeau
0
150
REX API Platform
odolbeau
0
1.2k
Features flags at BlaBlaCar
odolbeau
4
940
25+ million members in 22 countries, how to scale with Symfony2
odolbeau
1
430
Other Decks in Programming
See All in Programming
役立つログに取り組もう
irof
28
9.6k
cmp.Or に感動した
otakakot
2
140
CSC509 Lecture 09
javiergs
PRO
0
140
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Realtime API 入門
riofujimon
0
150
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
Click-free releases & the making of a CLI app
oheyadam
2
110
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
660
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
subpath importsで始めるモック生活
10tera
0
300
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
A designer walks into a library…
pauljervisheath
203
24k
Faster Mobile Websites
deanohume
305
30k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Unsuck your backbone
ammeep
668
57k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
What's new in Ruby 2.0
geeforr
343
31k
Gamification - CAS2011
davidbonilla
80
5k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Become a Pro
speakerdeck
PRO
25
5k
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