Hacker News new | ask | show | jobs
by ericb 861 days ago
> On the other hand Phoenix destroys Rails in any realtime scenario.

The Rails realtime story is going to be radically improved in Rails 8! I've been using the Turbo beta, and it is magical.

With 3 lines of code each, I made my index page, and show page live, and real-time updating.

I think Phoenix has something similar--perhaps it was the inspiration?

2 comments

> I think Phoenix has something similar/

phoenix's channels (for realtime) is the only multiclustered websocket solution with long polling fallback that I know of that will scale to thousands of users out of the box. My startup uses websockets and its never been a bottleneck vs the headaches I've deal with doing similar stuff in nodejs. its just an absolute unit for doing realtime.

And now they have liveview which takes that and builds on it to accomplish magic.

rails has done great things but comparing it to phoenix on realtime stuff is like comparing a moped to an f16

> comparing it to phoenix on realtime stuff is like comparing a moped to an f16

Have you tested this? I ask because under the hood, Rails is using Faye, and Faye is using EventMachine.

About 10 years ago I load tested Faye vs. Node in a websocket scalability test for a websocket based chat app I was writing, that, funnily enough had a polling fallback. We had scalability needs up to around 10k or 20k simultaneous connections if I remember right and I wanted to know their ceilings before we wrote the real code and invested in either.

Faye kicked Node's butt on simultaneous connections and throughput. Node fell over while Faye was still going. Eventmachine, which Faye uses, can scale like nobody's business. It IS an F16.

I worked at a startup using rails. I also spent several years as a nodejs engineer.

I built my startup in elixir.

having experienced all 3, I can tell you in real world perfrmance, the metaphor is accurate. if you're boostrapping a startup and you need fast, stable websockets. elixir is the GOAT.

yeah, elixir is still going to destroy it at runtime. the concurrent story is even more important with the features you’re talking about and especially in that segment, it’s not even close.