Slither is a thin BEAM/Python coordination layer built on SnakeBridge and Snakepit.
Core Primitives
Store: ETS-backed shared state with lock-free reads and serialized writes.Dispatch: bounded batched fan-out with backpressure.Pipe: stage composition over BEAM and Python work.
Runtime Model
- Python runs in worker processes managed by Snakepit.
- BEAM owns shared state and orchestration.
- Python workers call BEAM-exposed views through SnakeBridge callbacks.
Supervision
The Slither application supervisor starts:
Task.Supervisorfor loadersSlither.Bridge.ViewRegistrySlither.Store.SupervisorSlither.Pipe.Supervisor
See lib/slither/application.ex.
Dataflow
- Input payloads are wrapped as
Slither.Item. Pipe.Runnercreates context/session and executes stages.- Python stages route through
Slither.Dispatchand executors. - Router stages split outputs into named buckets.
Isolation Model
- Shared mutable state in Python is worker-local by process.
- Cross-worker merges happen on BEAM side in a deterministic single-process path.
- Backpressure is enforced with bounded
max_in_flightconcurrency.
Where to Go Next
- Store details:
guides/store.md - Dispatch details:
guides/dispatch.md - Pipe DSL:
guides/pipe.md