If you’ve been following Elixir or Erlang, you’ve probably come across OTP. It is often hyped as the answer to all high-availability distributed-application woes. It isn’t, but it certainly solves many problems that you’d otherwise need to solve yourself, including application discovery, failure detection and management, hot code swapping, and server structure.
First, the obligatory one-paragraph history. OTP stands for the Open Telecom Platform, but the full name is largely of historical interest and everyone just says OTP. It was initially used to build telephone exchanges and switches. But these devices have the same characteristics we want from any large online application, so OTP is now a general-purpose tool for developing and managing large systems.
OTP is actually a bundle that includes Erlang, a database (wonderfully called Mnesia), and an innumerable number of libraries. It also defines a structure for your applications. But, as with all large, complex frameworks, there is a lot to learn. In this book we’ll focus on the essentials and I’ll point you toward other information sources.
We’ve been using OTP all along—mix, the Elixir compiler, and even our issue tracker followed OTP conventions. But that use was implicit. Now we’ll make it explicit and start writing servers using OTP.