Process Host
Process Host
Section titled “Process Host”Process hosts manage Lua process execution using a work-stealing scheduler.
Entry Kind
Section titled “Entry Kind”| Kind | Description |
|---|---|
process.host | Process execution host with scheduler |
Configuration
Section titled “Configuration”- name: main_host kind: process.host host: workers: 8 queue_size: 1024 local_queue_size: 256 lifecycle: auto_start: true| Field | Type | Default | Description |
|---|---|---|---|
workers | int | NumCPU | Worker goroutines |
queue_size | int | 1024 | Global queue capacity |
local_queue_size | int | 256 | Per-worker local deque size |
Scheduler
Section titled “Scheduler”The scheduler uses work-stealing: each worker has a local deque, and idle workers steal from the global queue or other workers. This balances load automatically.
- Workers execute processes concurrently
- Global queue holds pending processes when all workers are busy
- Local queues reduce contention by keeping work close to workers
Process Types
Section titled “Process Types”Process hosts execute entries of these kinds:
| Kind | Description |
|---|---|
process.lua | Source-based Lua process |
process.lua.bc | Precompiled Lua bytecode |
process.wasm | WebAssembly process (experimental) |
Processes run independently with their own context, communicate via messages, and are supervised for fault tolerance.
See Also
Section titled “See Also”- Process Module - Spawn and manage processes from Lua
- WASM Processes - Configuring
process.wasmentries - Process Model - Lifecycle and supervision concepts
- Supervision - Building supervision trees