mirror of
https://github.com/davidalves04/Trabalho-Pratico-SD.git
synced 2025-12-07 20:16:36 +00:00
172 lines
16 KiB
Plaintext
172 lines
16 KiB
Plaintext
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.0.3 Chrome/140.0.7339.249 Electron/38.7.0 Safari/537.36" version="29.0.3">
|
|
<diagram name="Arquitetura SD" id="QKeTeUWuUs8JeLsq44d-">
|
|
<mxGraphModel dx="1426" dy="841" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
|
<root>
|
|
<mxCell id="0" />
|
|
<mxCell id="1" parent="0" />
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-27" value="<b>MessageProtocol</b><hr>interface:<br>• getType()<br>• getPayload()<br>• getSourceNode()<br>• getDestinationNode()" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#fff2cc;strokeColor=#d6b656;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
|
<mxGeometry x="30" y="30" width="180" height="120" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-28" value="<b>Tipos de Mensagens</b><hr>• VEHICLE_TRANSFER<br>• VEHICLE_SPAWN<br>• STATS_UPDATE<br>• TRAFFIC_LIGHT_SYNC<br>• HEARTBEAT" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#fff2cc;strokeColor=#d6b656;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
|
<mxGeometry x="20" y="170" width="200" height="120" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-26" value="<b>LEGENDA</b><hr>━━━► Comunicação síncrona<br>╌╌╌► Comunicação periódica<br><br><b>Cores:</b><br>🔵 Azul =&nbsp;<span style="background-color: transparent;">Criação do veículo</span><div>🟢 Verde = Transferência do veículo<br>🟠 Laranja = Chegada ao destino<br>🟣 Roxo =&nbsp;<span style="background-color: transparent;">Envio das estatísticas</span></div><div><br><b>Serialização:</b> JSON (Gson)<br><b>Protocolo:</b> TCP/IP</div>" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;spacing=10;" parent="1" vertex="1">
|
|
<mxGeometry x="10" y="320" width="220" height="220" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="L62mICw2ZrYi1D68OOFe-13" value="" style="group" parent="1" vertex="1" connectable="0">
|
|
<mxGeometry x="280" y="40" width="850" height="730" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-20" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;exitX=0.616;exitY=-0.011;exitDx=0;exitDy=0;entryX=0.661;entryY=-0.002;entryDx=0;entryDy=0;entryPerimeter=0;exitPerimeter=0;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<mxPoint x="794" y="530" as="targetPoint" />
|
|
<Array as="points">
|
|
<mxPoint x="99" y="122" />
|
|
<mxPoint x="793" y="122" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-1" value="<b>CoordinatorProcess</b><br>(Cliente Socket)<hr>• VehicleGenerator<br>• Modelo Poisson<br>• Liga a Cr1-Cr5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
|
<mxGeometry x="205.6637168141593" width="176.28318584070794" height="101.38888888888889" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-2" value="<b>Cr1</b> (IntersectionProcess)<br>Porta: 8001<br>Servidor + Cliente<hr>• ServerSocket (8001)<br>• Thread Semáforo - Sul<br>• Thread Semáforo - Este<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
|
<mxGeometry y="162.22" width="160" height="162.22" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-3" value="<b>Cr2</b> (IntersectionProcess)<br>Porta: 8002<br>Servidor + Cliente<hr>• ServerSocket (8002)<br>• Thread Semáforo - Sul<br>• Thread Semáforo - Este<br>• Thread Semáforo - Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
|
<mxGeometry x="227.7" y="162.22" width="162.3" height="162.22" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-5" value="<b>Cr4</b> (IntersectionProcess)<br>Porta: 8004<br>Servidor + Cliente<hr>• ServerSocket (8004)<br>• Thread Semáforo - Este<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
|
<mxGeometry y="486.67" width="160" height="133.33" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-6" value="<b>Cr5</b> (IntersectionProcess)<br>Porta: 8005<br>Servidor + Cliente<hr>• ServerSocket (8005)<br>• Thread Semáforo - Este<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
|
<mxGeometry x="220.35" y="486.67" width="169.65" height="162.22" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-7" value="<b>ExitNode (S)</b><br>Porta: 9001<br>Servidor Socket<hr>• Recebe veículos finais<br>• Calcula estatísticas:<br> - Tempo no sistema<br> - Tempo de espera<br> - Métricas por tipo<br>• Envia para o Dashboard" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
|
<mxGeometry x="464.07" y="476.53" width="154.6" height="172.36" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-8" value="<b>DashboardServer</b><br>Porta: 9000<br>Servidor Socket<hr>• Thread Pool (10 threads)<br>• ConcurrentHashMap<br>• Agrega estatísticas<br>• Display a cada 5s:<br> - Throughput<br> - Tempos médios<br> - Tamanhos de filas" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
|
<mxGeometry x="683.1" y="540" width="166.9" height="180" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-2" edge="1">
|
|
<mxGeometry x="-0.2105" relative="1" as="geometry">
|
|
<mxPoint as="offset" />
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-3" edge="1">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<Array as="points">
|
|
<mxPoint x="309" y="120" />
|
|
<mxPoint x="309" y="120" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-4" edge="1">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-3" edge="1">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-3" target="0K4eb2koB2xQ8duQ1-_a-4" edge="1">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-14" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=none;startFill=0;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-5" edge="1">
|
|
<mxGeometry x="0.125" y="100" relative="1" as="geometry">
|
|
<Array as="points">
|
|
<mxPoint x="66.10619469026548" y="446.11111111111114" />
|
|
<mxPoint x="66.10619469026548" y="446.11111111111114" />
|
|
</Array>
|
|
<mxPoint y="-1" as="offset" />
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=none;startFill=0;exitX=1.005;exitY=0.63;exitDx=0;exitDy=0;exitPerimeter=0;align=center;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-5" edge="1">
|
|
<mxGeometry x="-0.0178" y="-49" relative="1" as="geometry">
|
|
<mxPoint x="139.55752212389382" y="588.0555555555555" as="sourcePoint" />
|
|
<mxPoint x="220" y="571" as="targetPoint" />
|
|
<Array as="points">
|
|
<mxPoint x="220" y="571" />
|
|
</Array>
|
|
<mxPoint as="offset" />
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-19" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#b46504;strokeWidth=2;fillColor=#fad7ac;" parent="L62mICw2ZrYi1D68OOFe-13" edge="1">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<mxPoint x="390" y="580" as="sourcePoint" />
|
|
<mxPoint x="462.74" y="580.22" as="targetPoint" />
|
|
<Array as="points" />
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-22" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;exitX=0.981;exitY=0.08;exitDx=0;exitDy=0;exitPerimeter=0;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-4" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
|
<mxGeometry x="0.1427" y="-60" relative="1" as="geometry">
|
|
<Array as="points">
|
|
<mxPoint x="593" y="175" />
|
|
<mxPoint x="593" y="140" />
|
|
<mxPoint x="764" y="140" />
|
|
</Array>
|
|
<mxPoint as="offset" />
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-4" value="<b>Cr3</b> (IntersectionProcess)<br>Porta: 8003<br>Servidor + Cliente<hr>• ServerSocket (8003)<br>• Thread Semáforo - Sul<br>• Thread Semáforo - Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
|
<mxGeometry x="462.74" y="162.22" width="167.26" height="162.22" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="0K4eb2koB2xQ8duQ1-_a-30" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;entryX=0.186;entryY=0.998;entryDx=0;entryDy=0;entryPerimeter=0;" parent="L62mICw2ZrYi1D68OOFe-13" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<mxPoint x="103" y="620" as="sourcePoint" />
|
|
<mxPoint x="710" y="730" as="targetPoint" />
|
|
<Array as="points">
|
|
<mxPoint x="103" y="730" />
|
|
<mxPoint x="714" y="730" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="L62mICw2ZrYi1D68OOFe-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=none;startArrow=classic;startFill=1;endFill=0;" parent="L62mICw2ZrYi1D68OOFe-13" edge="1">
|
|
<mxGeometry x="-0.2214" y="26" relative="1" as="geometry">
|
|
<mxPoint x="293.8053097345133" y="486.6666666666666" as="sourcePoint" />
|
|
<mxPoint x="293.8053097345133" y="324.44444444444446" as="targetPoint" />
|
|
<Array as="points" />
|
|
<mxPoint x="-17" y="6" as="offset" />
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="L62mICw2ZrYi1D68OOFe-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#b46504;strokeWidth=2;endArrow=classic;startArrow=none;startFill=0;fillColor=#fad7ac;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="L62mICw2ZrYi1D68OOFe-13" target="0K4eb2koB2xQ8duQ1-_a-7" edge="1">
|
|
<mxGeometry x="0.3659" relative="1" as="geometry">
|
|
<mxPoint as="offset" />
|
|
<mxPoint x="541" y="324" as="sourcePoint" />
|
|
<mxPoint x="528.8495575221239" y="435.9722222222221" as="targetPoint" />
|
|
<Array as="points">
|
|
<mxPoint x="541" y="360" />
|
|
<mxPoint x="541" y="360" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="L62mICw2ZrYi1D68OOFe-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;exitX=0.621;exitY=-0.003;exitDx=0;exitDy=0;exitPerimeter=0;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-3" edge="1">
|
|
<mxGeometry x="0.1427" y="-60" relative="1" as="geometry">
|
|
<mxPoint x="330.53097345132744" y="141.94444444444443" as="sourcePoint" />
|
|
<mxPoint x="780" y="540" as="targetPoint" />
|
|
<Array as="points">
|
|
<mxPoint x="329" y="130" />
|
|
<mxPoint x="780" y="130" />
|
|
</Array>
|
|
<mxPoint as="offset" />
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="L62mICw2ZrYi1D68OOFe-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="L62mICw2ZrYi1D68OOFe-13" edge="1">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<mxPoint x="326" y="654" as="sourcePoint" />
|
|
<mxPoint x="683.1" y="700" as="targetPoint" />
|
|
<Array as="points">
|
|
<mxPoint x="326.1" y="700" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="L62mICw2ZrYi1D68OOFe-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="L62mICw2ZrYi1D68OOFe-13" edge="1">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<mxPoint x="556" y="650" as="sourcePoint" />
|
|
<mxPoint x="683.0973451327434" y="663.0833333333331" as="targetPoint" />
|
|
<Array as="points">
|
|
<mxPoint x="556" y="663" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
</root>
|
|
</mxGraphModel>
|
|
</diagram>
|
|
</mxfile>
|