hw7: wip #3 process diagram

This commit is contained in:
Claudio Maggioni 2023-04-03 11:46:27 +02:00
parent 0821b085a1
commit a68c667063
1 changed files with 18 additions and 14 deletions

View File

@ -779,7 +779,7 @@ Exceed: Redesign based on >3 reused components (1 Logical View, >1 Process View,
Components TBD:
- https://github.com/hap-java/HAP-Java
- https://github.com/tlaukkan/zigbee4java
- https://github.com/tlaukkan/MQTT4java
- instances of the PostgreSQL 15 RDBMS ([sources here](https://github.com/postgres/postgres) and [specification here](https://www.postgresql.org/docs/15/index.html)), a _free as in beer_ and FOSS piece of software.
- https://spring.io/projects/spring-boot
@ -803,8 +803,8 @@ component "IoT Devices" as IOT {
[HomeKit smart device] as HD <<user provided>>
[HomeKit smart sensor] as HS <<user provided>>
[Zigbee smart device] as ZD <<user provided>>
[Zigbee smart sensor] as ZS <<user provided>>
[MQTT smart device] as ZD <<user provided>>
[MQTT smart sensor] as ZS <<user provided>>
HD--HDF
HS--HSF
@ -829,12 +829,12 @@ component "Users and Devices" as DEV {
interface " " as WSSF
[HAP-java] as HAP <<external>>
[zigbee4java] as ZIG <<external>>
[paho.mqtt.java] as ZIG <<external>>
[Device Engine] as DI
note left of DI: Already implemented using Spring Boot
[Spring WebSocket API] as WSS <<external>>
[javax.websocket API] as WSS <<external>>
[User and Device DB <$database{scale=0.33}> (PostgreSQL)] <<external>> as DIDB
HDF )-- HAP
@ -898,8 +898,8 @@ title Process View: UI updates state of device
box "IoT Devices"
participant "HomeKit dev." as HD
participant "HomeKit sens." as HS
participant "Zigbee dev." as ZD
participant "Zigbee sens." as ZS
participant "MQTT dev." as ZD
participant "MQTT sens." as ZS
end box
box "User Interface"
@ -908,11 +908,11 @@ box "User Interface"
end box
box "Users and Devices"
participant "javax.websocket" as WSS
participant "HAP-java" as HAP
participant "zigbee4java" as ZIG
participant "paho.mqtt.java" as ZIG
participant "Engine" as DI
participant "DB" as DIDB
participant "Spring WS API" as WSS
end box
box "Triggers and Automations"
@ -925,11 +925,15 @@ box "Scenes"
participant "DB" as SCDB
end box
UI -> DI: request state update
DI -> ZD: apply new state
ZD -> DI: report successful application
DI -> DIDB: store new state
DI -> UI: display new state
UI -> DI: update state (HTTP PUT)
DI -> ZIG: client.publish(\n TOPIC,\n new MqttMessage(...)\n);\n(request state update)
ZIG -> ZD: PUBLISH\n(state update request)
ZD -> ZIG: PUBLISH\n(new state)
ZIG -> DI: subscriber.subscribe(...) observer called \n(successful application)
DI -> DIDB: JDBC transaction (UPDATE)\n(store new state)
DI -> WSS: s.getBasicRemote().sendText(...)\n(send new device state)
WSS -> WSC: WebSocket protocol
WSC -> UI: connection.onmessage called\n(new device state received, updates UI)
DI -> T: report latest device state
skinparam monochrome true