Major architectural change from REST API polling to WebSocket-based bidirectional communication: **What Changed:** - Agent now uses persistent WebSocket connection instead of REST API - Server pushes SNMP query jobs to agent via Phoenix Channels - Agent executes raw SNMP queries and returns results - Removed complex polling/scheduling/buffering architecture **New Files:** - src/websocket_client.rs - WebSocket client with SNMP job execution - Extended proto/agent.proto with WebSocket message types **Modified Files:** - src/main.rs - Simplified to connect and run WebSocket client - src/health.rs - Simplified health endpoint (no storage needed) - src/snmp/mod.rs - Export SnmpValue for WebSocket client **Removed Files:** - src/api_client.rs - Old REST API client - src/config.rs - Old config types - src/buffer/ - SQLite buffering (no longer needed) - src/metrics/ - Old metric types - src/poller/ - Polling/scheduling logic - src/snmp/neighbor.rs - High-level neighbor discovery **Dependencies:** - Switched from native-tls to rustls for WebSocket TLS - Uses tokio-tungstenite for WebSocket communication - Protobuf for efficient binary message encoding **Benefits:** - Simpler agent architecture (~500 lines vs 5000+) - Real-time job execution (<1s vs 60s polling) - No duplicate SNMP profile logic - No local storage/buffering complexity - 68% smaller message payloads (protobuf vs JSON) |
||
|---|---|---|
| .. | ||
| agent.proto | ||