I disagree that Elixir is easy to learn, the syntax ok, it's weird compared to most OO languages, but actually using OTP is a real paradigm shift that requires a totally different way of thinking about issues. I did not find that easy at all.
The other issue is that Elixir and Phoenix have become joined at the hip in the same was as Ruby and Rails, and Phoenix didn't click with me at all, coming from the JVM world I really didn't get on with it.
After reading Programming Elixir, Elixir in Action and Programming Phoenix I decided that it wasn't an easy way to make web applications that don't need OTP, and in fact I couldn't imagine a scenario where any web application I would ever write would need OTP (for the whole thing anyway, I can imagine cases where small parts of a larger system could benefit massively from fail fast architecture)
Edit:
I would also argue that designing an OTP based system architecture is harder than just writing a non distributed system and then adding in load balancing or fail over.
I don't think it's easy to learn either. The basics are easy, and the syntax is easy, and writing some code that does what you want in the repl is easy. But then you try to make a real application and you have more questions than answers.
But, you can do OTP without making it distributed. Elixir is awesome in that you have this actor based system (genserver) where the syntax gets out of the way more than in any other language i'm familar with. So the business logic running on these genservers is really easy to understand. And there is nothing stopping you putting them behind message queues or load balancers. Most of the time, that's probably appropriate.
Your web server, database connections, http clients would be the ones leveraging OTP here. In my talks, I usually cover the design of the connection pool and how it guarantees bugs in the pool bring all connections down with it, without leaking resources.
Ideally, developers should be able to use Phoenix for simple applications without caring about the low-level OTP details. That's how we tried to structure the Phoenix book: the classic MVC and then the OTP stuff. But it seems we still have more work to do in this area. :)
reply