~/talk

The promise of asynchronous PHP

Talkat PHP Tour Luxembourg 2015 · 2015-05-12..05-13· [php, concurrency]
slides:none on file

Asynchronous PHP can run nonblocking IO using built‑ins and libraries so you can do DNS lookups, HTTP calls and file streams in parallel instead of serially. Examples include ReactPHP with event loops, deferred/promises and streams, a DNS resolver using Google DNS, a full chat server in ~30 lines, and lower level options like pthreads, pcntl_fork, popen and curl_multi_select. Caveats: it often uses more CPU, doesn’t guarantee execution order, and long tasks are better off in queues like Gearman.

AI-written summary · about

  1. 0:00Introduction to Async PHP
  2. 2:04Understanding Blocking IO
  3. 5:52Built-in Async Solutions
  4. 7:05Pthreads for Multi-threading
  5. 9:53Multiprocessing with Fork
  6. 11:58Using Curl Multi
  7. 13:24Underlying Libraries
  8. 15:48Introduction to ReactPHP
  9. 19:06Promises and Chaining
  10. 27:03Stream Processing
  11. 29:10Building a Chat Server
  12. 31:46Golden Rules and Pitfalls
  13. 34:27Q&A and Conclusion
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.