Expand description
Local, in-memory activation and stable routing for entities.
An entity is addressed by a stable EntityId, while its actor incarnation
may be activated, drained, passivated, and later replaced. This crate owns
that lifecycle. Actor execution, business behavior, persistence, discovery,
and distributed consensus remain separate concerns.
The runtime implements this state machine:
Inactive
-> Activating(generation)
-> Active(generation, actor reference)
-> Draining(generation)
-> Retiring(generation)
-> InactiveGeneration checks prevent late activation or termination events from an old incarnation from changing the binding for a newer incarnation.
Structs§
- Activated
- Exact-incarnation capabilities returned by transactional activation.
- Activating
Slot - Opaque state of one directory-owned activation and its bounded waiters.
- Activation
Id - Globally unique identity of one activation attempt and incarnation.
- Active
Slot - Opaque state of one committed and admitting incarnation.
- Decision
- The value produced by one deterministic reduction.
- Directory
Config - Fixed sizing and admission limits for a local directory.
- Directory
Output - One installed lifecycle decision awaiting effect interpretation.
- Dispatch
Id - Identity of one dispatch operation within a slot.
- Dispatch
Output - The installed decision for one dispatched command, with its guaranteed correlation identity.
- Drain
Failure - Classification attached to forced retirement.
- Drain
Fence Acknowledged - Confirmation that an entity drain fence reached its behavior transition.
- Draining
Slot - Opaque state of one incarnation whose admission is closed.
- Entity
Behavior - Entity-runtime protocol composition around an application behavior.
- Entity
Id - A stable, typed identifier for an entity.
- Entity
Runtime - Local stable-routing facade used by applications.
- Lifecycle
Output - Output of one executable lifecycle-machine step.
- Local
Directory - Sharded local storage for authoritative per-entity lifecycle machines.
- Slot
Effect Batch - Ordered monoidal collection of slot effects.
- Slot
Reducer - Pure reducer for one stable entity slot.
Enums§
- Directory
Error - Failure before a command can be submitted to a lifecycle machine.
- Dispatch
Failure - Failure from
EntityRuntime::dispatchwith command ownership preserved. - Drain
Stage - Stage at which a bounded drain failed.
- Entity
Event - Complete event protocol for an entity-wrapped behavior.
- Entity
Protocol - Commands accepted by an entity-wrapped behavior.
- Entity
Slot - Pure state of one stable entity routing slot.
- Fence
Failure - Stage at which an ordered fence operation failed.
- Lifecycle
Edge - Authoritative identity of one phase-changing lifecycle edge.
- Lifecycle
Phase - Stable lifecycle phase identity.
- Lifecycle
Topology Error - Lifecycle-specific structural validation failure.
- Lifecycle
Trigger - Stable identity of an input relevant to lifecycle topology.
- Passivation
- Outcome of one
EntityRuntime::passivatecall. - Refusal
- Typed reason why a command was not admitted.
- Retirement
Mode - Retirement mode granted to the slot interpreter.
- Slot
Effect - Request emitted by the pure entity-slot state machine.
- Slot
Event - External fact submitted to one entity slot.
- Transition
Evidence - Evidence produced by one lifecycle execution.
Constants§
- LIFECYCLE_
TOPOLOGY - Authoritative lifecycle topology.
Traits§
- Effect
Interpreter - Runtime capabilities used to interpret lifecycle effects.
- Local
Entity Runtime - Runtime port implemented once by an actor runtime integration.
- Reducer
- A deterministic transition algebra.
Functions§
- lifecycle_
machine - Construct an inactive entity lifecycle machine.
- validate_
lifecycle_ topology - Validate graph properties and required entity lifecycle invariants.
Type Aliases§
- Lifecycle
Machine - Representable executable lifecycle machine for one stable entity slot.
- Slot
Decision - Result of one deterministic entity-slot reduction.