DigiPhusion

EDGE

Edge Device Communication

WebSocket

Direct browser-to-device communication via WebSocket

Isomorphic Execution Model

The same automation model runs on edge (Rust), cloud (Node.js), and dashboard (browser). Different runtimes, same structure = isomorphic execution. Test in cloud, deploy to edge with confidence.

Edge (Rust): Executes model + Physical I/O
Cloud (Node.js): Simulates model + Virtual I/O
Dashboard (Browser): Visualizes model (read-only)
Why this matters: Run the same policy rules, state machines, and control logic in cloud simulation (safe) before deploying to edge (production). If it works in cloud, it works on edge—guaranteed by isomorphic structure.
💡 Tip: Use cloud simulation to test new automation logic. Same code, virtual I/O—verify behavior before commanding real motors.

WebSocket Architecture

This implementation uses WebSocket for real-time communication with the Rust edge device. No Node.js server required - the dashboard runs entirely in your browser!

Features

  • Direct browser connection
  • Real-time bidirectional streaming
  • Type-safe Zod protocol validation
  • Auto-reconnect with backoff

Connection Details

  • Protocol: WebSocket over HTTP
  • Default endpoint: ws://localhost:3001/ws
  • Message format: JSON with Zod validation
  • Simpler deployment: Single Rust binary

Connection Status

State:
disconnected
URL: ws://localhost:3001/ws

Real-Time Metrics

Live system metrics streamed every 5 seconds

CPU Usage
--
Memory Usage
--
Disk Usage
--

Health Status

Connect to view health status

System Information

Connect to view system information

Audit Log

Recent WebSocket activity (auto-refresh enabled)

No audit log entries yet

Development Mode

To test the WebSocket connection, you'll need to run the Rust edge server on localhost:3001.

Quick Start:

  1. Build the Rust server: cargo build --release
  2. Start the server: cargo run
  3. Click "Connect" in the Connection Status card above
  4. Start streaming metrics to see real-time data

See RUST_WEBSOCKET_SERVER.md for implementation details