An Order Is Not an Actor
By Leo GorodinskiPublished Nov 16, 2026Updated Nov 19, 2026
Nor is it a state machine. Yet we're rediscovering the actor model again.
Durable Objects, durable execution, durable agents, state machines, and event sourcing are useful abstractions and real advances in execution, persistence, and recovery. But we've seen much of this before, and I worry we're repeating the mistake we made with OOP: confusing a programming abstraction with a model of the world, and building inheritance hierarchies before learning to favor composition.
Rediscovering the Actor Model
Make every order an actor, and you've drawn your boundaries before establishing your invariants.
Now consider a requirement: the order total must agree with reserved inventory and authorized payment. How do you enforce that across independently executing actors? What must hold atomically, what can be eventually consistent, and what happens when one operation fails, or when the process crashes after payment is authorized but before anyone records it?
Those questions concern the system's semantics. The execution machinery can help answer them, but it can't pose them.
An order is a domain entity with identity, state, behavior, and relationships. State machines can describe its behavior. Actors can host its execution. Event logs can persist its history. Durable workflows can coordinate its interactions. These abstractions should compose, and none of them should dictate how we model the domain.
Teams often choose actors deliberately, for locality, failure isolation, and serialized access. Those are real needs. They are capabilities a system requires, though, and they give us no reason to make the actor the ontology of the application.
I think the next breakthrough in how we build distributed systems requires first-class system composition, requirements derived from semantics, and correctness established for the system as a whole.
1. First-Class System Composition
We need to model systems as wholes, beyond collections of independently executing components. At Cohesive, we're exploring three planes:
- Semantic: entities, relationships, transitions, invariants, and the events their behavior produces.
- System graph: composition of behaviors, interpretation of events, APIs, interaction protocols, and coordination across components.
- Infrastructure: actors, databases, logs, queues, workflow engines, and other execution mechanisms.

An order emitting OrderPlaced is domain semantics. Whether inventory responds
by reserving stock and payment by authorizing a charge is system composition.
Whether that runs on actors, a queue, or a workflow engine is infrastructure.
The system graph does more than wire components together. It defines how independently specified behaviors interact, how events are interpreted, how activities are coordinated, and how system-wide guarantees are established.
2. Requirements, Not Runtimes
Stop deriving system semantics from execution mechanisms. Derive execution requirements from system semantics.
The domain model shouldn't mention actors. It must, however, be explicit about its guarantees: an order cannot undergo conflicting transitions, payment must not be authorized twice, and failures must not leave the system in an invalid state.
Those semantic requirements impose constraints on execution, such as serialization, isolation, durable recovery, and idempotent effect handling. Infrastructure provides the mechanisms to satisfy those constraints. The requirements and their realization stay separate, and we have to establish the correspondence between them.
Take one order model whose transitions must be serialized and whose payment authorization must be protected against duplication. Here are two ways to run it:
- Actor realization: Host an order on a virtual actor. Serialize its transitions, persist effect intents, and use stable idempotency keys for payment authorization.
- Database realization: Serialize transitions using database transactions or optimistic concurrency. Dispatch persisted effect intents through a queue, with the same payment idempotency guarantees.
Requirements and the capabilities that refine them
Serialization capability Actor maps to requirement Serialized processing as native support. Serialization capability Lock + fencing tokens maps to requirement Serialized processing as native support. Serialization capability DB transaction maps to requirement Serialized processing as native support. Serialization capability Lock + fencing tokens maps to requirement At-most-once effect as composed support. Effect handling capability Idempotency key maps to requirement At-most-once effect as native support. Durability capability Event log maps to requirement Durable history as native support. Durability capability Workflow engine maps to requirement Durable history as native support. Serialization capability DB transaction maps to requirement Cross-entity invariant as native support. Durability capability Workflow engine maps to requirement Cross-entity invariant as composed support: saga.
The domain semantics and required properties stay the same while the execution mechanisms differ. Both realizations are correct only insofar as they refine the specification, including under partitions, crashes, and retries, and durability alone doesn't make either one correct. Guarantees involving external systems also depend on the capabilities those systems provide: an idempotency key protects you only if the payment provider honors it.
The system graph provides a representation that tools can analyze, optimize, and compile into different infrastructure realizations while preserving the declared guarantees.
3. System-Wide Correctness, Not Just Durability
A system can durably persist invalid state, reliably replay incorrect decisions, or successfully execute a broken distributed protocol.
Return to the order. Suppose inventory is reserved and payment authorization succeeds, but the process crashes before recording the authorization result. On recovery, the operation is retried.
Payment authorized, result lost
Reserve inventory, then proceed, Authorize payment, then crash window, Record authorization, then recovery retry, Retry on recovery
Did we authorize payment twice? Is the inventory still reserved? Can the order be confirmed? What if the reservation expires while the payment outcome is unknown? A durable runtime can recover execution, but it cannot answer these questions by itself.
We need to specify safety and liveness properties of the composed system:
- Safety: Payment must not be authorized twice for the same obligation. Inventory must not be oversold. An order must not be confirmed unless its required obligations are satisfied. Cross-entity invariants must hold at explicitly defined consistency boundaries, including during failures and retries.
- Liveness: Every accepted order must eventually reach an appropriate outcome, assuming the necessary services recover and progress is possible.
Formal methods such as TLA+ can express and verify such properties against a model. But mainstream programming models rarely give us a coherent model of the entire system to reason about. Teams usually reconstruct formal specifications separately from the implementation, which creates another artifact that can drift.

If we model the system as a whole, we can state properties about it as a whole, and we can separate two essential activities.
Validation asks whether we have specified the behavior we intend. Should an order remain pending when payment succeeds but inventory reservation fails? Who decides, and according to what policy?
Verification asks whether the composed system satisfies those properties across the modeled interleavings, failures, and retries.
The same system model can support both, alongside simulation, compilation, and runtime monitoring.
Why Now?
We've tried model-driven development before. Executable UML and model-driven architecture promised authoritative models two decades ago, and specification languages like TLA+ and Alloy have long let careful teams check designs. Too often, the models lacked sufficiently expressive semantics for the behavior that mattered, generated code became a separate artifact that had to be maintained and kept in sync, and formal specifications lived beside the implementation rather than producing it.
Agents are changing the economics. Constructing precise models, generating implementations, and producing verification artifacts are becoming much cheaper. Establishing that implementations faithfully refine those models remains difficult, but it is increasingly worth pursuing.
The opportunity is to make the system model executable and authoritative, with compilation and verification tied to the same artifact: a programming model in which the system itself is the primary artifact, something we can define, compose, validate, verify, and compile.
We've become very good at making computation survive failures. We're still remarkably bad at specifying what must remain true when it does.
Model the domain. Compose the semantics. Compile to the machinery.
An earlier version of this essay was posted on X on November 16, 2026.