Skip to content

OTP behaviours

Category: Communication · Status: stub · Lessons: chapter 05, Message passing (planned)

One line: Erlang/OTP's reusable process patterns — a generic server, a supervisor, an application — where the library owns the concurrency and your module supplies the callbacks.

Also called: gen_server, GenServer, OTP.

How it connects

flowchart LR
  n_actor_model["Actor model"]
  n_otp_behaviours["OTP behaviours"]
  n_supervision["Supervision"]
  n_otp_behaviours -->|uses| n_actor_model
  n_otp_behaviours -->|uses| n_supervision
  classDef center stroke-width:3px
  class n_otp_behaviours center
  classDef outside stroke-dasharray: 4 3
  class n_actor_model,n_supervision outside

In each language

Erlang and Elixir gen_server in Erlang and GenServer in Elixir

Where to read more