Processes
- spawn in Elixir. spawn starts an isolated process: cheap, share-nothing, millions per node.
- self and pids. self() names the current process: pids are addresses messages travel to.
- Isolation. Process isolation is the safety model: a crash cannot corrupt a neighbour’s state.
Messages
- send and receive. send posts a message; receive pattern-matches the mailbox: asynchronous by default.
- Message design. Messages are tagged tuples: {:reserve, from, seat}: protocols between processes, documented.
- Timeouts. receive takes an after clause: silence handled as a decision, not an eternity.
Links and Monitors
- Links. A link ties fates: one process’s abnormal exit kills the other, enabling clean sweeps.
- Monitors. A monitor watches one-way: a :DOWN message reporting death as data.
- Choosing. Link when lifetimes are shared; monitor when you only need to know: contracts, not habits.
Before and after this level
- Before: Level 4: Data Modelling: Structs, Protocols, Behaviours.
- Next: Level 6: Tasks & Agents: Tasks, Agents, Managing Concurrent Work.
In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.
Frequently asked questions
What does Elixir Level 5: Processes cover?
Processes, Messages, Links and Monitors: 3 lessons and 9 ideas.
What should I know before this level?
The level before it, Level 4: Data Modelling, which covers Structs, Protocols, Behaviours.