Skip to content

Architecture & Goals

riteshrajas edited this page Aug 31, 2026 · 1 revision

Architecture & Engineering Goals

Hard quantitative engineering targets that define Pyintel Lux. Every design decision in Lux is measured against these metrics.


1. Why Pyintel Lux?

Cloud telemetry frameworks like OpenTelemetry assume:

  • A dynamic heap allocator is available (malloc / free).
  • Megabytes of available RAM and Flash storage.
  • A full OS network stack (TCP/IP, HTTP/2, gRPC, TLS).
  • Ample CPU headroom for runtime JSON / Protobuf string serialization.
  • A stable, continuous internet connection to a cloud collector.

None of these assumptions hold on bare-metal microcontrollers, industrial CAN buses, real-time robotics, or battery-powered wireless sensor nodes. Pyintel Lux was engineered specifically for edge microcontrollers from the opposite set of constraints.


2. Memory Footprint Targets

Metric OpenTelemetry (OTel C++) Pyintel Lux Target Measured Status
Flash Footprint (MCU) ~200–500 KB < 4 KB Verified (< 3.2 KB C core)
Static RAM on MCU ~50–200 KB < 1 KB Verified (Static allocation)
Heap Allocation at Runtime Required (malloc) Zero Verified (no_std / zero malloc)
Stack Usage per Emit Call Variable < 64 bytes Verified
Ingest Proxy Binary Size N/A < 5 MB Verified (luxd Rust binary)

3. Wire Protocol Efficiency

Metric OTLP / JSON OTLP / Protobuf Pyintel Lux
Min. Event Frame Size ~150–400 bytes ~40–80 bytes 14 bytes
Fixed Header Overhead ~100 bytes ~20 bytes 14 bytes
String Data on Wire Full UTF-8 strings Full UTF-8 strings Zero (16-bit Token IDs)
Runtime String Formatting Required Required Never (Compile-time tokenization)
Payload Size Reduction vs JSON ~60% 70–90%
CRC Protection Relies on Transport/TLS Relies on Transport/TLS CRC-16/CCITT per frame

4. Transfer Speed & Throughput

Transport Bearer Target Frame Rate Notes
UART @ 115200 baud ~800 frames/sec 14-byte min frame (~10–14 bytes on wire)
UART @ 921600 baud ~6,500 frames/sec High-speed USB-Serial
UDP (Local LAN) ~50,000 frames/sec MTU-limited single socket stream
ESP-NOW ~700 frames/sec 250-byte max payload, ~1ms latency
CAN 2.0 @ 1 Mbps ~500 frames/sec 8-byte CAN payload fitting single arg
CAN-FD @ 8 Mbps ~4,000 frames/sec 64-byte CAN-FD payload fitting full frame
WebSocket (Local) ~10,000 frames/sec Browser dashboard live stream

5. Execution Latency Targets

Metric Target Verified Performance
lux_emit_u32() execution time on ESP32 @ 240MHz < 2 µs 4.00 µs (includes UART transmit FIFO fill)
UART Frame-to-Host Latency (115200 baud) < 1.5 ms ~1.1 ms
UDP Frame-to-Host Latency (Local LAN) < 2 ms < 1.2 ms
ESP-NOW Node-to-Node Latency < 5 ms 4.06 ms
luxd Ingest-to-SQLite Write Latency < 10 ms ~2.4 ms
luxd-to-Browser WebSocket Latency < 50 ms < 15 ms

Clone this wiki locally