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
220
Jane & Webby
odolbeau
0
390
Translating a monolingual application
odolbeau
2
560
DX: Developer eXperience
odolbeau
1
92
DX: Developer eXperience
odolbeau
1
540
EasyAdminBundle introduction
odolbeau
0
180
REX API Platform
odolbeau
0
1.3k
Features flags at BlaBlaCar
odolbeau
5
1.1k
25+ million members in 22 countries, how to scale with Symfony2
odolbeau
2
500
Other Decks in Programming
See All in Programming
型で語るカタ
irof
0
700
レベル1の開発生産性向上に取り組む − 日々の作業の効率化・自動化を通じた改善活動
kesoji
0
300
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
300
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
130
DMMを支える決済基盤の技術的負債にどう立ち向かうか / Addressing Technical Debt in Payment Infrastructure
yoshiyoshifujii
3
410
Porting a visionOS App to Android XR
akkeylab
0
680
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
23
9.6k
効率的な開発手段として VRTを活用する
ishkawa
0
160
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
140
Claude Code + Container Use と Cursor で作る ローカル並列開発環境のススメ / ccc local dev
kaelaela
12
7k
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
270
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
150
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Adopting Sorbet at Scale
ufuk
77
9.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
830
Why Our Code Smells
bkeepers
PRO
337
57k
It's Worth the Effort
3n
185
28k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Practical Orchestrator
shlominoach
189
11k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
Rails Girls Zürich Keynote
gr2m
95
14k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
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