When would we use Elixir over Ruby?
We use Ruby on Rails because it excels at prototyping applications when you consider how fast you can get a site up and ready in production. The ecosystem is large, so there are many libraries that solve problems and save time.
We use Elixir and Phoenix when working with applications that we anticipate will have a large user base. Because it is concurrent, it can be easier to scale than Ruby. It is a compiled language, so it’s likely that we’ll spot bugs earlier, which can help with overall development time.
Elixir and Ruby have similar build tools; ‘mix’ on the Elixir side VS ‘rake’ on the Ruby side. Likewise, ‘Hex’ package manager operates similar to ‘Gems’ with Ruby. The Phoenix Framework is heavily influenced by Ruby on Rails and also uses the MVC (Model, View, Controller) architectural pattern.
Other companies using Elixir in production
- Discord is a free voice and text chat for gamers. They used Elixir to scale up to 5,000,000 concurrent users and millions of events per second.
- Findmypast makes original historical documents available to search online, so that people can explore a collection of over two billion records find their ancestors and trace their family tree from the comfort of their own home, worldwide.
- Pinterest is using Elixir for its notification system to deliver 14,000 notifications per second. The notification system runs across 15 servers, whereas the old system, written in Java, ran on 30. The new code is about one-tenth of the size of the old code.