[P] Simplify general sequence diagram

This commit is contained in:
2026-03-24 16:02:54 +02:00
parent b47b932ae3
commit a19c1af2a7
2 changed files with 19 additions and 30 deletions

View File

@@ -0,0 +1,19 @@
@startuml
actor Worker as worker
participant Agent as agent
participant "Edge" as edge
participant "Hub" as hub
participant "Store" as store
participant "MapView" as mapview
actor Spectator as spectator
worker -> agent : Start agent
agent -> edge : Send sensor data
edge -> edge : Classify road state
edge -> hub : Send processed data
hub -> hub : Save processed data
hub -> store : Send processed data batch
store -> store : Save processed data batch
store -> mapview : Send new rows
mapview -> spectator : Update paths and markers
@enduml

View File

@@ -1,30 +0,0 @@
@startuml
participant Agent 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 : Publish raw\ntelemetry
mqtt1 -> edge : Deliver raw\nmessage
edge -> edge : Validate\nAgentData
edge -> edge : Process\ntelemetry
edge -> mqtt2 : Publish\nprocessed data
mqtt2 -> hub : Deliver processed\nmessage
hub -> hub : Validate\nProcessedAgentData
hub -> redis : LPUSH to buffer
hub -> redis : LPOP batch item
redis -> hub : Return item
hub -> store : POST batch
store -> db : INSERT records
db --> store : Return created\nrecords
store -> mapview : WebSocket push
mapview -> mapview : Sort by timestamp
mapview -> mapview : Update vehicle\nmarker
mapview -> mapview : Add pothole/bump\nmarker
store --> hub : Success response
@enduml