Hundreds of programming languages are born every year, and most of them are forgotten almost as soon as they appear. Erlang has been around for 30 years and is adopted in more and more industries every day. The language has a very unique set of features that make it particularly well suited for both today’s and tomorrow’s technologies.
We use Erlang in areas such as financial switches, instant messaging servers, gaming servers, HTTP servers and web frameworks and database engines. It was originally invented to respond to the demands of massive concurrency, distribution, soft real-time and high availability in telecoms, but its unique features have made it invaluable to many other industries.
Erlang has a middleware called OTP that is delivered with the core language, as well as a vast universe of external libraries and packages for many different purposes. Through various protocol stacks, testing and logging frameworks, Erlang covers most of the needs imposed by today’s software systems.
With Erlang, you can:
Elixir is a functional, concurrent programming language running on the Erlang Virtual Machine (aka the BEAM). Elixir was created in 2012 to make it easier to extend and improve developers’ productivity on the BEAM. As the two languages are closely related, all Erlang libraries can be used from Elixir.
Elixir’s ‘out of the box’ productivity is accomplished by a strong focus on tooling and convenience in expression of data manipulation. System design is the same in Elixir and Erlang, but Elixir removes a lot of boilerplate code and is easier to extend. The removal of boilerplate raises productivity and allows programmers to get feedback faster – crucial when you want to launch your product to market as fast as possible. Less boilerplate also makes for happy developers, and happy developers are unsuprisingly productive developers.
What's not to like about Elixir? Despite having very talented people on the core team (and a growing community) Elixir is is a very young language. So it's likely to have more bugs in its implementation and standard library than Erlang. This holds true for Elixir’s third party libraries as most of them are very young.
In contrast, two decades of development in the Ericsson labs show in the extremely high quality of Erlang and its standard library.
Which one should I choose?
If it's a mission critical production system for a mature business that's looking for high quality, you should use Erlang. You won’t get any surprises. It just works.
If you’re a start-up the choice is broader.
Anything with protocols and potentially some device driver interaction is Erlang turf. If your product is close to the original domain of Erlang, then you should go with Erlang.
If you are developing an idea that involves a web service, Elixir and the Phoenix framework could be just what you need. You will get the best possible support for your main goal – time to market and fast adaptation to changes.
In our expert opinion, the trickiest part about adopting Elixir/Erlang is not the syntax. It is applying the core principles of the concurrency and failure model of the Erlang Virtual Machine, which are different from other technologies.
Our recommendation – unless you are 100% sure that plain old Erlang is the right choice for you (or you are already an experienced Erlanger), you should consider learning about the concepts through our Elixir/OTP Bootcamp course.
So far, the Internet of Things has been most closely associated with machine-to-machine communication in manufacturing and power, oil and gas utilities. But having your watch, kettle, thermostat and TV talk to each other to prepare the perfect cosy environment when you return home is no longer a sci-fi dream of the distant future. The (very near) future is full of possibility and wherever IoT will get us, Erlang/OTP will have a role to play.
We leveraged three Erlang-based technologies to build general systems upon which our customers realise Internet of Things scenarios for their own clients. We used RabbitMQ for real-time data streaming, the Riak database for storing historical data and MongooseIM to connect users.