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
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
270
Jane & Webby
odolbeau
0
460
Translating a monolingual application
odolbeau
2
660
DX: Developer eXperience
odolbeau
1
110
DX: Developer eXperience
odolbeau
1
560
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
620
Other Decks in Programming
See All in Programming
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
670
CSC307 Lecture 01
javiergs
PRO
0
670
.NET Conf 2025 の興味のあるセッ ションを復習した / dotnet conf 2025 quick recap for backend engineer
tomohisa
0
110
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
170
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
360
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
360
ゆくKotlin くるRust
exoego
1
200
Patterns of Patterns
denyspoltorak
0
630
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
580
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
270
Vibe codingでおすすめの言語と開発手法
uyuki234
0
180
Python札幌 LT資料
t3tra
7
1.1k
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
200
Writing Fast Ruby
sferik
630
62k
Abbi's Birthday
coloredviolet
0
4.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
90
My Coaching Mixtape
mlcsv
0
26
How Software Deployment tools have changed in the past 20 years
geshan
0
31k
A Soul's Torment
seathinner
5
2.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
51
The Curse of the Amulet
leimatthew05
0
7.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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