Skip to content

Commit

Permalink
Update UML diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
ar-siddiqui committed Oct 10, 2023
1 parent 2bc2a14 commit 78eb880
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 29 deletions.
14 changes: 10 additions & 4 deletions imgs/umls/sequence-diagrams/async-job.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ participant User
participant Server
entity Job
participant "Execution\nPlatform"
database Database
participant Storage

User -> Server: Submit async Job
Expand All @@ -34,15 +33,22 @@ Server --> User: Respond with status
deactivate Server

...
"Execution\nPlatform" -> Job: Notify Job finished
"Execution\nPlatform" -> Job: Notify Job Finished
deactivate "Execution\nPlatform"
Job -> Database: Store Logs

note over Job: Job close routine starts

Job -> "Execution\nPlatform": Fetch Container logs
Job -> Storage: Write Container logs
note over Job, "Execution\nPlatform": Job is removed from Active Jobs store, results available
Job -> Storage: Write Metadata

Job -> Storage: Write logs (Container & Server)
deactivate Job

User -> Server: Request results after Job is finished
activate Server
Server -> Database: Fetch results
Server -> Storage: Fetch results
Server --> User: Respond with results
deactivate Server

Expand Down
7 changes: 4 additions & 3 deletions imgs/umls/sequence-diagrams/dismiss.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ participant User
participant Server
entity Job
participant "Execution\nPlatform"
database Database
participant Storage

User -> Server: Submit async job
activate Server
Expand All @@ -37,12 +37,13 @@ Server --> User: Job dismissed
deactivate Server

note over Job: Start job close routine.
note over Job, "Execution\nPlatform": Job is removed from Active Jobs Store.\nFrom the perspective of API it does not\nmatter what happens to the cloud job.

deactivate "Execution\nPlatform"

Job -> Database: Store logs
Job -> Storage: Write logs
deactivate Job

note over Job, "Execution\nPlatform": Job is removed from Active Jobs Store.\nFrom the perspective of API it does not\nmatter what happens to the cloud job.

User -> Server: Request dismiss after job is finished
activate Server
Expand Down
27 changes: 17 additions & 10 deletions imgs/umls/sequence-diagrams/logs.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ participant User
participant Server
entity Job
participant "Execution\nPlatform"
database Database
participant Disk
participant Storage


User -> Server: Submit async job
activate Server
Expand All @@ -25,31 +27,36 @@ Job --> Server: Return acknowledgment
Server --> User: Respond with Created status
deactivate Server

note over Job: Logging takes place throughout the Job's lifecycle
Job -> Job: Log messages (Server Logs)
note over Job, Disk: Logging takes place throughout the Job's lifecycle
Job -> Disk: Log messages (Server Logs)

User -> Server: Request logs for active job
activate Server
Server -> Job: Fetch logs
Server -> Job: Update container logs
Job -> "Execution\nPlatform": Fetch Container logs
"Execution\nPlatform" --> Job: Return Container logs
Job --> Server: Return combined logs (Container + Server)
Job -> Disk: Write Container logs
Server -> Disk: Fetch combined logs (Container + Server)
Disk --> Server: Return combined logs
Server --> User: Respond with logs
deactivate Server

"Execution\nPlatform" -> Job: Notify Job Finished
deactivate "Execution\nPlatform"

note over Job: Job close routine starts
Job -> Database: Store combined logs (Container + Server)

Job -> "Execution\nPlatform": Fetch Container logs
Job -> Disk: Write Container logs
note over Job, "Execution\nPlatform": Job is removed from Active Jobs store but it continue to wait for other routines\nsuch as Metadata to finish, as other routines can still log messages

Disk -> Storage: Move logs to Storage

note over Job: Job is removed from Active Jobs store
deactivate Job

User -> Server: Request logs for completed job
activate Server
Server -> Database: Fetch stored logs
Database --> Server: Return combined logs (Container + Server)
Server -> Storage: Fetch stored logs
Storage --> Server: Return combined logs
Server --> User: Respond with logs
deactivate Server

Expand Down
14 changes: 7 additions & 7 deletions imgs/umls/sequence-diagrams/results.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ participant User
participant Server
entity Job
participant "Execution\nPlatform"
database Database
participant Storage

User -> Server: Submit async job
activate Server
Expand All @@ -35,22 +35,22 @@ deactivate Server

"Execution\nPlatform" -> Job: Notify Job Finished
deactivate "Execution\nPlatform"
note over Job: At this point, the job might be successful,\nbut results might not be ready.
note over Job: At this point, the job might be successful,\nbut results are not ready.

Job -> "Execution\nPlatform": Fetch Container logs
"Execution\nPlatform" --> Job: Return Container logs
Job -> Storage: Write Container logs
note over Job, "Execution\nPlatform": Job is removed from Active Jobs store, results available

Job -> Database: Store Container logs
Job -> Storage: Write logs

note over Job: Job is removed from Active Jobs Store
deactivate Job

User -> Server: Request results after job is finished
activate Server
Server -> Job: Check job is active
Job --> Server: Job is inactive
Server -> Database: Fetch Container logs
Database --> Server: Return Container logs
Server -> Storage: Fetch Container logs
Storage --> Server: Return Container logs
Server -> Server: Parse last log
Server --> User: Respond with results
deactivate Server
Expand Down
15 changes: 10 additions & 5 deletions imgs/umls/sequence-diagrams/sync-job.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ participant User
participant Server
entity Job
participant "Execution\nPlatform"
database Database
participant Storage

User -> Server: Submit sync Job
Expand All @@ -26,13 +25,19 @@ activate "Execution\nPlatform"
... ...
"Execution\nPlatform" -> Job: Notify Job finished
deactivate "Execution\nPlatform"
Job -> Database: Store Logs
Job -> Storage: Write Metadata
note over Job: Job close routine starts

Job -> "Execution\nPlatform": Fetch Container logs
Job -> Storage: Write Container logs
note over Job, "Execution\nPlatform": Job is removed from Active Jobs store, results available
Job --> Server: Job Finished
deactivate Job

Server -> Database: Fetch results
Server -> Storage: Fetch results
Server --> User: Respond with results
deactivate Server

Job -> Storage: Write Metadata
Job -> Storage: Write logs (Container & Server)
deactivate Job

@enduml

0 comments on commit 78eb880

Please sign in to comment.