Skip to content

Commit

Permalink
docs: Added a diagram directory
Browse files Browse the repository at this point in the history
Added this directory to tack the protocol diagrams.
Initial added:
- Connection
- Data message Echo worker
- Cancel message echo worker

Signed-off-by: Alba Hita Catala <ahitacat@redhat.com>
  • Loading branch information
ahitacat authored and subpop committed Oct 25, 2023
1 parent 5130298 commit e5ae5b0
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
25 changes: 25 additions & 0 deletions doc/diagrams/yggd-cancel-command.mmd
Original file line number Diff line number Diff line change
@@ -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}
26 changes: 26 additions & 0 deletions doc/diagrams/yggd-connection.mmd
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions doc/diagrams/yggd-data.mmd
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit e5ae5b0

Please sign in to comment.