Digiforma has been working since its creation with Elixir technology and the Phoenix framework and in this article, I decided to explain why we made this choice.
What is Elixir?
According to the Elixir websiteIt is a "dynamic and functional language for building scalable and easy-to-update applications".
It is compiled in Erlang and runs on BEAM, a virtual machine designed to be able to handle many connections simultaneously to meet the needs of telecommunication networks, making it an ideal language for the Web.
Thus, (at the risk of repeating myself), Elixir easily adapts to the increase in the number of users thanks to the lightness of the processes which can be numerous to run at the same time on the same server.
The simultaneous execution of task threads allows to optimize the execution speed of programs without requiring too much intervention from the developer. In order to get the opinion of a daily user of Elixir, I asked one of our developers what he liked so much about the language, to which he replied without any hesitation: " Elixir's code is above all explicit and very readable. I also find an advantage to manipulate pure data, i.e. to write functions without side effects that make the code easier to understand. "
Phoenix: The Elixir Framework
Phoenix is a popular tool written in Elixir and used with this language. On the server side, Phoenix uses a scheme close to the Model View Controller. Like Elixir, it was designed to provide applications capable of working with a very large number of users. Phoenix is used to allow developers to make Web with Elixir.
Phoenix enables greater productivity and provides :
- An architecture framework close to MVC, stable, modern and powerful
- A database manipulation tool (Ecto)
- A rich ecosystem of third-party libraries
- Native management of websockets
(source: symbiosis.com )
Known companies that use Elixir or BEAM
Interview with Henri Morlaye, developer and co-founder of A world for us
Now that we know all about Elixir, let's get to the heart of the matter. In order to know why we chose this technology to develop Digiforma, I turned to the main person involved.
At the beginning of Digiforma, did you immediately think of turning to Elixir for its development?
What you need to know is that before Digiforma, I worked on a lot of other projects with other technologies, Node.js, Ruby on Rails, Django etc. I tried a lot of recent technologies and Elixir proved to be the most relevant choice for our goal with Digiforma. I tried a lot of recent technologies and Elixir turned out to be the most relevant choice for our goal with Digiforma.
What exactly were you looking for that you couldn't find elsewhere?
I was looking for a full stack framework that is the reference for users of the language it is based on. There are not many in this case. When we talk about well-designed, complete and well-maintained frameworks, we have for example Ruby on Rails, Symphony in PHP, Django in Python... In reality, I chose Phoenix more than Elixir. You have to know that Elixir was created by former Ruby On Rails users who saw the limits of Rails and tried to solve these problems by creating Elixir/Phoenix. For this, they used BEAM, a powerful virtual machine that is incredibly stable and well maintained so with regular improvements and a very fast handling of malfunctions.
Another strong quality of Elixir is that it is a functional language. This means that instead of manipulating objects that each have a state, we will create functions that simply process immutable data. It is much clearer and linear, in case of malfunctioning, it is enough to look at the data at the moment when the malfunctioning took place to find its origin. A whole class of bugs disappears.
In summary, I chose Elixir because it is a functional language, simple and understandable and based on a good virtual machine (BEAM), with an excellent web framework popular among language users.
Elixir is not very popular, how did you come to choose this technology?
Elixir is not very popular in France, but it is already much more developed in the United States, for example. When you develop in the Ruby on Rails universe, you're also very aware of what's going on with Phoenix and Elixir.
What are the main drawbacks of this technology?
When we started in 2016, Phoenix wasn't fully stable yet, there were quite a few improvements and changes in the beginning. That problem is solved now and it's much more stable.
Afterwards, it seems that it is difficult to recruit in this technology, but the reality is that today, no matter what technology is required, recruitment is complicated. I would add that I am not looking for a developer specialized in Elixir because it is not difficult for a good developer to learn a new language, especially if it is a functional language.
Did you see Elixir as a safe choice or rather as a gamble? Did it pay off?
To be honest, I didn't think we would ever grow this fast, I didn't think we would grow this much and this fast, and considerations such as the difficulty of recruiting didn't come into play... after that, yes, you could say that it was a gamble. Today, the difficulties that we may encounter on a daily basis are never related to the technology we use, so we can say that this gamble has worked. It is very satisfying to know that we are using a beautiful and powerful tool. We know that we can go far with it and it will accompany us far, that is really pleasant.
After several years on Digiforma, what is your feedback on Elixir/Phoenix and if you had to make the same choice today, would you do it again?
Yes, I would do it again without hesitation. It was a really good choice and I recommend it to all tech companies that have some of the same needs as Digiforma.