-
Notifications
You must be signed in to change notification settings - Fork 5
System diagrams #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
PawelPlesniak
wants to merge
4
commits into
develop
Choose a base branch
from
PawelPlesniak/SystemDiagrams
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
System diagrams #462
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ```mermaid | ||
| --- | ||
| id: d0abd951-f88e-487f-a1a3-1c11060408d8 | ||
| --- | ||
| sequenceDiagram | ||
| participant U2 as User 2 | ||
| participant U1 as User 1 | ||
| participant C as Controller | ||
| participant A1 as Authenticator | ||
| participant A2 as Authorizer | ||
|
|
||
| U1 ->> C: Surrender control | ||
| C ->> A1: Check user <br> authentication <br> with token | ||
| A1 ->> C: Authentication <br> result | ||
| C ->> A2: Check user <br> authorization <br> with username | ||
| A2 ->> C: Authorization <br> result | ||
| Note over C: Remove User 1 <br> as actor | ||
| C ->> U1: Notification: Control surrendered | ||
| C ->> U1: WhoIsInCharge | ||
| C ->> U2: WhoIsInCharge | ||
| U2 ->> C: Take control | ||
| Note over C: Assign User 2 <br> as actor | ||
| ``` | ||
57 changes: 57 additions & 0 deletions
57
docs/diagrams/ActionDiagrams/AuthorizationAuthentication.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # General command excecution | ||
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant PartM as Partition <br> Manager | ||
| participant GUI | ||
| participant PO as Process <br> Orchestrator | ||
| participant TC as Top <br> Controller | ||
| participant A as Apps | ||
|
|
||
| User ->> PartM: Boot | ||
| PartM ->> GUI: Start new GUI | ||
| Note over GUI: c'tor command sender | ||
| Note over GUI: c'tor status listener | ||
| GUI ->> GUI: Listen for notifications | ||
| GUI ->> PartM: Notify c'tor complete | ||
|
|
||
| PartM ->> PO: Boot session | ||
| Note over PO: c'tor status notifier | ||
| PO ->> GUI: Handshake | ||
| PO ->> PartM: Handshake | ||
| Note over PO: c'tor command receiver | ||
| PO ->> PO: Listen for notifications | ||
| PO ->> TC: Boot top controller | ||
| Note over TC: c'tor status notifier | ||
| Note over TC: c'tor command receiver | ||
| TC ->> TC: Wait for commands | ||
| Note over TC: c'tor FSM | ||
| Note over TC: c'tor status listener | ||
| TC ->> TC: Listen for notifications | ||
| TC ->> A: Boot applications and controllers | ||
| Note over A: c'tor | ||
| A ->> TC: Handshake | ||
| A ->> TC: Notification: boot complete | ||
| Note over TC: c'tor command sender | ||
| TC ->> PO: Notification: boot complete | ||
| PO ->> PartM: Notification: boot complete | ||
|
|
||
| PartM ->> User: Redirect User to GUI | ||
| ``` | ||
|
|
||
| # List available commands | ||
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant C as Controller | ||
| participant A1 as Authenticator | ||
| participant A2 as Authorizer | ||
|
|
||
| User ->> C: Command request list | ||
| C ->> A1: Check user <br> authentication <br> with token | ||
| A1 ->> C: Authentication <br> result | ||
| C ->> A2: Check user <br> authorized actions <br> with username | ||
| A2 ->> C: Return user <br> authorized actions | ||
| C ->> User: Command list | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant PartM as Partition <br> Manager | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eugh... This isn't the correct terminology. I think this is now the Session Manager |
||
| participant GUI | ||
| participant PO as Process <br> Orchestrator | ||
| participant TC as Top <br> Controller | ||
| participant A as Apps | ||
|
|
||
| User ->> PartM: Boot | ||
| PartM ->> GUI: Start new GUI | ||
| Note over GUI: c'tor command sender | ||
| Note over GUI: c'tor status listener | ||
| GUI ->> GUI: Listen for notifications | ||
| GUI ->> PartM: Notify c'tor complete | ||
|
|
||
| PartM ->> PO: Boot session | ||
| Note over PO: c'tor status notifier | ||
| PO ->> GUI: Handshake | ||
| PO ->> PartM: Handshake | ||
| Note over PO: c'tor command receiver | ||
| PO ->> PO: Listen for notifications | ||
| PO ->> TC: Boot top controller | ||
| Note over TC: c'tor status notifier | ||
| Note over TC: c'tor command receiver | ||
| TC ->> TC: Wait for commands | ||
| Note over TC: c'tor FSM | ||
| Note over TC: c'tor status listener | ||
| TC ->> TC: Listen for notifications | ||
| TC ->> A: Boot applications and controllers | ||
| Note over A: c'tor | ||
| A ->> TC: Handshake | ||
| A ->> TC: Notification: boot complete | ||
| Note over TC: c'tor command sender | ||
| TC ->> PO: Notification: boot complete | ||
| PO ->> PartM: Notification: boot complete | ||
|
|
||
| PartM ->> User: Redirect User to GUI | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant TC as Top <br> Controller | ||
| participant SC as Subcontroller | ||
| participant A as App | ||
|
|
||
| User ->> TC: Send FSM command | ||
| Note over TC: FSM command received | ||
| Note over TC: Verify transition <br> available from <br> current state | ||
| TC ->> User: Notify invalid transition | ||
| Note right of TC: If transition <br> invalid | ||
|
|
||
| Note over TC: Pre-transition <br> sequence <br> e.g. run_number | ||
| TC ->> SC: Forward command | ||
|
|
||
| Note over SC: Verify transition <br> available from <br> current state | ||
| SC ->> TC: Notify invalid transition | ||
| Note right of SC: If transition <br> invalid | ||
|
|
||
| SC ->> A: Forward command | ||
| Note over A: Execute commnad | ||
| A ->> SC: Notification: completed | ||
|
|
||
| Note over SC: Post transition <br> sequence e.g. <br> pin_thread | ||
| SC ->> TC: Notify completed | ||
|
|
||
| Note over TC: Post transition <br> sequence e.g. <br> ELISA logbook | ||
| TC ->> User: Notification: completed | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant AuthDB as Authorization and <br> authentication <br> database | ||
| participant ConfDB as Configuration <br> database | ||
| participant ResDB as Resource <br> database | ||
|
|
||
| Note over User: Request partition | ||
| User ->> AuthDB: Check Authorization | ||
| AuthDB ->> User: Return Authorization | ||
| Note right of User: If unautorized, <br> rejest request <br> and notify user | ||
|
|
||
| Note over User: Request configuration | ||
| User ->> ConfDB: Request configuration | ||
| ConfDB ->> User: Return configuration | ||
| User ->> ResDB: Check required <br> resource availability | ||
| ResDB ->> User: Return resource <br> availability | ||
| Note right of User: If unautorized, <br> rejest configuration <br> and notify user | ||
|
|
||
| Note over User: Choose apps/controllers to include/exclude | ||
|
|
||
| Note over User: Boot session | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant PO as Process <br> Orchestrator | ||
| participant TC as Top <br> Controller | ||
| participant SC as Sub <br> Controller | ||
| participant A as App | ||
|
|
||
| User ->> PO: Send `terminate` | ||
| PO ->> A: Send `SIGHUP` | ||
| A ->> PO: Notification: <br> terminate complete | ||
| PO ->> SC: Send `SIGHUP` | ||
| SC ->> PO: Notification: <br> terminate complete | ||
| PO ->> TC: Send `SIGHUP` | ||
| TC ->> PO: Notification: <br> terminate complete | ||
| PO ->> User: Redirect to <br> partition handler | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant RC as Run <br> Control | ||
| participant PartM as Partition <br> Manager | ||
| participant App | ||
|
|
||
| User ->> RC: Request end of partition | ||
| RC ->> PartM: Terminate partition | ||
| PartM ->> RC: Kill TopNodeController, d'tor | ||
| RC ->> RC: Kill subcontroller, d'tor | ||
| RC ->> App: Kill application, d'tor | ||
| App ->> PartM: Notify complete | ||
| PartM ->> User: Notify complete | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ```mermaid | ||
| sequenceDiagram | ||
| participant User | ||
| participant TC as Top <br> Controller | ||
| participant SC as Sub <br> Controller | ||
| participant A as App | ||
|
|
||
| User ->> TC: Send `terminate` | ||
| Note over TC: `terminate` received | ||
| TC ->> SC: Forward `terminate` | ||
| Note over SC: `terminate` received | ||
| SC ->> A: Forward `terminate` | ||
| Note over A: d'tor | ||
| A ->> SC: Notification: `terminate` complete | ||
| Note over SC: d'tor | ||
| SC ->> TC: Notification: `terminate` complete | ||
| Note over TC: d'tor | ||
| TC ->> User: Notification: `terminate` complete | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Module: `unified_shell` | ||
|
|
||
| ::: mymodule | ||
| handler: python | ||
|
|
||
| ## unified_shell() | ||
| ```mermaid | ||
| flowchart TD | ||
| A[drunc_unified_shell <opts> <args>] --> B[Setup unified_shell logger with RichHandler] | ||
| B --> C[Check if need to spawn process manager or not by scheme] | ||
| C --> D[Setup logging to the process manager log file] | ||
| E --> F{Is process <br> manager running} | ||
| F -- Yes --> G | ||
| F -- No --> H | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.