diff --git a/README.md b/README.md index 1212597..31128f8 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ As long as you can do something as an operator on in a shell on a system you can - [What is it ?](#what-is-it-) - [Disclaimer](#disclaimer) - [Overview](#overview) + - [Example of message flow](#example-of-message-flow) - [Inspiration](#inspiration) - [Why](#why) - [Publishing and Subscribing processes](#publishing-and-subscribing-processes) @@ -161,6 +162,10 @@ A node can be a server running any host operating system, a container living in Steward can be compiled to run on all major architectures like **x86**, **amd64**,**arm64**, **ppc64** and more, with for example operating systems like **Linux**, **OSX**, **Windows**. +### Example of message flow + +![message flow](doc/message-flow.svg) + ## Inspiration The idea for how to handle processes, messages and errors are based on Joe Armstrongs idea behind Erlang described in his Thesis . diff --git a/doc/message-flow.svg b/doc/message-flow.svg new file mode 100644 index 0000000..5d3b8bf --- /dev/null +++ b/doc/message-flow.svg @@ -0,0 +1,4 @@ + + + +


ToNode: Node2
Method: REQHttpGet
MethodArgs: ["https://localhost:80/metrics
Timeout: 10
Retries: 3
ReplyMethod: REQToFile
Directory: node_metrics
FileName: metrics.txt
ToNode: Node2...
OK
OK

Method Accepted 

Method Accepted 

Execute Http Get

Execute Http Get


ToNode: Node-Operator1
Method: REQToFile
Timeout: 10
Retries: 3
Directory: node_metrics
FileName: metrics.txt
ToNode: Node-Operator1...

Node2:
Read Message

Node2:...

Send ACK for delivered

Send ACK for delivered


ToNode: Node-Operator1
ACK
ToNode: Node-Operator1...
NOK
NOK
OK
OK


ToNode: ErrorKernel
Method: Log the error
Data: Method not accepted
ToNode: ErrorKernel...
NOK
NOK


ToNode: ErrorKernel
Method: Log the error
Data: Method failed
ToNode: ErrorKernel...
NOK
NOK


ToNode: ErrorKernel
Method: Log the error
Data: Read msg failed
ToNode: ErrorKernel...
NOK
NOK


ToNode: ErrorKernel
Method: Log the error
Data: Send ACK failed
ToNode: ErrorKernel...
NOK
NOK

Send Repply Message

Send Repply Message

Wait for ACK
Timeout >= Message.Timeout

Wait for ACK...

Done

Done

Retires <= Message.Retry

Retires <= Message.Retry
NOK
NOK


ToNode: Node-Operator1
ACK
ToNode: Node-Operator1...
NOK
NOK
OK
OK

Method Accepted 

Method Accepted 

Execute Method:

Create diretory node_metrics/Node2/
Write result to <directory>/metrics.txt

Execute Method:...
OK
OK

Node-Operator1:
Read Message

Node-Operator1:...

Send ACK for delivered

Send ACK for delivered


ToNode: ErrorKernel
Method: Log the error
Data: Method not accepted
ToNode: ErrorKernel...


ToNode: ErrorKernel
Method: Log the error
Data: Method failed
ToNode: ErrorKernel...


ToNode: ErrorKernel
Method: Log the error
Data: Read msg failed
ToNode: ErrorKernel...


ToNode: ErrorKernel
Method: Log the error
Data: Semd ACK failed
ToNode: ErrorKernel...


ToNode: ErrorKernel
Audit log
ToNode: ErrorKernel...
OK
OK
OK
OK
OK
OK
NOK
NOK


ToNode: ErrorKernel
Data: Max Retries
ToNode: ErrorKernel...
NOK
NOK
OK
OK
OK
OK

Node-Operator1: Send Message

Node-Operator1: Send Message

Wait for ACK
Timeout >= Message.Timeout

Wait for ACK...

Done

Done

Retires <= Message.Retry

Retires <= Message.Retry


ToNode: ErrorKernel
Audit log
ToNode: ErrorKernel...
OK
OK
NOK
NOK


ToNode: ErrorKernel
Data: Max Retries
ToNode: ErrorKernel...
NOK
NOK
NOK
NOK
NOK
NOK
NOK
NOK
OK
OK
NOK
NOK
OK
OK

Done

Done
New message from Operator
Get Metrics from Node2
New message from Operator...
Text is not SVG - cannot display
\ No newline at end of file