Hello,
To serve content from PHP by using HTTP in a professional way, there is a need http/2 + http/3 (quic), to implement it, an event handler/concurrency is needed, in the same way, the professional HTTP servers do as Nginx, Litespeed Web Server or Cloudflare
PHP natively has this support related to events/threads:
Events / libeio
Parallel
To serve content from PHP by using HTTP in a professional way, there is a need http/2 + http/3 (quic), to implement it, an event handler/concurrency is needed, in the same way, the professional HTTP servers do as Nginx, Litespeed Web Server or Cloudflare
PHP natively has this support related to events/threads:
Events / libeio
Parallel
libev
Such extensions don't have an integrated HTTP/2 server, it why there are third party extensions with such support as:
Such extensions don't have an integrated HTTP/2 server, it why there are third party extensions with such support as:
Or Frameworks:
amphp/http-server
It is the closest you can serve content from PHP to a browser by using HTTP/2, similar to the Node.js HTTP/3 server OR Node.js HTTP/2 server
But, I do not recommend serving HTTP content directly from PHP, the core PHP developers only have reached a dev HTTP server, it's due to event/threads in PHP still not safe for enterprise, instead, the best connector so far isn't FPM, it is LSAPI based on this benchmark
Disclaimer: I have no relation with any of the companies linked here.
It is the closest you can serve content from PHP to a browser by using HTTP/2, similar to the Node.js HTTP/3 server OR Node.js HTTP/2 server
But, I do not recommend serving HTTP content directly from PHP, the core PHP developers only have reached a dev HTTP server, it's due to event/threads in PHP still not safe for enterprise, instead, the best connector so far isn't FPM, it is LSAPI based on this benchmark
Disclaimer: I have no relation with any of the companies linked here.
Regards,
Jose NobileOn Sun, Mar 21, 2021 at 10:59 AM Gunter Grodotzki <gunter@xxxxxxxxxxxxx> wrote:
> FastCGI or something like that to execute the compiler.
Yes exactly – “or something like that” is my question. Why FastCGI?
This is especially given, that I see no other “modern” programming language or framework going down that route. You do not _need_ FastCGI, its just the _current_ choice of protocol for communications between HTTP (Server) <> Script.
Hope my questioning is a bit clearer now. Again: I know what FastCGI is and what it does on a high-level. But would like to know why HTTP is not being considered.
Cheers,
Gunter