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
410
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
130
Jane & Webby
odolbeau
0
340
Translating a monolingual application
odolbeau
2
470
DX: Developer eXperience
odolbeau
0
63
DX: Developer eXperience
odolbeau
0
500
EasyAdminBundle introduction
odolbeau
0
160
REX API Platform
odolbeau
0
1.2k
Features flags at BlaBlaCar
odolbeau
4
970
25+ million members in 22 countries, how to scale with Symfony2
odolbeau
1
440
Other Decks in Programming
See All in Programming
선언형 UI에서의 상태관리
l2hyunwoo
0
270
rails newと同時に型を書く
aki19035vc
5
710
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.8k
情報漏洩させないための設計
kubotak
5
1.3k
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
190
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
630
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
300
テストコード書いてみませんか?
onopon
2
340
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
280
DMMオンラインサロンアプリのSwift化
hayatan
0
170
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
137
6.7k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
A Tale of Four Properties
chriscoyier
157
23k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
How to train your dragon (web standard)
notwaldorf
89
5.8k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
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