macula_gateway_workers_sup (macula v0.20.5)
View SourceGateway Workers Supervisor - supervises gateway worker processes.
Supervision Strategy: - rest_for_one: If child N crashes, restart N and all children after N - Rationale: Only clients is foundational; pubsub/rpc/mesh depend on it but are independent of each other. This strategy provides fault isolation while maintaining consistency when clients restarts.
Children (in dependency order): - macula_gateway_clients: Client tracking (foundational) - macula_gateway_pubsub: Pub/Sub message routing (depends on clients) - macula_gateway_rpc: RPC handler registration and routing (depends on clients) - macula_gateway_mesh: Mesh connection pooling and management (independent)
Fault Isolation Examples: - mesh crash → only mesh restarts (0 clients disconnected) - rpc crash → rpc + mesh restart (0 clients disconnected) - pubsub crash → pubsub + rpc + mesh restart (0 clients disconnected) - clients crash → all restart (unavoidable - foundational)
Extracted from macula_gateway.erl (Phase 6, 9) Renamed from macula_gateway_sup (Phase 2 QUIC refactoring)
Summary
Functions
Get the clients worker child PID.
Get the mesh connection manager child PID.
Get the pubsub handler child PID.
Get the RPC handler child PID.
Start the gateway supervisor with configuration.
Functions
Get the clients worker child PID.
Get the mesh connection manager child PID.
Get the pubsub handler child PID.
Get the RPC handler child PID.
Start the gateway supervisor with configuration.