Procs#
A Proc is a container for actors and provides the runtime context for actor execution, message routing, and lifecycle management. In hyperactor’s architecture, procs serve as the fundamental unit of deployment and isolation.
Overview#
Procs bridge the gap between actors (local computation) and the distributed system (remote communication). Each proc:
Hosts actors: Spawns and manages actor instances within its process
Routes messages: Provides a forwarder that determines how outbound messages reach their destinations
Identifies actors: All actors within a proc share the proc’s identity as part of their
ActorIdManages lifecycle: Coordinates actor startup, supervision, and shutdown
Key Components#
Proc#
The Proc struct represents a single runtime instance. It’s created with:
A
ProcIdthat uniquely identifies it (see ProcId)A forwarder (
BoxedMailboxSender) for routing outbound messages
See Proc for details on construction and usage.
Host#
The Host manages multiple spawned procs and provides the infrastructure for:
Accepting external connections (frontend)
Coordinating message routing between procs (backend)
Managing a service proc for system-level coordination
Managing a local proc for user-level actors
See Host for the complete hosting architecture.
ProcOrDial Router#
A specialized router that enables bidirectional communication by distinguishing between:
Messages destined for the service proc (delivered locally)
Messages destined for the local proc (delivered locally)
Messages destined for spawned procs (dialed remotely)
See ProcOrDial Router for routing implementation details.