Actors#
Hyperactor programs are structured around actors: isolated state machines that process messages asynchronously.
Each actor runs in isolation, and maintains private internal state. Actors interact with the outside world through typed message ports and follow strict lifecycle semantics managed by the runtime.
This chapter introduces the actor system in hyperactor. We’ll cover:
The
Actortrait and its lifecycle hooksThe
Handlertrait for defining message-handling behaviorThe
RemotableActortrait for enabling remote spawningThe
Checkpointabletrait for supporting actor persistence and recoveryThe
Referablemarker trait for remotely referencable typesThe
Bindstrait for wiring exported ports to reference typesThe
RemoteHandlestrait for associating message types with a referenceThe
ActorHandletype for referencing and communicating with running actorsActor Lifecycle, including
SignalandActorStatus
Actors are instantiated with parameters and bound to mailboxes, enabling reliable message-passing. The runtime builds upon this foundation to support supervision, checkpointing, and remote interaction via typed references.