Hi.
> This is simply not true.  The example you're replying to is quite common.

It’s probably my poor English. So I’ll try to rephrase the idea:
The majority of database queries are executed sequentially, step by
step. Not all queries. Not always. But most of them.
This is true even in languages that already have async.

> That is *A benefit*.  It is not the *only benefit*.  Being able to compress 
> the time of each request in a shared-nothing model is absolutely valuable.
(It’s important not to overestimate this model, otherwise lately you
sometimes hear complaints that the ultra-trendy immutable philosophy
leads to terrible performance :))

A stateful worker does not automatically mean active sharing of state
between requests. It gives the developer the choice of what can and
cannot be shared. You have a choice. If you want all services to
follow the immutable model — you can do that. But now you don’t have
to pay for compilation or initialization. You have complete creative
freedom.

> Remember, in the wild, PHP-FPM and mod_php are by orders of magnitude the 
> most common ways PHP is executed.  React, Swoole, etc. are rounding errors in 
> most of the market.  And the alternate runtime with the most momentum is 
> FrankenPHP, which reuses processes but is still "one request in a process at 
> a time."

Almost no one wants to spend time building code with a technology that
isn’t supported. So when people want to do things like that, they
simply choose another language.
I’m not saying that async isn’t supported in CGI mode... but..
it’s just that a gain of a few milliseconds is unlikely to be noticeable.

> I am going to assume this is a translation issue, because "morally outdated" 
> is the wrong term here.

Thank you! That’s true. But a more accurate translation would be: it’s
a technology that has become outdated not because of time, but because
the circumstances and requirements have changed. Back in the years
when CGI was evolving, things were different. There were no servers
with a dozen cores.

Reply via email to