~/talk

Mezzio + Swoole

Talkat phpday 2024 · 2024-05-16..05-17· [php]
slides:none on file

Combining Mezzio PSR-15 middleware with Swoole coroutines and task workers keeps the app bootstrapped in memory so APIs return faster, for example spawning a coroutine to send an email immediately returns a response while the mail sends in background, and Swoole clients claim benchmarks like 10,000 MySQL reads in ~0.2s. The build uses delegator/factory wrappers to reinstantiate timed‑out DB/ODM connections, relies on stateless services (no sessions), and requires provisioning enough workers because each worker handles one request and the manager respawns crashed workers.

AI-written summary · about

  1. 0:00Introduction
  2. 1:56Why APIs need to be fast and modern demands
  3. 3:45Mezzio and its architecture
  4. 5:34Middleware in Mezzio
  5. 8:50Middleware reuse and attributes
  6. 13:48Swoole and its advantages
  7. 15:56Swoole request handling
  8. 17:22HTTP servers with Swoole
  9. 18:04Swoole coroutines and concurrency
  10. 20:37Mezzio + Swoole
  11. 21:40Offloading with coroutines
  12. 23:08Long-running tasks with workers
  13. 24:54Task management with delegators
  14. 25:59Cron jobs with Swoole
  15. 28:46Cron execution and events
  16. 29:51Swoole challenges
  17. 32:21Stateful services and timeouts
  18. 33:44Reliable DB connections
  19. 34:28Resources and documentation
  20. 35:15Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.