Hi, I would like to talk to you today about an exciting language and technology built on a rock-solid platform. This language is known as Elixir and it runs on a platform known as the ErlangVM or BEAM. Wait, another new language. Haven't there been a lot of new languages emerging in this past five to ten years? Well, yes there have been a lot of new languages. However, Elixir isn't that new. It hit 1.0 in September 2014. Yeah, that's not very long ago, but Elixir began in 2011. Not old enough for you? Okay, what about 1986? That's when Erlang began, that's over 30 years ago. That has some longevity to it. And in fact, Erlang has had many years to mature and become as rock solid as it's known in the telecom industry to be now.
Companies such as WhatsApp and Facebook have benefited greatly from ErlangVM. WhatsApp has been able to document running over two million concurrent users per server using Erlang. Facebook runs over one hundred million chat users concurrently on the ErlangVM. There are many other companies, as well software products, that publicly use ErlangVM. Some of those include Amazon, T-Mobile, Last.fm and Heroku, GitHub. A couple of technologies would be CouchDB and RabbitMQ. There's a big list and it keeps getting bigger of those that are using the ErlangVM. I believe we're going to see a much bigger proliferation with the growing acceptance rate of the Elixir language.
So, what's so special about the BEAM? Well the BEAM, or the ErlangVM, was built with the primary goal of fault tolerance in mind. You see, the engineers at Ericsson were trying to solve a problem that personal computer developers were not faced with at the time. Telecom switches, unlike personal computers, can't be tolerated to be rebooting to accept software updates. They can't have blue screens of death. In fact, if your telecoms switch freezes and cannot handle any calls, you might have real deaths.
Telecom users weren't just using spreadsheets and word processors. Telecom users might be trying to contact emergency services. Just imagine how tragic it would be if the software inside the telecoms switch were to freeze and prevented someone from reaching emergency services when they need it the most. So, the ErlangVM had to be built with fault tolerance in mind. Part of what enables that fault tolerance, is the notion of process isolation, which also in fact gives us the ability to perform excellent concurrency. What that means in layman's terms, is that one part of your software, let's say if it's the telecoms switch could be working on connecting a call while another part could be handling the call, another call and another part could be currently transferring a call to another place. What if a circuit goes bad inside of that telecom switch while handling those calls? Well clearly something isn't going to work anymore. One of those calls or several of those calls might be routing through that particular electrical circuit and they would of course experience an unforeseen problem; what we would see as an error in another language. What would happen in Erlang? The processes running that specific code would crash. And thanks to the magic of the ErlangVM those processes would be restarted somewhere else and the existing information from those previous processes would be passed along to the new ones so that the overall operation could continue as if nothing happened.
How can we achieve this with the ErlangVM without writing amazingly complex software? Well, Erlang provides a framework known as the open telecom platform or OTP for short. Telecom, but what if I'm not doing telecom? No problem, that's just a left over name from the ninety's. It doesn't really have anything to do with telecom it's actually a bunch of very generic abstractions and design patterns that are built to assist the programmer at writing robust resilient concurrent code. OTP provides a great pattern known as supervision, which means that you can have processes which have supervisors that are watching those processes. If one of those processes were to crash. That supervisor would be passed a message from the dying process with its last known information. Then that supervisor could pass that on to the next process that it creates, thus ensuring that whatever was currently being worked on would be able to complete.
So, the ErlangVM runs Erlang and there's companies that have Erlang in production successfully right now. So, if Erlang is widely used in production by many successful companies, why am I going to learn Elixir? Well you could go and learn Erlang, nothing is stopping you. Many find that the syntax is difficult to work with. Elixir on the other hand makes the BEAM more approachable than Erlang. Elixir provides a beautiful modern syntax. It has a small dialect, which means it doesn't have very many keywords to learn or symbols to learn. So, it can be picked up fairly quickly. Elixirs is extensible, with metaprogramming. That means macros can be written, which extend or change the language. This comes from originally the concepts in Lisp. World class tooling means that developers can create projects, test projects, built projects and deploy projects.
Elixir has a vibrant community. One great example is the Phoenix framework. The Phoenix framework started out as a web framework much like Ruby on Rails. However, it continues to grow and morph to add more features that could be useful outside of the realm of web programming. So, I'm excited about the Elixir. I hope I can make you excited about Elixir so that you will join me and learn how to write rock solid cutting-edge applications in Elixir on a rock solid-platform, learn an entirely new way of programming and approaching computing. Whether you have years of seasoned programming experience or you're new entirely to programming, Elixir is accessible. Elixir eliminates much of the complexity that we see in object oriented programming and takes an entirely different approach to computing problems. I invite you to learn Elixir with me. I want to help you break through to an entirely new way of thinking about programming and computing, join me, thanks.