70 lines
4.5 KiB
XML
70 lines
4.5 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 1060" width="100%" role="img" aria-label="Схема пайплайна IoT">
|
|
<defs>
|
|
<style>
|
|
text { font-family: system-ui, "Segoe UI", Roboto, sans-serif; }
|
|
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
|
|
</style>
|
|
<marker id="arr" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto">
|
|
<path d="M0,0 L8,3 L0,6 Z" fill="#6b7280"/>
|
|
</marker>
|
|
</defs>
|
|
|
|
<!-- Подложка «ПЛАТФОРМА» -->
|
|
<text x="104" y="222" font-size="12" fill="#6b7280">ПЛАТФОРМА</text>
|
|
<rect x="100" y="232" width="440" height="568" rx="16" fill="none"
|
|
stroke="#bfdbfe" stroke-width="1.5" stroke-dasharray="6 4"/>
|
|
|
|
<!-- Переход 1: Устройство → EMQX -->
|
|
<line x1="320" y1="158" x2="320" y2="242" stroke="#6b7280" stroke-width="2" marker-end="url(#arr)"/>
|
|
<rect x="175" y="187" width="130" height="26" rx="8" fill="#ffffff" stroke="#d1d5db"/>
|
|
<text x="240" y="205" font-size="14" fill="#1a1a1a" text-anchor="middle">MQTT over wss</text>
|
|
<text x="345" y="196" font-size="13" class="mono" fill="#6b7280">{namespace}/</text>
|
|
<text x="345" y="216" font-size="13" class="mono" fill="#6b7280">telemetry/{device_id}</text>
|
|
|
|
<!-- Переход 2: EMQX → Очередь -->
|
|
<line x1="320" y1="368" x2="320" y2="452" stroke="#6b7280" stroke-width="2" marker-end="url(#arr)"/>
|
|
<rect x="200" y="397" width="80" height="26" rx="8" fill="#ffffff" stroke="#d1d5db"/>
|
|
<text x="240" y="415" font-size="14" fill="#1a1a1a" text-anchor="middle">бридж</text>
|
|
<text x="345" y="416" font-size="13" fill="#6b7280">кладёт показания</text>
|
|
|
|
<!-- Переход 3: Очередь → PostgreSQL -->
|
|
<line x1="320" y1="578" x2="320" y2="662" stroke="#6b7280" stroke-width="2" marker-end="url(#arr)"/>
|
|
<rect x="175" y="607" width="130" height="26" rx="8" fill="#ffffff" stroke="#d1d5db"/>
|
|
<text x="240" y="625" font-size="14" fill="#1a1a1a" text-anchor="middle">потребитель</text>
|
|
<text x="345" y="626" font-size="13" fill="#6b7280">пишет в базу</text>
|
|
|
|
<!-- Переход 4: PostgreSQL → API / Консоль -->
|
|
<line x1="320" y1="788" x2="320" y2="872" stroke="#6b7280" stroke-width="2" marker-end="url(#arr)"/>
|
|
<rect x="205" y="817" width="70" height="26" rx="8" fill="#ffffff" stroke="#d1d5db"/>
|
|
<text x="240" y="835" font-size="14" fill="#1a1a1a" text-anchor="middle">REST</text>
|
|
<text x="345" y="836" font-size="13" fill="#6b7280">чтение истории</text>
|
|
|
|
<!-- Блок 1: Устройство -->
|
|
<rect x="110" y="40" width="420" height="110" rx="12" fill="#ffffff" stroke="#d1d5db"/>
|
|
<text x="320" y="102" font-size="20" font-weight="600" fill="#1a1a1a" text-anchor="middle">Устройство</text>
|
|
<text x="320" y="128" font-size="14" class="mono" fill="#6b7280" text-anchor="middle">датчик · MQTT-клиент</text>
|
|
|
|
<!-- Блок 2: EMQX -->
|
|
<rect x="110" y="250" width="420" height="110" rx="12" fill="#eff6ff" stroke="#bfdbfe"/>
|
|
<text x="320" y="312" font-size="20" font-weight="600" fill="#2563eb" text-anchor="middle">EMQX</text>
|
|
<text x="320" y="338" font-size="14" class="mono" fill="#6b7280" text-anchor="middle">брокер · wss /mqtt</text>
|
|
|
|
<!-- Блок 3: Очередь -->
|
|
<rect x="110" y="460" width="420" height="110" rx="12" fill="#eff6ff" stroke="#bfdbfe"/>
|
|
<text x="320" y="522" font-size="20" font-weight="600" fill="#2563eb" text-anchor="middle">Очередь</text>
|
|
<text x="320" y="548" font-size="14" class="mono" fill="#6b7280" text-anchor="middle">iot-telemetry</text>
|
|
|
|
<!-- Блок 4: PostgreSQL -->
|
|
<rect x="110" y="670" width="420" height="110" rx="12" fill="#eff6ff" stroke="#bfdbfe"/>
|
|
<text x="320" y="732" font-size="20" font-weight="600" fill="#2563eb" text-anchor="middle">PostgreSQL</text>
|
|
<text x="320" y="758" font-size="14" class="mono" fill="#6b7280" text-anchor="middle">база на namespace</text>
|
|
|
|
<!-- Блок 5: API / Консоль -->
|
|
<rect x="110" y="880" width="420" height="110" rx="12" fill="#ffffff" stroke="#d1d5db"/>
|
|
<text x="320" y="942" font-size="20" font-weight="600" fill="#1a1a1a" text-anchor="middle">API / Консоль</text>
|
|
<text x="320" y="968" font-size="14" class="mono" fill="#6b7280" text-anchor="middle">чтение истории</text>
|
|
|
|
<!-- Подвал -->
|
|
<text x="320" y="1038" font-size="13" fill="#6b7280" text-anchor="middle">бридж и потребитель — части сервиса iot-service</text>
|
|
</svg>
|