diff --git a/doc/diagrams/yggd-cancel-command.mmd b/doc/diagrams/yggd-cancel-command.mmd new file mode 100644 index 00000000..84f5fd77 --- /dev/null +++ b/doc/diagrams/yggd-cancel-command.mmd @@ -0,0 +1,25 @@ +sequenceDiagram +participant S as server +participant B as broker +participant Y as yggdrasil +participant D as DBus +participant W as workerEcho + +S ->> B: data/in {"type":"data","directive":"echo","message-id": "1-1","content":"aGVsbG8="} +B ->> Y: data/in {ditto} +Y ->> D: Dispatcher method +D ->>+ W: data/in {ditto} +Note right of W: echo proccess +W ->> D: Worker Event {Worker:echo Name:BEGIN} +D ->> Y: Worker Event {Worker:echo Name:BEGIN} +W ->> D: Worker Event {Worker:echo Name:WORKING} +D ->> Y: Worker Event {Worker:echo Name:WORKING} +rect rgb(255, 153, 153) +S ->> B: control/in {"type":"command","directive":"echo","message-id": "1-2","content":{"command":"cancel","arguments":{"directive":"echo","messageID":"1-1"}} +B ->> Y: control/in {ditto} +Y ->> D: Cancel method {"addr":echo, id:1-2, cancel-id:1-1} +D ->> W: Cancel method {"addr":echo, id:1-2, cancel-id:1-1} +Note right of W: Cancel previous echo +end +W ->>- D: Worker Event {Worker:echo Name:END} +D ->> Y: Worker Event {Worker:echo Name:END} diff --git a/doc/diagrams/yggd-connection.mmd b/doc/diagrams/yggd-connection.mmd new file mode 100644 index 00000000..01c5c3ed --- /dev/null +++ b/doc/diagrams/yggd-connection.mmd @@ -0,0 +1,26 @@ +sequenceDiagram +participant S as server +participant B as broker +participant Y as yggdrasil +participant D as DBus +participant W as workerEcho + +par Connect +Y ->> D: Get dispatchers +Y ->> B: connect to broker +Note right of Y: "yggdrasil Set last will (Disconnect)" +Y ->> S: control/out {"type":"connection-status", "dispatchers":{}} +end +par Data Messages +S ->> Y: Data messages +Y ->> W: Data Message +end +par Control Messages +S ->> Y: Control Messages +and +Y ->> S: Event Message +end +par Disconnect +Note right of Y: "yggdrasil Disconnect" +B ->> S: control/out {"type":"connection-status","state":"offline"} +end diff --git a/doc/diagrams/yggd-data.mmd b/doc/diagrams/yggd-data.mmd new file mode 100644 index 00000000..b2867aaa --- /dev/null +++ b/doc/diagrams/yggd-data.mmd @@ -0,0 +1,27 @@ +sequenceDiagram +participant S as server +participant B as broker +participant Y as yggdrasil +participant D as DBus +participant W as workerEcho + +S ->> B: data/in {"type":"data","directive":"echo","content":"aGVsbG8="} +B ->> Y: data/in {ditto} +Y ->> D: Dispatcher method +D ->>+ W: data/in {ditto} +Note right of W: echo proccess +W ->> D: Worker Event {Worker:echo Name:BEGIN} +D ->> Y: Worker Event {Worker:echo Name:BEGIN} +W ->> D: Worker Event {Worker:echo Name:WORKING} +D ->> Y: Worker Event {Worker:echo Name:WORKING} +W ->>- D: data/out message: {"type":"data","directive":"echo","content":"aGVsbG8="} +D ->> Y: data/out message: {"type":"data","directive":"echo","content":"aGVsbG8="} +Y ->> B: data/out {ditto} +B ->> S: data/out {ditto} +W ->> D: Worker Event {Worker:echo Name:END} +D ->> Y: Worker Event {Worker:echo Name:END} +W ->> D: .Propierties Update DispatchedAt feature +D ->> Y: .Propierties Update DispatchedAt feature +Note right of Y: Update status of workers +Y ->> B: control/out {"type":"connection-status","content":{"dispatchers":{"echo":{"DispatchedAt":"date"}} +B ->> S: control/out {ditto}