Elixir is both a functional and a concurrent language. While the functional aspect allows you to organize your code, the concurrent aspect allows you to organize your runtime and improve the availability of your system. In this part of the book, you’ll learn how concurrency works and how it can help you build reliable systems. We begin with an introduction to concurrency in BEAM in chapter 5. Building on this, in chapter 6, you’ll learn about OTP and generic server processes, which can simplify the implementation of typical concurrent idioms. In chapter 7, you’ll see an example of a more involved concurrent system. Then, in chapter 8, we present the basic error-detection mechanism, with a special focus on detecting errors in concurrent systems via supervisors. Going deeper, in chapter 9 you’ll learn how to build supervision trees to minimize negative effects of errors. Finally, chapter 10 presents some alternatives to generic server processes and discusses the tradeoffs between different approaches.