Patinas by RustySockets Documentation Product Search public

patinas-hub — Architecture & Capabilities

patinas-hub is the hub/cloud/DC role. It terminates the transport from proxies, subscribes to one or more streams, and exposes the stream to downstream consumers (SDK clients, bridges, future fanout).

When built with the rtsp-io feature, it can also receive RTSP (act as an RTSP client pulling from a camera) and serve RTSP (act as an RTSP server for VMS/clients).

Process-level composition (what’s “inside”)

At runtime the patinas-hub process typically includes:

Data path (hub)

1) Transport termination and subscription

1b) RTSP receive + RTSP serve (optional, inside hub process)

When built with --features rtsp-io and run with --rtsp-io, the hub may:

Current wiring is intentionally simple:

2) Optional engine stage (jitter)

When built with feature = "engine" and enabled in config/flags:

Note: this is intended for smoothing; avoid enabling jitter on multiple hops.

3) Metrics and timestamps

Per frame, the hub exports:

E2E latency here is currently computed as:

That assumes proxy PTS is comparable to hub wallclock (reasonable only if clocks are close, or if PTS is “send time”).

Multi-stream support

The hub role supports multi-stream configuration in node config (node.toml) via:

The standalone hub config loader currently builds a single stream runtime from hub.addr / hub.stream_id.

Control plane & operability

Health + metrics

Configuration sources

Common config keys used by hub:

Hub-side observability (optional)

There are two layers:

This is a good direction for production readiness because:

Hub-focused critique (what to tighten)

Config surface vs actual behavior

In the hub role’s from_config_file(...), some “resilience” knobs are currently set to fixed defaults in code (with comments that hub-side resilience is future work). That can surprise operators because hub.toml advertises [resilience] keys.

Recommendation:

E2E latency semantics

now_ms - pts_ms is only meaningful if PTS is “ingest wallclock” and clocks are aligned. On real devices, clock skew and drift are normal.

Recommendation:

Capabilities checklist (current)