Chapter 11. System Principles and Release Handling

Now that we know how to implement and use existing OTP behaviors, organize them in supervision trees with special processes, and package them in applications, the time has come to group these applications together into an Erlang node that can be started up as one unit. In many programming languages, packaging is a problem handled by the operating system. In Erlang, this is handled in OTP by creating a release, where a system consists of one or more possibly different releases. Each node runs a release, either on a single host or in a distributed environment. Standard releases allow your system to follow a generic structure that not only is target independent, but can be managed and upgraded with tools independent of the underlying operating system. So, while Erlang’s release process might appear complicated, it is as easy to create a release (if not easier) as it would be to create a non-Erlang package. If we think of the packaging hierarchy in Erlang, we start with a function, followed by a module bundled in an application. An Erlang node consists of a set of loosely coupled applications, grouped together in a release.

You might not have realized it, but when you installed Erlang on your computer, you installed the standard release. What differs between a standard release and the ones you create yourself are the applications that are loaded and started together, along with their configuration parameters. The underlying Erlang runtime ...

Get Designing for Scalability with Erlang/OTP now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.