| Crates.io | orbitcast |
| lib.rs | orbitcast |
| version | 0.1.10 |
| created_at | 2025-12-22 23:00:03.65419+00 |
| updated_at | 2026-01-05 00:15:34.072732+00 |
| description | Real-time WebSocket server with ActionCable protocol for Mothership |
| homepage | https://github.com/seuros/orbitcast |
| repository | https://github.com/seuros/orbitcast |
| max_upload_size | |
| id | 2000436 |
| size | 273,349 |
ActionCable WebSocket server for Mothership. Runs as a bay using the docking protocol.
OrbitCast handles ActionCable WebSocket connections, multiplexed through Mothership's docking protocol. Multiple client connections share a single Unix socket.
Clients (WS) → Mothership → Unix Socket → OrbitCast
↓
RPC
(anycable-rails)
↓
Pub/Sub
(PostgreSQL or Memory)
# Production (multi-node coordination via PostgreSQL)
cargo install orbitcast
# Or explicitly:
# cargo install orbitcast --features postgres
# Development (single-node, in-memory)
cargo install orbitcast --no-default-features --features memory
Exactly one backend is required. Use
--no-default-featuresto disable the default PostgreSQL backend when usingmemory.
Add to your ship-manifest.toml:
[[bays.websocket]]
name = "orbitcast"
command = "orbitcast"
routes = [{ bind = "ws", pattern = "/cable" }]
config = { database_url = "postgres://localhost/myapp" }
| Key | Description |
|---|---|
database_url |
PostgreSQL connection (required for postgres feature) |
ping_interval |
Seconds between pings (default: 3) |
rpc_host |
AnyCable RPC host (default: 127.0.0.1:50051) |
rpc_request_timeout_ms |
RPC request timeout in ms (optional) |
rpc_headers |
Comma-separated header allowlist (default: cookie, * for all) |
Set automatically by Mothership:
| Variable | Description |
|---|---|
MS_PID |
Mothership process ID |
MS_SHIP |
Bay name |
MS_SOCKET_DIR |
Unix socket directory |
--features postgres)Uses LISTEN/NOTIFY for cross-node broadcasting. Required for multi-instance deployments.
sslmodeOrbitCast honors the sslmode query param in database_url:
disable: non-TLS onlyallow: try non-TLS, then TLSprefer (default): try TLS, then non-TLSrequire: TLS onlyverify-ca, verify-full: TLS only (certificate verification uses system roots)--features memory)Uses tokio::sync::broadcast. Single process only. Good for development.
Limitations:
OrbitCast requires PostgreSQL for multi-node pub/sub. If you need Redis or NATS backends, use AnyCable-Go directly as your WebSocket server instead of OrbitCast.
orbitcast --help
orbitcast --log-level debug
OrbitCast speaks the AnyCable RPC protocol. Run the anycable-rails RPC server and
point OrbitCast to it via rpc_host.
Protocol compatibility: AnyCable RPC protocol 1.6.2+.
Example ship config:
[[bays.websocket]]
name = "orbitcast"
command = "orbitcast"
routes = [{ bind = "ws", pattern = "/cable" }]
config = { rpc_host = "127.0.0.1:50051", database_url = "postgres://localhost/myapp" }
MIT