Skip to content

Phase 1 NATS gateway with demo and QEMU smoke script alignment - #2

Merged
JohnBasrai merged 2 commits into
mainfrom
feature/phase1-nats-gateway
Jan 31, 2026
Merged

JohnBasrai merged 2 commits into
mainfrom
feature/phase1-nats-gateway

Conversation

@JohnBasrai

Copy link
Copy Markdown
Owner

This PR introduces the Phase 1 NATS-based edge gateway (v0.2.0) and aligns
local demo and QEMU smoke scripts with the current runtime behavior.

Key changes:

  • Adds NATS-based edge gateway with device simulation, telemetry aggregation,
    and request/reply command routing
  • Establishes Phase 1 architecture using EMBP with clear module boundaries
  • Updates demo and QEMU smoke scripts to support long-running agent behavior
  • Documents Linux prerequisites and assumptions discovered during debugging

No CI workflow changes were made; only scripts invoked by CI were updated
to reflect correct runtime semantics.

Implement NATS-based edge gateway demonstrating device coordination patterns:

Core Features:
- Device simulator supporting sensor/actuator/hybrid modes
- NATS request/reply for command routing with timeout handling
- Telemetry aggregation and forwarding to backend
- Device registry with state tracking (30s timeout)
- Exponential backoff retry using bit-shift (1s to 30s cap)

Architecture:
- Applied EMBP (Explicit Module Boundary Pattern) throughout
- Private modules with selective gateway exports
- CLI argument parsing (CLAP) with env var fallbacks
- Proper import patterns (super:: for siblings, crate:: for external)

Infrastructure:
- Service management scripts (NATS broker lifecycle)
- Interactive demo script (configurable device count)
- Comprehensive CONTRIBUTING.md with EMBP and doc standards

Documentation:
- Updated README.md with Quick Start guide
- Expanded CHANGELOG.md with Phase 1 details
- Enhanced architecture.md with implementation overview
- Added rationale for NATS over MQTT decision

Release Notes:
- Version bump: 0.1.0 → 0.2.0
- Establishes foundation for Phase 2 (mqtt-rpc extraction)
- Maintains cross-compilation and QEMU validation

See CHANGELOG.md for complete feature list.
@JohnBasrai
JohnBasrai merged commit 4c7c2e3 into main Jan 31, 2026
4 checks passed
@JohnBasrai
JohnBasrai deleted the feature/phase1-nats-gateway branch January 31, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant