From 78eb8808ccdfc3c348fbba5153ddaa1a02751d85 Mon Sep 17 00:00:00 2001 From: Abdul Raheem Siddiqui Date: Tue, 10 Oct 2023 14:30:43 -0400 Subject: [PATCH] Update UML diagrams --- imgs/umls/sequence-diagrams/async-job.puml | 14 +++++++---- imgs/umls/sequence-diagrams/dismiss.puml | 7 +++--- imgs/umls/sequence-diagrams/logs.puml | 27 ++++++++++++++-------- imgs/umls/sequence-diagrams/results.puml | 14 +++++------ imgs/umls/sequence-diagrams/sync-job.puml | 15 ++++++++---- 5 files changed, 48 insertions(+), 29 deletions(-) diff --git a/imgs/umls/sequence-diagrams/async-job.puml b/imgs/umls/sequence-diagrams/async-job.puml index a6e4df6..13a97ac 100644 --- a/imgs/umls/sequence-diagrams/async-job.puml +++ b/imgs/umls/sequence-diagrams/async-job.puml @@ -7,7 +7,6 @@ participant User participant Server entity Job participant "Execution\nPlatform" -database Database participant Storage User -> Server: Submit async Job @@ -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 diff --git a/imgs/umls/sequence-diagrams/dismiss.puml b/imgs/umls/sequence-diagrams/dismiss.puml index 1db519a..36e87f1 100644 --- a/imgs/umls/sequence-diagrams/dismiss.puml +++ b/imgs/umls/sequence-diagrams/dismiss.puml @@ -11,7 +11,7 @@ participant User participant Server entity Job participant "Execution\nPlatform" -database Database +participant Storage User -> Server: Submit async job activate Server @@ -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 diff --git a/imgs/umls/sequence-diagrams/logs.puml b/imgs/umls/sequence-diagrams/logs.puml index 1b615c2..6177f26 100644 --- a/imgs/umls/sequence-diagrams/logs.puml +++ b/imgs/umls/sequence-diagrams/logs.puml @@ -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 @@ -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 diff --git a/imgs/umls/sequence-diagrams/results.puml b/imgs/umls/sequence-diagrams/results.puml index 546b6f4..aa10894 100644 --- a/imgs/umls/sequence-diagrams/results.puml +++ b/imgs/umls/sequence-diagrams/results.puml @@ -11,7 +11,7 @@ participant User participant Server entity Job participant "Execution\nPlatform" -database Database +participant Storage User -> Server: Submit async job activate Server @@ -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 diff --git a/imgs/umls/sequence-diagrams/sync-job.puml b/imgs/umls/sequence-diagrams/sync-job.puml index 2acc9b9..c00ab69 100644 --- a/imgs/umls/sequence-diagrams/sync-job.puml +++ b/imgs/umls/sequence-diagrams/sync-job.puml @@ -7,7 +7,6 @@ participant User participant Server entity Job participant "Execution\nPlatform" -database Database participant Storage User -> Server: Submit sync Job @@ -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 \ No newline at end of file