Re: Re: HTTP/2 and Websocket support in 7.x versions
| From: | Rowan Collins | Date: | Tue, 31 Mar 2015 21:31:43 +0000 |
| Subject: | Re: Re: HTTP/2 and Websocket support in 7.x versions | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85610@lists.php.net to get a copy of this message | ||
On 31 March 2015 21:23:56 GMT+01:00, Andrey Hristov <php@hristov.com> wrote:
>So, if Zend can be optimized to quickly clean the execution
>environment,
>and easily switch between them, we can have a giant leap towards
>concurrent non-blockable PHP. The idea is simple - the Zend environment
>
>should be some structure, and TSRM needs implementation not using TLS,
>in this case. The MySQL Server used to bind a connection to a thread
>but
>since years these are decoupled and with the right plugin you can have
>100 threads serving many times more connections because thread
>switching
>is an expensive task. This ain't rocket science.
You make it sound so simple, but the fact that an environment is set up and torn down for each
request is fundamental to the whole language, not just a detail of the engine.
If all you're doing is making that setup and teardown quicker, I don't see how you're
getting any closer to asynchronous code. FPM could do all sorts of magic with its memory management,
but it wouldn't help someone write a WebSocket server.
Maybe I'm missing something, but I can't picture how you'd have a meaningfully
event-based SAPI that looked just like a single-request one to the user.
Regards,
--
Rowan Collins
[IMSoP]