laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.71k stars 284 forks source link

When can coroutines be supported? #256

Closed AuroraYolo closed 3 years ago

AuroraYolo commented 3 years ago

Want to see laravel and coroutines used in combination

nunomaduro commented 3 years ago

It is in our backlog, but we are not sure yet if we will tackle it.

Spartaques commented 3 years ago

very interesting topic @nunomaduro

Igorut commented 2 years ago

@nunomaduro without coroutines, this project is simply useless. Each request with blocking operations blocks one task worker. A full-fledged copy of PHP-FPM, isn't it? In fact, swoole and rr are used here only to exclude initialization for each request, but what's the point if we get a large number of RPS only when we return static content, without blocking requests to the database, external services and so on?

jobsssss commented 2 years ago

Can you explain why coroutines are not supported? If you don't support coroutines, it doesn't make much sense to use Octane, or is it convenient to tell you what the difficulties are in supporting coroutines? Or when do you plan to start supporting coroutines?

thank you very much

Ekion-1 commented 1 year ago

I agree; it seems a bit short sighted. Don't get me wrong, I appreciate the work you guys have put into Octane but without coroutines I don't understand the real-world benefit.

@nunomaduro do you have an update from the team regarding if this will be tackled?

AuroraYolo commented 8 months ago

Not good, laravel has too many global variables

单独使用是否Swoole\Runtime::enableCoroutine();足以将 Octane 应用程序转换为异步应用程序?