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
Making asynchronous tasks in PHP
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Olivier Dolbeau
April 07, 2014
Programming
6
3.6k
Making asynchronous tasks in PHP
Why & how making asynchronous tasks in PHP
SFLIve2014 - 04/07/2014 with Grégoire Pineau
Olivier Dolbeau
April 07, 2014
Tweet
Share
More Decks by Olivier Dolbeau
See All by Olivier Dolbeau
Throw new \Exception(); Oui, mais laquelle ?
odolbeau
1
280
Jane & Webby
odolbeau
0
460
Translating a monolingual application
odolbeau
2
670
DX: Developer eXperience
odolbeau
1
110
DX: Developer eXperience
odolbeau
1
570
EasyAdminBundle introduction
odolbeau
0
200
REX API Platform
odolbeau
0
1.4k
Features flags at BlaBlaCar
odolbeau
5
1.2k
25+ million members in 22 countries, how to scale with Symfony2
odolbeau
2
640
Other Decks in Programming
See All in Programming
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
CSC307 Lecture 01
javiergs
PRO
0
690
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
CSC307 Lecture 03
javiergs
PRO
1
490
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
Patterns of Patterns
denyspoltorak
0
1.4k
組織で育むオブザーバビリティ
ryota_hnk
0
170
AtCoder Conference 2025
shindannin
0
1k
ぼくの開発環境2026
yuzneri
0
100
AI巻き込み型コードレビューのススメ
nealle
0
120
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
Are puppies a ranking factor?
jonoalderson
1
2.7k
Making Projects Easy
brettharned
120
6.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
930
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
820
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
64
Design in an AI World
tapps
0
140
My Coaching Mixtape
mlcsv
0
46
Transcript
Making asynchronous tasks in PHP The easy way
Olivier Dolbeau Dev @odolbeau Who ? Grégoire Pineau Dev @lyrixx
Summary • Why? • How? • Problems? Solutions! • Tips
None
None
None
None
None
None
Your visitors don’t want to wait! (and if they have
to, they don’t want to know it) First reason to do asynchronous
Your web servers want to make their job! (they don’t
care about emails other boring tasks) Second reason to do asynchronous
None
Separating concerns Serveur web Consumer Consumer Consumer Consumer Consumer
None
How Rabbit work?
With more consumers
You can add simple routing logic
Or more complex logic
None
How your app talks to RabbitMQ?
With the PECL extension Thanks to Pieter de Zwart See:
pdezwart/php-amqp Use librabbitmq (alanxz/rabbitmq-c)
With videlalvaro/php-amqplib
None
</troll>
How to connect to RabbitMQ?
How to publish a message?
How to consume a message?
None
None
None
None
None
get > consume • consume is a blocking call •
you don’t want blocking calls in your application ! • Use “get” method with a poll-interval
None
None
None
None
None
None
None
None
None
None
Wait 30 seconds and retry!
Wait 3 minutes and retry!
Wait half an hour and retry!
None
None
None
None
None
None
<troll>
None
None
None
You can take a look at the code ! https://github.com/odolbeau/sflive2014-workers
Swarrot https://github.com/swarrot/swarrot
None