IoT & Edge Compute

Connect any device, sensor, or data source to Tetrapus. The Nerve SDK provides a high-frequency QUIC telemetry client with non-blocking sends (~50 ns), automatic batching, compression, disk-backed buffering for offline operation, and bidirectional command channels — all from a single Rust crate.

graph LR D1["IoT Device<br/><small>NerveClient</small>"] --> QUIC["QUIC + TLS 1.3<br/><small>Batched, compressed</small>"] D2["Edge Gateway<br/><small>NerveClient</small>"] --> QUIC D3["HFT Process<br/><small>Shared Memory</small>"] --> SC["nerve-sidecar<br/><small>100 kHz polling</small>"] SC --> QUIC QUIC --> SRV["Tetrapus Server"] SRV --> PANES["Live Panes"] SRV --> CH["ClickHouse"] SRV -->|bidi stream| CMD["Commands<br/><small>Back to devices</small>"]

Architecture

The SDK handles the full send path from your application thread to the server:

graph TB APP["Your Code<br/><small>send_raw() ~50 ns</small>"] --> CH_Q["Crossbeam Channel<br/><small>Lock-free bounded queue</small>"] CH_Q -->|full| SPILL["SpillBuffer<br/><small>File-backed ring</small>"] CH_Q --> WORKER["SendWorker<br/><small>Background tokio task</small>"] SPILL -->|reconnect| WORKER WORKER --> PRI["Priority Router<br/><small>Critical / Normal / Low</small>"] PRI --> BATCH["MessageBatcher<br/><small>MTU-sized batches</small>"] BATCH --> COMP["Compression<br/><small>None / LZ4 / Zstd</small>"] COMP --> STREAMS["4 QUIC Streams<br/><small>+ 1 heartbeat</small>"] STREAMS --> NET["Network<br/><small>TLS 1.3, 0-RTT</small>"] BW["BandwidthEstimator<br/><small>RTT sampling</small>"] -.->|adapts| BATCH CB["CircuitBreaker<br/><small>5 failures → Open</small>"] -.->|gates| WORKER

Key Numbers

MetricValue
Send latency~50 ns (non-blocking)
Max throughput5,000+ Hz per client
QUIC streams4 data + 1 heartbeat
Default spill buffer64 MiB (configurable)
Wire overhead per message8 bytes + 1 byte compression prefix
Sidecar polling rate100 kHz (shared memory)

Feature Flags

FlagDependencyEffect
compress-lz4lz4_flexEnable LZ4 frame compression (~2:1 ratio, < 1 µs/batch)
compress-zstdzstdEnable Zstd compression (~3:1 ratio, configurable level 1-19)
fullbothAll optional features

Questions?

Reach out for help with integration, deployment, or custom domain codecs.