Re: RFC proposal: worker mode primitives for SAPIs
| From: | Rowan Tommins | Date: | Mon, 01 Jan 2024 11:18:19 +0000 |
| Subject: | Re: RFC proposal: worker mode primitives for SAPIs | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-122079@lists.php.net to get a copy of this message | ||
On 31 December 2023 16:31:31 GMT, Pierre Joye <pierre.php@gmail.com> wrote:
>php handles this in threadsafe mode
Depending on your exact definition of "php", this is either irrelevant or just plain
wrong.
If you mean "the HTTP SAPIs shipped with official builds of PHP", then it's true,
none handle multiple concurrent requests in a single thread using async I/O. But none handle
multiple consecutive requests in a single thread using a "worker mode" either, which is
the whole point of this conversation.
If you mean for "php" to include third party HTTP handlers such as FrankenPHP, then it
also includes Swoole, which is what I was describing. Please someone correct me if I'm wrong,
but I understand ReactPHP and AMPHP also include HTTP servers using the same principle.
So, to reiterate my point once more: implementations of PHP using async concurrency are out there
already in production use. If we're attempting to standardise a new API for worker modes (i.e.
HTTP servers which are no longer "shared nothing"), choosing one which can be used by
consecutive worker modes (FrankenPHP , RoadRunner) but not concurrent ones (Swoole, ReactPHP, AMPHP)
feels like a big missed opportunity.
Regards,
--
Rowan Tommins
[IMSoP]