Skip to main content
Back to All Projects
Backend & SystemsLead Systems Architect • 2024 - 2025

Scalable Distributed Vending Fleet

Decoupled Agent-Server architecture for resilient IoT fleet management.

Decoupled Agent-Server fleet topology
< 25ms agent-to-server sync latency
Offline-resilient transaction queue
Centralized real-time fleet dashboard

System Architecture

Edge agent daemons running on physical hardware communicate over persistent TLS WebSockets with a clustered Node.js backend orchestrator and monitoring dashboard.

Key Architecture Components

  • Edge Agent Controller: Manages local hardware actuators, peripheral sensors, and offline transaction cache.
  • Central Fleet Orchestrator: Multi-tenant management server coordinating firmware, pricing, and health telemetry.
  • Real-Time Telemetry Layer: Bidirectional WebSocket channels streaming live machine statuses.
  • Admin Web Console: Responsive analytical frontend for fleet inventory, earnings, and diagnostic alerts.
Data Pipeline FlowVending Machine Hardware → Edge Agent Daemon → Local Queue Buffer → WebSocket Gateway → Central Orchestrator → Fleet Analytics Console

Engineering Challenges & Solutions

Challenge: Intermittent edge network drops causing transaction desynchronization on physical vending units.
Engineering Solution: Engineered a local SQLite write-ahead event store on each agent that buffers transactions offline and reconciles with exponential backoff upon network restoration.
Challenge: Central server bottleneck when broadcasting real-time inventory and pricing updates to thousands of agents.
Engineering Solution: Implemented WebSocket pub/sub channels with delta-based payload compression, cutting telemetry bandwidth by 72%.