Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Making asynchronous tasks in PHP
Search
Olivier Dolbeau
April 07, 2014
Programming
3.7k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Making asynchronous tasks in PHP
Why & how making asynchronous tasks in PHP
SFLIve2014 - 04/07/2014 with Grégoire Pineau
Olivier Dolbeau
April 07, 2014
More Decks by Olivier Dolbeau
See All by Olivier Dolbeau
Throw new \Exception(); Oui, mais laquelle ?
odolbeau
1
360
Jane & Webby
odolbeau
0
540
Translating a monolingual application
odolbeau
2
720
DX: Developer eXperience
odolbeau
1
150
DX: Developer eXperience
odolbeau
1
600
EasyAdminBundle introduction
odolbeau
0
280
REX API Platform
odolbeau
0
1.4k
Features flags at BlaBlaCar
odolbeau
5
1.3k
25+ million members in 22 countries, how to scale with Symfony2
odolbeau
2
700
Other Decks in Programming
See All in Programming
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
170
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.6k
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
8.8k
LLM 101
dalinaum
0
470
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
240
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
110
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
SODA - FACT BOOK(EN)
sodainc
1
220
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
630
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
160
AI Augmentation Techniques with Liberty
ivargrimstad
1
400
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
570
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
KATA
mclloyd
PRO
35
16k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
550
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
510
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
680
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
610
Darren the Foodie - Storyboard
khoart
PRO
4
4.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
450
Transcript
Making asynchronous tasks in PHP The easy way
Olivier Dolbeau Dev @odolbeau Who ? Grégoire Pineau Dev @lyrixx
Summary • Why? • How? • Problems? Solutions! • Tips
None
None
None
None
None
None
Your visitors don’t want to wait! (and if they have
to, they don’t want to know it) First reason to do asynchronous
Your web servers want to make their job! (they don’t
care about emails other boring tasks) Second reason to do asynchronous
None
Separating concerns Serveur web Consumer Consumer Consumer Consumer Consumer
None
How Rabbit work?
With more consumers
You can add simple routing logic
Or more complex logic
None
How your app talks to RabbitMQ?
With the PECL extension Thanks to Pieter de Zwart See:
pdezwart/php-amqp Use librabbitmq (alanxz/rabbitmq-c)
With videlalvaro/php-amqplib
None
</troll>
How to connect to RabbitMQ?
How to publish a message?
How to consume a message?
None
None
None
None
None
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
None
None
None
Wait 30 seconds and retry!
Wait 3 minutes and retry!
Wait half an hour and retry!
None
None
None
None
None
None
<troll>
None
None
None
You can take a look at the code ! https://github.com/odolbeau/sflive2014-workers
Swarrot https://github.com/swarrot/swarrot
None