tpt-rust3
RustTUP-native edge memory and routing layer: zero-loss WAL, store-and-forward buffering, and real-time materialized state for physical assets on unreliable edge hardware.
Languages
tpt-rust3 — The Memory & Edge Routing
tpt-rust3 is the edge memory and routing layer of the wider
TPT Unified Protocol (TUP) platform. It sits
directly downstream of tpt-protocol: it ingests TUP envelopes, buffers them against network
and power failures, stores them efficiently, and maintains a real-time materialized view of the
physical world on the edge device.
Position in the TUP platform
┌──────────────── tpt-protocol ────────────────┐
physical field │ modbus / j1939 / bacnet / opcua / ... │
│ │ │ (protocol crates normalize) │
│ │ ▼ │
│ │ TUP DataPoint (CBOR envelope) │
▼ └──────────────────────┬────────────────────────┘
sensors/actuators │
▼
┌────────── tpt-rust3 ──────────┐
Ingest Path: │ tpt-tup-router ──► tpt-edge-wal
│ │ └─► tpt-state-snapshot
│ │ (fan-out: durability + materialized view)
│ ▼
│ tpt-sensor-health (watchdogs on the same stream)
│
Compression Path: │ tpt-edge-wal ──► tpt-parquet-partitioner
│ (with tpt-edge-compress codecs)
│
Sync Path: │ tpt-edge-buffer ──► tpt-edge-sync ──► cloud historian
│
│ tpt-edge-config (device manifest, feeds router/monitor)
│ tpt-audit-trail (tamper-evident operator-action log)
└──────────────────────────────────┘
Ingest Path
TUP envelopes arrive at tpt-tup-router, which routes each (device_id, point_id, channel) to subscribers. On dispatch the router fans out every sample into
tpt-edge-wal (durable, crash-safe append log) and tpt-state-snapshot
(always-current "last known good" view, quality-aware). tpt-sensor-health
consumes the same stream to raise drift / freeze / timeout alarms.
Compression Path
Rotated, synced tpt-edge-wal segments are drained into time-partitioned Parquet
by tpt-parquet-partitioner (DST-aware), with tpt-edge-compress's Gorilla
codecs available for column storage.
Sync Path
tpt-edge-buffer stages unsynced records with per-record ack state, backpressure,
and retry. tpt-edge-sync ships only the unsynced range to a cloud historian via
a pluggable SyncClient and resolves edge/cloud conflicts (edge-authoritative by
default).
See spec.txt for the full design document and crate inventory, and
todo.md for the build checklist / phase plan.
Crates
| Crate | no_std? | Role |
|---|---|---|
tpt-edge-config | no_std+alloc | Hardware-port → TUP device/point manifest, hot-reload |
tpt-tup-router | no_std+alloc | TUP-native pub/sub + topic routing |
tpt-edge-wal | std | Durable append-only log for TUP CBOR blobs |
tpt-state-snapshot | no_std+alloc | Materialized "last known good" view |
tpt-edge-compress | no_std+alloc | Gorilla-style delta/XOR compression |
tpt-parquet-partitioner | std | Time-based Parquet partitioning (DST-aware) |
tpt-edge-buffer | std | Store-and-forward queue w/ retry + backpressure |
tpt-edge-sync | std | Delta-sync + conflict resolution to cloud |
tpt-sensor-health | no_std+alloc | Drift / freeze / timeout watchdogs |
tpt-audit-trail | std | Cryptographically chained audit log |
Core principles
- TUP-Native Routing — the router routes on TUP asset IDs and channels, not generic strings.
- Zero-Loss Edge Storage — power failures and cellular dropouts must not lose telemetry.
- Materialized State — the last known good state is always in memory, no DB query required.
License
Dual-licensed under MIT and Apache-2.0.