liveBook · Manning

Service

As explained in Elixir in Action, Third Edition

A service is a part of a system that runs in a separate operating-system process.

A service is a part of a system running in a separate operating-system process. Splitting systems this way can limit crash impact, distribute work across machines, and support horizontal scaling. section 1.1.5

Services resemble microservices but differ in granularity:

  • Microservices typically place multiple activities inside each service instance; Erlang concurrency can use much finer-grained processes, such as one process per player or game session. section 1.1.5
  • A server process is sequential internally but exposes a concurrent communication interface externally, often managing one task and its state. section 7.4
  • Calls provide responses and can apply back pressure; casts avoid blocking but provide no guarantee that a request arrived or succeeded. section 7.4

Services in a to-do system

Separate processes can manage individual to-do lists, map names to list servers, and handle database requests through a worker pool. Keeping one list with one process avoids race conditions and preserves consistency. section 7.4

How Elixir in Action, Third Edition covers it

How deep it goes
Defines services mechanically, compares them with microservices, and explains process boundaries, communication modes, and trade-offs.
Examples
Uses an online multiplayer game and a to-do system with list servers, a cache, a database process, and worker pools.
What you can do after
Evaluate service boundaries and choose calls or casts according to response guarantees, responsiveness, consistency, and back pressure.
How it connects
Connects services to microservices, Erlang concurrency, server processes, calls, casts, fault tolerance, scalability, and back pressure.

Also explained in

Compare how 7 books explain service →

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.