When you first create a process in Elixir you usually think of it as a tiny, isolated unit that can receive a few messages and then terminate. Real‑world systems, however, often need long‑running processes that keep some internal data, react to many different kinds of requests, and possibly communicate with other processes. Those are generic server processes – the backbone of most concurrent applications built on the BEAM.
This article walks you through the evolution from a bare‑bones process that you build yourself to the full‑featured GenServer behaviour that ships with Elixir. Along the way we will: