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
390
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
310
Translating a monolingual application
odolbeau
2
450
DX: Developer eXperience
odolbeau
0
54
DX: Developer eXperience
odolbeau
0
440
EasyAdminBundle introduction
odolbeau
0
150
REX API Platform
odolbeau
0
1.1k
Features flags at BlaBlaCar
odolbeau
4
900
25+ million members in 22 countries, how to scale with Symfony2
odolbeau
1
420
Be gentle with your prod!
odolbeau
1
650
Other Decks in Programming
See All in Programming
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
250
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
420
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
仮想ファイルシステムを導入して開発環境のストレージ課題を解消する
segadevtech
2
550
Kotlin 2.0が与えるAndroid開発の進化
masayukisuda
1
410
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
170
Swiftコードバトル必勝法
toshi0383
0
170
Rubyのobject_id
qnighy
6
1.3k
ドメイン駆動設計を実践するために必要なもの
bikisuke
4
330
Debugging: All you need to know (for simultaneous interpreting)
jmatsu
2
800
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
A New Era of Testing
mannodermaus
2
510
Featured
See All Featured
How GitHub Uses GitHub to Build GitHub
holman
472
290k
What's in a price? How to price your products and services
michaelherold
242
11k
Faster Mobile Websites
deanohume
304
30k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
8.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.5k
Documentation Writing (for coders)
carmenintech
65
4.3k
Making Projects Easy
brettharned
113
5.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
36
2.1k
Statistics for Hackers
jakevdp
794
220k
Scaling GitHub
holman
458
140k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
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