hw7: wip #3 process diagram

This commit is contained in:
Claudio Maggioni 2023-04-03 11:46:27 +02:00
parent 0821b085a1
commit a68c667063

View File

@ -779,7 +779,7 @@ Exceed: Redesign based on >3 reused components (1 Logical View, >1 Process View,
Components TBD: Components TBD:
- https://github.com/hap-java/HAP-Java - 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. - 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 - https://spring.io/projects/spring-boot
@ -803,8 +803,8 @@ component "IoT Devices" as IOT {
[HomeKit smart device] as HD <<user provided>> [HomeKit smart device] as HD <<user provided>>
[HomeKit smart sensor] as HS <<user provided>> [HomeKit smart sensor] as HS <<user provided>>
[Zigbee smart device] as ZD <<user provided>> [MQTT smart device] as ZD <<user provided>>
[Zigbee smart sensor] as ZS <<user provided>> [MQTT smart sensor] as ZS <<user provided>>
HD--HDF HD--HDF
HS--HSF HS--HSF
@ -829,12 +829,12 @@ component "Users and Devices" as DEV {
interface " " as WSSF interface " " as WSSF
[HAP-java] as HAP <<external>> [HAP-java] as HAP <<external>>
[zigbee4java] as ZIG <<external>> [paho.mqtt.java] as ZIG <<external>>
[Device Engine] as DI [Device Engine] as DI
note left of DI: Already implemented using Spring Boot 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 [User and Device DB <$database{scale=0.33}> (PostgreSQL)] <<external>> as DIDB
HDF )-- HAP HDF )-- HAP
@ -898,8 +898,8 @@ title Process View: UI updates state of device
box "IoT Devices" box "IoT Devices"
participant "HomeKit dev." as HD participant "HomeKit dev." as HD
participant "HomeKit sens." as HS participant "HomeKit sens." as HS
participant "Zigbee dev." as ZD participant "MQTT dev." as ZD
participant "Zigbee sens." as ZS participant "MQTT sens." as ZS
end box end box
box "User Interface" box "User Interface"
@ -908,11 +908,11 @@ box "User Interface"
end box end box
box "Users and Devices" box "Users and Devices"
participant "javax.websocket" as WSS
participant "HAP-java" as HAP participant "HAP-java" as HAP
participant "zigbee4java" as ZIG participant "paho.mqtt.java" as ZIG
participant "Engine" as DI participant "Engine" as DI
participant "DB" as DIDB participant "DB" as DIDB
participant "Spring WS API" as WSS
end box end box
box "Triggers and Automations" box "Triggers and Automations"
@ -925,11 +925,15 @@ box "Scenes"
participant "DB" as SCDB participant "DB" as SCDB
end box end box
UI -> DI: request state update UI -> DI: update state (HTTP PUT)
DI -> ZD: apply new state DI -> ZIG: client.publish(\n TOPIC,\n new MqttMessage(...)\n);\n(request state update)
ZD -> DI: report successful application ZIG -> ZD: PUBLISH\n(state update request)
DI -> DIDB: store new state ZD -> ZIG: PUBLISH\n(new state)
DI -> UI: display 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 DI -> T: report latest device state
skinparam monochrome true skinparam monochrome true