188
actor model
Each actor has a mailbox and private state. Others send messages. They do not touch its memory.
What is actor model?
An actor processes one message at a time from a mailbox. State stays inside. Concurrency is mail, not shared locks. Supervision restarts a failed actor. It is a tool for isolated stateful processes, not a default for CRUD.
Why does actor model matter when vibe coding?
Models share a mutable object across tasks and add locks at random. Or they introduce actors for a single request handler. Name actors only when the mailbox is the point.
How do you do actor model?
One actor owns that state. Messages are immutable. Do not reach into another actor’s data. Define what happens when its mailbox grows.
How do you ask a model for actor model?
Model (entity) as an actor with a mailbox. Other code sends messages; it does not mutate the actor’s state. Process one message at a time. Define backpressure when the mailbox is full. Do not share its objects.
What goes wrong with actor model?
An actor that calls another actor and waits, while that one calls back. You rebuilt a deadlock with mailboxes.