digraph SystemOverview { // Graph settings rankdir=TB; compound=true; fontname="Helvetica"; node [fontname="Helvetica", fontsize=11]; edge [fontname="Helvetica", fontsize=10]; // Title labelloc="t"; label="System Monitoring Platform - Architecture Overview"; fontsize=16; // Styling node [shape=box, style="rounded,filled"]; // External subgraph cluster_external { label="External"; style=dashed; color=gray; browser [label="Browser\n(Dashboard)", fillcolor="#E3F2FD"]; machines [label="Monitored\nMachines", fillcolor="#FFF3E0", shape=box3d]; } // Core Services subgraph cluster_services { label="Application Services"; style=filled; color="#E8F5E9"; fillcolor="#E8F5E9"; gateway [label="Gateway\n(FastAPI)", fillcolor="#C8E6C9"]; aggregator [label="Aggregator\n(gRPC Server)", fillcolor="#C8E6C9"]; alerts [label="Alerts\nService", fillcolor="#C8E6C9"]; collector [label="Collector\n(gRPC Client)", fillcolor="#DCEDC8"]; } // Data Layer subgraph cluster_data { label="Data Layer"; style=filled; color="#FFF8E1"; fillcolor="#FFF8E1"; redis [label="Redis\n(Pub/Sub + State)", fillcolor="#FFECB3", shape=cylinder]; timescale [label="TimescaleDB\n(Time-series)", fillcolor="#FFECB3", shape=cylinder]; } // Event Stream subgraph cluster_events { label="Event Stream"; style=filled; color="#F3E5F5"; fillcolor="#F3E5F5"; events [label="Redis Pub/Sub\n(Events)", fillcolor="#E1BEE7", shape=hexagon]; } // Connections browser -> gateway [label="WebSocket\nREST", color="#1976D2"]; gateway -> aggregator [label="gRPC", color="#388E3C"]; gateway -> redis [label="State\nQuery", style=dashed]; gateway -> timescale [label="Historical\nQuery", style=dashed]; machines -> collector [label="psutil", color="#F57C00", style=dotted]; collector -> aggregator [label="gRPC\nStream", color="#388E3C"]; aggregator -> redis [label="Current\nState", color="#FFA000"]; aggregator -> timescale [label="Store\nMetrics", color="#FFA000"]; aggregator -> events [label="Publish", color="#7B1FA2"]; events -> alerts [label="Subscribe", color="#7B1FA2"]; events -> gateway [label="Subscribe", color="#7B1FA2"]; alerts -> timescale [label="Store\nAlerts", style=dashed]; }