(no title)
xutopia | 4 months ago
Rails has everything he mentions as an advantage of Phoenix. 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.
That's not to say that Phoenix and LiveView aren't phenomenal tools, they are! However what's keeping me in the Rails world is Hotwire Native. I truly feel like a one man army building mobile and web apps in a quick turnaround time.
garbthetill|4 months ago
That being said use what you like and hotwire native sounds cool will give it a try. I also think the author of the blog shouldve went a bit deeper with his points
tvink|4 months ago
What Ruby has though is ability to express what you are doing in a clear syntax. Elixir has a lot of ritual (albeit less than erlang) to set up your most used things like GenServer - you don't abstract away the concurrent flow (which is good, concurrency should be obvious), but you also wouldn't write elixir without it, so code inevitably becomes filled with technical concerns.
I'm biased, I write elixir for a living after a decade in Ruby, and I'm happy with that tradeoff. But there are times where you need to do an imperative thing and make it clear as day, and Ruby often does a better job here.
Rails is also somewhat more ergonomic for fast prototyping than phoenix. ActiveRecord is a blessing and curse, it's insanely productive for making things do things in minutes, but lacks composition later on.
theappsecguy|4 months ago
ed|4 months ago
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.
xutopia|4 months ago
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.
akarshc|4 months ago
bostonvaulter2|4 months ago
Where is the article saying that? I only see " Those things are possible in Rails and Laravel, but they take a bit more effort to set up." which is a very different (and more nuanced/personal take) then what you're stating.
akarshc|4 months ago
ammanley|4 months ago
nomilk|4 months ago
https://www.youtube.com/watch?v=mpWFrUwAN88&t=25m46s
solid_fuel|4 months ago
gregors|4 months ago
aantix|4 months ago
Redis, postgres. I think there's a couple of commercial offerings.
solid_cable is a database polling mechanism which can also be swapped in.