Hacker News new | ask | show | jobs
by ed 253 days ago
> He's also implying that Rails does not use web sockets to communicate with frontend which is not only wrong it should be evidently wrong to anyone who built a Rails app in the last 3 years.

I’m actually a rails dev but I’d reach for phoenix if my app required a large number of persistent sockets (e.g. high-volume MCP servers). I say this mostly because the hosting story is better for phoenix (gigalixir) than rails (heroku, or similar services that run behind a request router). Of course if you want your own infra this argument doesn’t apply. But a $100 gigalixir box can easily serve 100k persistent connections — even a few thousand persistent connections is a non-starter on Heroku.

2 comments

In the local Rails community where I live we haven't used Heroku for a while now. Most of us have moved on to using Kamal with a VPS of our choice. The surprising benefit is that you can even host multiple rails app on a single VPS so it is ideal for playing around with multiple hosted apps.

As for raw performance I'm sure you'd get better deal with Elixir out of the box than Rails out of the box but if you wanted to keep all the benefits of Rails and scale websocket usage look into AnyCable.

I didn’t say that rails doesn’t use websockets. What i meant is that liveview comes with websockets fully integrated into the framework. This doesn’t mean rails can’t use websockets, but liveview has implemented it more seamlessly at the core. I’ve also mentioned that rails and laravel are both great frameworks, but after using phoenix, i felt that liveview offered advantages in terms of performance and implementation. I’ve worked with all three frameworks and chose the one that worked best for my project. Have you had a chance to try phoenix? If not, do try it out then you’ll get what I meant.