Files
IoT-Systems/sequence diagram/Діаграма-sequence-ua.puml

31 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@startuml
participant Агент as agent
participant "MQTT Broker (raw\ntopic)" as mqtt1
participant "Edge Service" as edge
participant "MQTT\nBroker (processed\ntopic)" as mqtt2
participant "Hub Service" as hub
participant "Redis" as redis
participant "Store API" as store
participant "PostgreSQL" as db
participant "MapView Client" as mapview
agent -> mqtt1 : Надіслати\nсиру\nтелеметрію
mqtt1 -> edge : Передати\nсире\nповідомлення
edge -> edge : Перевірити\nAgentData
edge -> edge : Обробити\nтелеметрію
edge -> mqtt2 : Надіслати\nоброблені дані
mqtt2 -> hub : Передати\nоброблене\nповідомлення
hub -> hub : Перевірити\nProcessedAgentData
hub -> redis : LPUSH у буфер
hub -> redis : LPOP елемента\nbatch
redis -> hub : Повернути\nелемент
hub -> store : POST batch
store -> db : Додати записи
db --> store : Повернути\nстворені записи
store -> mapview : Надіслати через WebSocket
mapview -> mapview : Сортувати за\ntimestamp
mapview -> mapview : Оновити маркер\nтранспорту
mapview -> mapview : Додати маркер\npothole/bump
store --> hub : Успішна відповідь
@enduml