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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Olivier Dolbeau
June 24, 2014
Programming
12
1.9k
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
290
Jane & Webby
odolbeau
0
470
Translating a monolingual application
odolbeau
2
670
DX: Developer eXperience
odolbeau
1
120
DX: Developer eXperience
odolbeau
1
570
EasyAdminBundle introduction
odolbeau
0
210
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
650
Other Decks in Programming
See All in Programming
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.9k
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
260
How to stabilize UI tests using XCTest
akkeylab
0
130
CSC307 Lecture 15
javiergs
PRO
0
260
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
OTP を自動で入力する裏技
megabitsenmzq
0
120
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.3k
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
410
Claude Code Skill入門
mayahoney
0
400
The free-lunch guide to idea circularity
hollycummins
0
270
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
280
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
200
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
150
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
220
Building an army of robots
kneath
306
46k
We Have a Design System, Now What?
morganepeng
55
8k
Git: the NoSQL Database
bkeepers
PRO
432
66k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
290
Amusing Abliteration
ianozsvald
0
140
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
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