Files
ScadaBridge/docs/plans/diagrams/grpc-streams-architecture.drawio
T
Joseph Doherty bdee12f4e9 docs: render architecture & flow diagrams as draw.io charts
Replace ASCII-art diagrams across the README and docs/ with editable
.drawio sources plus exported PNGs, so the diagrams render clearly in
rendered markdown and can be maintained/regenerated instead of being
hand-edited as fragile text art. Non-diagram blocks (code, folder
trees, UI wireframes) were left as text.
2026-05-31 23:32:53 -04:00

103 lines
7.1 KiB
Plaintext

<mxfile host="app.diagrams.net">
<diagram id="grpcarch" name="gRPC Streams Architecture">
<mxGraphModel dx="1200" dy="900" grid="1" gridSize="10" guides="1" arrows="1"
fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="1000" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- Column headers -->
<mxCell id="hdrCentral" value="Central Cluster" style="text;html=1;align=center;verticalAlign=middle;fontSize=16;fontStyle=1;fontColor=#333333;" vertex="1" parent="1">
<mxGeometry x="120" y="30" width="280" height="30" as="geometry" />
</mxCell>
<mxCell id="hdrSite" value="Site Cluster" style="text;html=1;align=center;verticalAlign=middle;fontSize=16;fontStyle=1;fontColor=#333333;" vertex="1" parent="1">
<mxGeometry x="680" y="30" width="280" height="30" as="geometry" />
</mxCell>
<mxCell id="ruleC" value="" style="line;strokeWidth=2;html=1;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="120" y="60" width="280" height="10" as="geometry" />
</mxCell>
<mxCell id="ruleS" value="" style="line;strokeWidth=2;html=1;strokeColor=#d79b00;" vertex="1" parent="1">
<mxGeometry x="680" y="60" width="280" height="10" as="geometry" />
</mxCell>
<!-- CENTRAL column -->
<mxCell id="bridgeTop" value="DebugStreamBridgeActor" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=13;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="120" y="110" width="280" height="50" as="geometry" />
</mxCell>
<!-- SITE column -->
<mxCell id="instance" value="InstanceActor" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=13;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="680" y="110" width="280" height="50" as="geometry" />
</mxCell>
<!-- ClusterClient command/control between bridge and instance -->
<mxCell id="ccSub" value="SubscribeDebugView &#9658;" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;rounded=0;dashed=1;fontSize=11;exitX=1;exitY=0.3;exitDx=0;exitDy=0;entryX=0;entryY=0.3;entryDx=0;entryDy=0;verticalAlign=bottom;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="bridgeTop" target="instance">
<mxGeometry relative="1" as="geometry">
<mxPoint x="0" y="-8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ccSnap" value="&#9668; DebugViewSnapshot" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;rounded=0;dashed=1;fontSize=11;exitX=0;exitY=0.7;exitDx=0;exitDy=0;entryX=1;entryY=0.7;entryDx=0;entryDy=0;verticalAlign=top;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="instance" target="bridgeTop">
<mxGeometry relative="1" as="geometry">
<mxPoint x="0" y="8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ccLabel" value="ClusterClient:&#10;command / control" style="text;html=1;align=center;verticalAlign=middle;fontSize=10;fontStyle=2;fontColor=#666666;" vertex="1" parent="1">
<mxGeometry x="455" y="178" width="170" height="34" as="geometry" />
</mxCell>
<!-- Instance publishes -->
<mxCell id="publishes" value="publishes&#10;AttributeValueChanged&#10;AlarmStateChanged" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;" vertex="1" parent="1">
<mxGeometry x="680" y="220" width="280" height="60" as="geometry" />
</mxCell>
<mxCell id="instPub" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;rounded=0;" edge="1" parent="1" source="instance" target="publishes">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- gRPC server (site) -->
<mxCell id="grpcServer" value="SiteStreamGrpcServer&#10;(Kestrel, on site)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=13;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="680" y="340" width="280" height="60" as="geometry" />
</mxCell>
<mxCell id="pub2srv" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;rounded=0;" edge="1" parent="1" source="publishes" target="grpcServer">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="srvNote1" value="receives from&#10;SiteStreamManager" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;fontStyle=2;fontColor=#666666;" vertex="1" parent="1">
<mxGeometry x="970" y="345" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="srvNote2" value="filters by&#10;instance name" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;fontStyle=2;fontColor=#666666;" vertex="1" parent="1">
<mxGeometry x="970" y="375" width="120" height="30" as="geometry" />
</mxCell>
<!-- gRPC client (central) -->
<mxCell id="grpcClient" value="SiteStreamGrpcClient&#10;(per-site, on central)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=13;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="120" y="340" width="280" height="60" as="geometry" />
</mxCell>
<!-- gRPC stream: server -> client -->
<mxCell id="grpcStream" value="gRPC stream (HTTP/2)" style="edgeStyle=none;html=1;endArrow=block;rounded=0;strokeWidth=2;strokeColor=#82b366;fontSize=12;fontStyle=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="grpcServer" target="grpcClient">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cliNote" value="reads from gRPC stream&#10;routes by correlationId" style="text;html=1;align=center;verticalAlign=middle;fontSize=10;fontStyle=2;fontColor=#666666;" vertex="1" parent="1">
<mxGeometry x="120" y="410" width="280" height="30" as="geometry" />
</mxCell>
<!-- bridge (central, lower) -->
<mxCell id="bridgeBottom" value="DebugStreamBridgeActor" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=13;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="120" y="460" width="280" height="50" as="geometry" />
</mxCell>
<mxCell id="cli2bridge" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;rounded=0;" edge="1" parent="1" source="grpcClient" target="bridgeBottom">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- SignalR / Blazor -->
<mxCell id="signalr" value="SignalR Hub / Blazor UI" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=13;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="120" y="560" width="280" height="50" as="geometry" />
</mxCell>
<mxCell id="bridge2signalr" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;rounded=0;" edge="1" parent="1" source="bridgeBottom" target="signalr">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>