Deep Dive: The BEAM for Developers: Thinking in Processes


title: "Thinking in Processes" layout: course.njk course: "Deep Dive: The BEAM for Developers"

Module 1: Thinking in Processes

Suggested Reading:


Goal

Outcome


Content

Overview


Session 1: BEAM Processes – The Mental Model

1.1 What is a BEAM Process?

1.2 Process Life Cycle and States

1.3 Why Not Objects, Modules, or Threads?

1.4 “Gnomes” Metaphor

Activity:


Session 2: Designing with Processes

2.1 Domains and Responsibilities

2.2 Process Archetypes

2.3 GenServer vs. Simple Process

Activity:


Session 3: Message Passing & Selective Receive

3.1 Message Passing Semantics

3.2 Selective Receive

3.3 Patterns for Safe Message Handling

Activity:


Session 4: System Decomposition – Flows & Boundaries

4.1 Breaking Down a Real System

4.2 System Boundaries & Process Ownership

4.3 Pushback and Backpressure

Activity:


Session 5: Real-World Patterns and Anti-Patterns

5.1 Good Patterns

5.2 Common Anti-Patterns

Activity:


Worksheets

Worksheet 1: Process Decomposition

Worksheet 2: Process Life Cycle

Worksheet 3: Message Flow Analysis

Worksheet 4: Bottleneck and Anti-Pattern Review


Checklist


Conclusion

Thinking in processes is the foundation of scalable, resilient BEAM systems. Practice decomposing your next feature into flows, tasks, and processes. Don’t try to shoehorn OO or class-based patterns into Erlang/Elixir—embrace process orientation for clarity, reliability, and fun.


What’s Next?

Next module: Memory, Data Types, and Garbage Collection—how BEAM handles data and memory at process level, and what you need to know to avoid common pitfalls.


Printable Worksheets (cut and paste for handouts or docs)

Process Decomposition Worksheet

Domain: ___________________ Process Type(s): ___________________ Responsibilities: ___________________ Dependencies: ___________________

Process Life Cycle Worksheet

Process Name: ___________________ [ ] Spawned [ ] Running [ ] Waiting (blocking) [ ] Handling message [ ] Terminated

Diagram or notes: ___________________

Message Flow Analysis Worksheet

Feature/Flow: ___________________ Sender: ___________________ Receiver: ___________________ Potential bottlenecks: ___________________ Where selective receive is used: ___________________

Anti-Pattern Review Worksheet

GenServer Name: ___________________ Responsibilities: ___________________ Signs of “God process”: ___________________ Refactor plan: ___________________