cwhite92 / blog-comments

0 stars 0 forks source link

10-roadrunner-swoole #3

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Swoole vs Roadrunner for Laravel Octane

Just random stuff.

https://chriswhite.is/coding/swoole-vs-roadrunner-for-laravel-octane

peterfox commented 2 years ago

Thank you for your article Chris, interesting comparisons. I've dabbled with RoadRunner more since Octane's release but it seems Swoole is more popular for Octane currently as people want the coroutines etc which are interesting.

You can actually build some of those features into RoadRunner as it is itself an ecosystem where you can compile your own plugins into RoadRunner and taking advantage of Golang. It's something I've written about in my own articles. I believe they're building some plugin for caches/queues in future versions.

I've generally thought that RoadRunner shows a lot of potential for the future as the server matures.

cwhite92 commented 2 years ago

@peterfox that is really interesting - it seems a lot of plugins already exist for Roadrunner: https://github.com/spiral/roadrunner-plugins

and the ability to easily make your own like you've shown is very promising. I'll edit this into the post. Thanks for sharing!

peterfox commented 2 years ago

@cwhite92 yes, basically RoadRunner is all made up of plugins so most of that will already have been built in, there is some complexity within Go and the Endure container that it uses though which makes doing big rewrites can be complicated (trying to make it awesome to use with GCP) but if you just want to extend your app with the RPC server it's actually really easy to make some neat little additions.

famasya commented 2 years ago

I am pretty new to this matter. Do we have to change parts of our codebase for Octane and Swoole/RoadRunner, or is it just works out of the box?

cwhite92 commented 2 years ago

@famasya as far as your user-land code is concerned, it's out of the box. Like I said though Swoole will require you to compile a PHP extension, so if you're looking for a low barrier to entry Roadrunner is probably your best bet.

peterfox commented 2 years ago

@famasya Once you've set up an environment with Swoole or RoadRunner you only need the Laravel Octane package installed for a new project. But if you want to add it to a current project you may have to review what things you've added to the service container or that packages you've added to your project are compatible with Octane. It might not even show up in tests so if you've got a production application I would do a lot of testing with it first to be sure it works as you expect before putting it into production. Memory leaks can potentially occur with Octane.

mhsenpc commented 1 year ago

Thank you for great article