- Contents in this wiki are for entertainment purposes only
DataNet System Microservices Architecture: Difference between revisions
Jump to navigation
Jump to search
DataNet WiFi Lab System
Lab System Microservices Architecture
XenoEngineer (talk | contribs) (Created page with "{{menuDataNet}} <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Lab System Microservices Architecture</title> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; color:...") |
XenoEngineer (talk | contribs) mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{menuDataNet}} | {{menuDataNet}}<br style="clear:both;"/> | ||
<html lang="en"> | <html lang="en"> | ||
<head> | <head> | ||
Latest revision as of 16:15, 28 June 2025
DataNet WiFi Lab System
for telemetry and control
🧪 Lab System Microservices Architecture
Web Interface Service
Simple HTML/JS/CSS interface with editable numeric and text fields. Handles user input validation and real-time updates from analysis results.
Tech: Pure HTML/JS/CSS, WebSocket client, minimal framework
API Gateway Service
Central entry point that routes requests, handles authentication, and manages WebSocket connections for real-time communication.
Tech: Node.js/Express or Go, WebSocket support, CORS handling
Control Service
Receives UI field values, validates them, and formats control data for ESP32 register transmission. Maintains current control state.
Tech: Python/FastAPI or Node.js, UDP/TCP client, register mapping
Device Communication Service
Manages WiFi protocol with ESP32. Sends control registers and receives event data blocks containing: on-timestamp, off-timestamp, event-count from binary counter captures on state transitions.
Tech: Python/asyncio, UDP/TCP, binary packet parsing, block buffering
Event Data Service
Receives event data blocks from ESP32: processes pulse timing (on/off timestamps) and event counts. Calculates pulse width, frequency, and counter deltas for analysis.
Tech: Python/FastAPI, time-series DB, event processing, pulse analysis
Analysis Service
Processes logged data, performs calculations, and generates parametric changes to feed back to UI control fields for closed-loop operation.
Tech: Python/NumPy/SciPy, algorithm engine, parameter optimization
📊 Event-Driven Data Flow
Web UI
Controls
Controls
→
ESP32
Registers
Registers
→
Binary Input
Monitor
Monitor
→
State Change
Trigger
Trigger
→
Event Packet
Capture
Capture
→
Block Buffer
ESP32
ESP32
→
Event Data
Service
Service
🔧 ESP32 Event Capture Logic
Interrupt-driven: Binary input triggers on falling edge (off-state transition)
Event packet: [on_timestamp, off_timestamp, counter_value] - 12 bytes typical
Block transmission: Buffer N packets (e.g., 10-100) before WiFi transmission
Counter capture: Sample wide binary counter at exact moment of state transition
Timing precision: ESP32 microsecond timestamps for pulse width analysis
⚡ ESP32 Firmware Services Needed
Interrupt Handler
Binary input monitoring, timestamp capture, counter sampling
Binary input monitoring, timestamp capture, counter sampling
Event Buffer Manager
Packet queuing, block-size detection, memory management
Packet queuing, block-size detection, memory management
WiFi Communication
Register updates from PC, event data transmission to PC
Register updates from PC, event data transmission to PC
Register Interface
Control parameter storage, add-on board interfacing
Control parameter storage, add-on board interfacing
ESP32 Protocol
UDP/TCP
UDP/TCP
WebSocket
Real-time
Real-time
SQLite/InfluxDB
Time-series
Time-series
Python/Node.js
Services
Services
Pure HTML/JS
No Libraries
No Libraries
Docker
Containerization
Containerization