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
1.9k
12
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Asynchronous tasks in PHP
Why & how making asynchronous tasks in PHP
PHPTour Lyon 2014 - 24/06/2014
Olivier Dolbeau
June 24, 2014
More Decks by Olivier Dolbeau
See All by Olivier Dolbeau
Throw new \Exception(); Oui, mais laquelle ?
odolbeau
1
330
Jane & Webby
odolbeau
0
510
Translating a monolingual application
odolbeau
2
690
DX: Developer eXperience
odolbeau
1
130
DX: Developer eXperience
odolbeau
1
580
EasyAdminBundle introduction
odolbeau
0
250
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
680
Other Decks in Programming
See All in Programming
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
180
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
400
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
110
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
270
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
230
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.3k
共通化で考えるべきは、実装より公開する型だった
codeegg
0
270
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
610
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
8
3.1k
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
150
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
150
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
55
12k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
The SEO Collaboration Effect
kristinabergwall1
1
510
Scaling GitHub
holman
464
140k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
420
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
Design in an AI World
tapps
1
270
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Evolving SEO for Evolving Search Engines
ryanjones
0
240
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