GenServer as a Coordinator

Learn how GenServer acts as a coordinator to help the concurrent systems.

In the previous lesson, we peeked at all of the concerns a GenServer handles for us when we attempted to implement a mutable counter. At the same time, we have also shown how we can implement a very simple counter with agents in four lines of code. Behind the scenes, agents are implemented with GenServers. Therefore, if we want to use a GenServer, we need more than just a mutable state. One such example is when we need a process to coordinate the activities of multiple other processes.

Allocation in concurrent systems

In a concurrent system, coordinating the allocation and ...