Over the past week I’ve been diving into Elixir and Phoenix. As it is with most languages, there some good and some bad with Elixir. That said, anyone announcing the death of Rails at the hands of Phoenix is probably a bit early.
While I didn’t do any benchmarks myself, that path is well worn. It seems fair to say that Elixir is probably faster than Ruby and Phoenix is probably significantly faster than Rails.
It’s also likely that Phoenix will handle WebSockets far better than Rails will, even with ActionCable.
On top of all of that, Elixir seems to also have a slight edge over Rails in terms of asynchronous jobs, since they can be done directly. For truly heavy jobs, Elixir would also likely need a library of some sort to manage load generated on non-Elixir systems (like your database). It seems like it would be a thinner layer between your transactional code and your jobs, though.
Despite all of that, if I were starting a new project today, odds are good that it wouldn’t be in Elixir or Phoenix.
Continue reading Rails vs. Phoenix
During RailsConf this year, a blog post made the rounds which suggested that, more or less, Rails was dying and Elixir and Clojure were the places to be. I was pretty skeptical. After all, there are still production systems running Fortran and COBOL — the odds that a framework as widespread as Rails is going to dry up any time soon is basically nil. Also, Rails is pretty good at what it does. Most of the “problems” Elixir proponents are solving with Rails are not things Rails was really built to do. It’s a bit like saying everyone is going to give up cars because they can’t make it to the moon.
Still, some people are pretty excited about Elixir, so I spent a few hours at the conference looking into it. At first glance, it’s not as easy to read or understand as Ruby. It’s probably way faster (but what isn’t?). Phoenix, Elixir’s answer to Rails, looked to be missing basic things that would be needed to supplant Rails (like a fully-capable ORM).
So, unsurprisingly, it looks like a bit of puffery from the Elixir community. That’s how these things work, though; the challengers have to make claims about the reigning champ to get some attention. It did get me thinking that I should write something in Elixir, to see how it is in the real world.
Fast-forward a few months. My employer is sending a handful of its engineers off into the wilderness for a week of free-form learning and experimentation1. This week, I’m going to be learning Elixir and trying to build a real application in it.