Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Asynchronous tasks in PHP
Search
Olivier Dolbeau
June 24, 2014
Programming
12
1.8k
Asynchronous tasks in PHP
Why & how making asynchronous tasks in PHP
PHPTour Lyon 2014 - 24/06/2014
Olivier Dolbeau
June 24, 2014
Tweet
Share
More Decks by Olivier Dolbeau
See All by Olivier Dolbeau
Throw new \Exception(); Oui, mais laquelle ?
odolbeau
1
260
Jane & Webby
odolbeau
0
450
Translating a monolingual application
odolbeau
2
630
DX: Developer eXperience
odolbeau
1
110
DX: Developer eXperience
odolbeau
1
560
EasyAdminBundle introduction
odolbeau
0
190
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
590
Other Decks in Programming
See All in Programming
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.1k
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.4k
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
180
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
4
1.3k
GoLab2025 Recap
kuro_kurorrr
0
780
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
クラウドに依存しないS3を使った開発術
simesaba80
0
170
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
130
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
440
Java 25, Nuevas características
czelabueno
0
120
Navigating Dependency Injection with Metro
l2hyunwoo
1
190
ゲームの物理 剛体編
fadis
0
370
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Odyssey Design
rkendrick25
PRO
0
440
The Limits of Empathy - UXLibs8
cassininazir
1
190
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
93
A Modern Web Designer's Workflow
chriscoyier
698
190k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The Spectacular Lies of Maps
axbom
PRO
1
400
Balancing Empowerment & Direction
lara
5
820
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.7k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
Transcript
Making asynchronous tasks in PHP
None
Olivier Dolbeau @odolbeau Web Architect About me
RIDESHARING Cost of motoring 100€ 25€ 25€ 25€ 25€ @BlaBlaCar_FR
ALONE
A fast growing community
A European phenomenon
None
None
None
None
None
Your visitors don’t want to wait! and if they have
to, they don’t want to know it
For you :
Your web servers want to make their job! (they don’t
care about emails other boring tasks)
None
Separating concerns Serveur web Consumer Consumer Consumer Consumer Consumer
Separating concerns
None
How Rabbit work?
With more consumers
You can add simple routing logic
Or more complex logic
How your app talks to RabbitMQ?
With the PECL extension Thanks to Pieter de Zwart See:
pdezwart/php-amqp Use librabbitmq (alanxz/rabbitmq-c)
How to connect to RabbitMQ?
How to publish a message?
How to consume a message?
None
None
None
None
It’s a trap !
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
Wait 30 seconds and retry!
Wait 3 minutes and retry!
Wait half an hour and retry!
None
None
None
None
Swarrot
Existing processors
None
None
None
Last tip !
None
None
Making asynchronous tasks is good (even in PHP)
@odolbeau https://joind.in/ 11237 https://github.com/swarrot/swarrot https://speakerdeck.com/odolbeau/asynchronous-tasks-in-php