O'Reilly logo

Adopting Elixir by Jose Valim, Bruce Tate, Ben Marx

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Generic Server

One of the most important abstractions for both the Elixir and Erlang ecosystems is called OTP, and the heart of OTP is the generic server. It’s an abstraction that you’ll use to wrap up critical features as application services, represent state using processes, and use built-in supervision to make those features reliable. As you saw in Elixir vs. Mutable Objects, Elixir leans heavily on processes to make the notions of state, behavior, and time explicit. In this section, we’ll focus on OTP, a critical abstraction providing common services many processes need, such as supervision.

In the following sections, we want to shine a light on GenServer and discuss cases of use and misuse, relaying some stories from the field and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required