Simulator / Go CLI / Rust CLI
|
| QUIC + QTT
v
crabmqd broker -----> /metrics
|
| PostgreSQL
v
db
crabmqd api <----- QTT bridge subscription
|
+---- HTTP REST
+---- WebSocket telemetry stream
|
v
React dashboard
Public protocol package containing packet models, topic helpers, and the Go client.
Internal adapter layer for packet encoding and decoding. It currently wraps the public QTT packet types so the broker and external tools share the same wire schema without duplicating logic.
Owns QUIC listener startup, TLS configuration, stream acceptance, and connection adaptation into packet-aware interfaces.
server: session lifecycle, packet dispatch, QoS handling, metrics, rate limitingsession: connected/offline session statesubscription: topic filter registryrouter: publish fan-out and offline queue fallback
jwt: token issuance and verificationacl: topic-level authorization rules
memory: simple in-memory queue for tests or future ephemeral modepersistent: PostgreSQL-backed offline queue for QoS 1 delivery
The API process is a separate runtime that bridges into the broker using the public Go QTT client. That keeps the architecture scalable and preserves a clean network boundary.
Reads devices, telemetry history, and metrics through the API while consuming live telemetry over WebSocket.
- QUIC instead of TCP: encryption and low-latency stream handling are built in.
- JWT instead of client certificates: simpler device onboarding for the MVP.
- PostgreSQL persistence: one durable store for device registry, telemetry history, and offline queue state.
- Public
pkg/qtt: prepares the protocol for future extraction into a dedicated repository without forcing that split now.