PHP Swoole is different from the traditional PHP model, it is running in CLI mode more like Node.js but with a different design using coroutines without callback hell.
The differences between PHP Swoole with PHP-FPM the traditional PHP model are:
Master process is the entry point of
Reactor threads are created in Master process to handle client side network connection and network I\O.
Manager process create or destory
Worker process and
Task Worker process.
Worker process receive data from Reactor threads and execute business logics, then send back the response to Reactor threads.
Your application code should be run within Worker process.
It is used to process
Task Worker process receive data from
Worker process and send back the result to the
Worker process send data to
Task worker process with:
Task worker process send result back to
Worker process with:
Interested with PHP Swoole? Get Started with PHP Swoole now!