💻The Actor Model
Stop reasoning about locks and start reasoning about mailboxes — across 14 drops you'll build a tiny actor runtime, wire up supervision, and finish by modeling a real workflow as an actor graph.
Phase 1Why Actors: Shared State Is the Bug
See shared state as the real concurrency bug.
Shared memory is the concurrency bug, not the solution
6 minShared memory is the concurrency bug, not the solution
An actor is exactly three things — state, mailbox, behavior
6 minAn actor is exactly three things — state, mailbox, behavior
A message is a fact; a method call is a request
7 minA message is a fact; a method call is a request
Actors are addressed, not called — and that changes everything
7 minActors are addressed, not called — and that changes everything
Phase 2Build a Tiny Actor System
Build a tiny actor, mailbox, and message loop.
An actor is a loop that reads a queue and updates state
8 minAn actor is a loop that reads a queue and updates state
The mailbox is the contract — everything else is implementation
7 minThe mailbox is the contract — everything else is implementation
Reply-to turns fire-and-forget into request-response
8 minReply-to turns fire-and-forget into request-response
One actor per concept — scale the graph, not the actor
7 minOne actor per concept — scale the graph, not the actor
Actors spawn actors — and links make crashes propagate
8 minActors spawn actors — and links make crashes propagate
Phase 3Isolation, Supervision, and Failure
Wire in isolation, supervision, and failure strategies.
Your payment worker just got a 500 from Stripe — what does the message handler do?
8 minCrash the actor and let the supervisor handle restart — defensive recovery belongs to the supervisor, not the handler
One of 100 upload workers just crashed on a corrupt file — which supervision strategy do you pick?
7 minMatch the supervision strategy to actor independence — one-for-one for independent workers, one-for-all for coupled actors, rest-for-one for linear pipelines
Two services share a user-profile cache behind a distributed lock — where do actors change the design?
8 minIsolate state behind an owning actor — the actor becomes the single writer, everyone else sends messages to the owner
Your ingestion pipeline has a 1M-deep mailbox — which fix actually solves this, and which fix makes it worse?
8 minApply bounded mailboxes with blocking or explicit drop — backpressure is a system property, not a per-actor setting
Phase 4Model a Real Workflow as an Actor Graph
Model a real workflow as an actor graph.
Model an order-fulfillment workflow as a running actor graph
20 minModel an order-fulfillment workflow as a running actor graph
Frequently asked questions
- What is the actor model in programming?
- This is covered in the “The Actor Model” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- How are actors different from threads and locks?
- This is covered in the “The Actor Model” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- Do I need Erlang or Akka to use actors?
- This is covered in the “The Actor Model” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- What is supervision in the actor model?
- This is covered in the “The Actor Model” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- When should I use actors instead of async/await?
- This is covered in the “The Actor Model” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
Related paths
🐍Python Decorators Introduction
Build one mental model for Python decorators that covers closures, argument passing, functools.wraps, and stacking — then ship a working caching or logging decorator from scratch in under 30 lines.
🦀Rust Lifetimes Explained
Stop reading `'a` as line noise and start reading it as scope arithmetic — one failing snippet at a time — until you can thread lifetimes through a small parser or iterator adapter without fighting the borrow checker.
☸️Kubernetes Core Concepts
Stop drowning in 30+ resource types. Build the mental model one primitive at a time -- pods, deployments, services, ingress, config -- then deploy a real app with rolling updates and health checks.
📈Big O Intuition
Stop treating Big O as math you memorized for an interview — build the intuition to spot O(n²) disasters, pick the right data structure without thinking, and rewrite a slow function from O(n²) to O(n) in under five minutes.