Why architecture matters here
Actor systems fail on unbounded mailboxes, tangled supervision, and forgetting location transparency isn't free. The architecture matters because these decisions cascade — one bad supervisor can lose messages during restart.
With the pieces mapped, actors become a reliable concurrency model.
The architecture: every piece explained
The top strip is the primitives. Actor encapsulates state + behavior. Mailbox holds incoming messages. Dispatcher schedules message handlers on threads. Message passing is the only communication path.
The middle row is the guarantees. Supervision defines restart strategies per parent-child. Backpressure bounds mailbox size and rejects/drops when full. Location transparency lets actors move across nodes. Ordering guarantees per-sender FIFO.
The lower rows are ops. Persistence uses event sourcing to survive restart. Metrics track mailbox depth + latency. Ops covers cluster sharding, partition, failover.
End-to-end flow
End-to-end: an actor handles orders. Message arrives; dispatcher assigns thread; handler runs; state updates; response sent. Supervisor watches; on exception, restart. Backpressure protects: mailbox capped, sender pauses. Actor persists state via event sourcing; on restart, replays. Cluster shards actors by orderId; failover moves shards on node loss.