liveBook · Manning

Open Telecom Platform

As explained in Elixir in Action, Third Edition

OTP is Erlang's collection of libraries, design principles, and runtime components for building concurrent and fault-tolerant applications.

OTP is the framework layer of the Erlang development platform, complementing the language, BEAM virtual machine, and development tools. It abstracts concurrency, distribution, error recovery, libraries, deployment, live updates, and other production concerns. section 1.1.4

Its abstractions turn stateful server processes into reusable components. GenServer reduces boilerplate around recursion, state management, and message passing while fitting larger systems that handle runtime errors, logging, events, and upgrades. section 6.0 section 1.1.4

OTP also defines how applications are packaged and started:

  • An OTP application describes its name, version, modules, dependencies, and optional application callback. section 11.1.1
  • Mix generates the application resource and can create a supervision-enabled project with mix new hello_world --sup. section 11.1.1
  • Starting iex -S mix launches the application alongside its runtime dependencies. section 11.1.1
iex(1)> Application.started_applications()
[
  {:iex, ~c"iex", ~c"1.15.0"},
  {:hello_world, ~c"hello_world", ~c"0.1.0"},    #1
  {:logger, ~c"logger", ~c"1.15.0"},
  {:mix, ~c"mix", ~c"1.15.0"},
  {:elixir, ~c"elixir", ~c"1.15.0"},
  {:compiler, ~c"ERTS  CXC 138 10", ~c"8.3"},
  {:stdlib, ~c"ERTS  CXC 138 10", ~c"5.0"},
  {:kernel, ~c"ERTS  CXC 138 10", ~c"9.0"}
]

Inspect the running applications reported by Application.started_applications/0, including the generated hello_world application and its runtime dependencies. section 11.1.1

How Elixir in Action, Third Edition covers it

How deep it goes
Explains OTP from platform architecture through GenServer and application generation, without detailing each framework component or runtime mechanism.
Examples
Uses GenServer, a Mix-generated hello_world application, supervision startup, and Application.started_applications/0.
What it assumes
Assumes basic Erlang or Elixir concurrency, processes, message passing, and stateful server processes.
What you can do after
Operate/configure applications with Mix and implement stateful concurrent servers through OTP abstractions.
How it connects
Connects Erlang, BEAM, Elixir, GenServer, Mix, applications, supervision, message passing, and fault tolerance.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elixir in Action, Third Edition. The section links point to the parts of the book it draws on.