DEV Community

Discussion on: Getting started with asynchronous PHP using ReactPHP

Collapse
 
moopet profile image
Ben Sinclair

I'm afraid I'm struggling to see the rationale for this.

PHP persists state with sessions, and the Apache, FPM, even old-school CGI systems are almost the equivalent of being "event driven". With some of these, you even have a PHP process resident so it's always available. There are many existing queuing systems that will let you defer activities so you don't block responses.

It's true that unless you use some kind of cron job you won't get timers, but the loop is otherwise the same. This seems like creating microservices for every individual task - each of which will tie up another PHP process.

What am I missing?