Swoole is different from the traditional PHP model, it is running in CLI mode.
The differences between 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 Swoole? Get Started with Swoole now!