From e2ede008d46264ce77be3d37f1e9e7b613572406 Mon Sep 17 00:00:00 2001 From: ds-jhartmann <57985712+ds-jhartmann@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:39:05 +0200 Subject: [PATCH 1/2] chore(docs): add sequence diagrams for improvements in scalability --- .../runtime-view/scaling-edc-processing.puml | 35 ++++++++++++++++++ .../scaling-job-batch-processing.puml | 34 ++++++++++++++++++ .../runtime-view/scaling-job-processing.puml | 36 +++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 docs/src/uml-diagrams/runtime-view/scaling-edc-processing.puml create mode 100644 docs/src/uml-diagrams/runtime-view/scaling-job-batch-processing.puml create mode 100644 docs/src/uml-diagrams/runtime-view/scaling-job-processing.puml diff --git a/docs/src/uml-diagrams/runtime-view/scaling-edc-processing.puml b/docs/src/uml-diagrams/runtime-view/scaling-edc-processing.puml new file mode 100644 index 0000000000..26e20dea5e --- /dev/null +++ b/docs/src/uml-diagrams/runtime-view/scaling-edc-processing.puml @@ -0,0 +1,35 @@ +@startuml +skinparam monochrome true +skinparam shadowing false +skinparam defaultFontName "Architects daughter" + + +autonumber "[00]" + +participant "EDC Client" as IRS +participant "EDC Cache" as edc_cache +participant "EDC" as EDC + +IRS -> EDC: Request Contract Offers {filter": "type=digitalTwinRegistry"} +IRS <-- EDC: Contract Offer + +IRS -> edc_cache: get EDR Token + +group EDC negotiation and transfer process + rnote right edc_cache + replace traditional token negotiation with EDR API + this makes reuse of existing negotiations more efficient + end note + + edc_cache -> EDC: Negotiate Contract for Offer + edc_cache <-- EDC: Contract Negotiation (Contract Agreement ID)) + + edc_cache -> EDC: Initiate Transfer with Agreement ID + edc_cache <-- EDC: Transfer Process ID + + edc_cache <-- EDC : EDR Token callback +end + +IRS <-- edc_cache: EDR Token + +@enduml diff --git a/docs/src/uml-diagrams/runtime-view/scaling-job-batch-processing.puml b/docs/src/uml-diagrams/runtime-view/scaling-job-batch-processing.puml new file mode 100644 index 0000000000..4963437a09 --- /dev/null +++ b/docs/src/uml-diagrams/runtime-view/scaling-job-batch-processing.puml @@ -0,0 +1,34 @@ +@startuml +skinparam monochrome true +skinparam shadowing false +skinparam defaultFontName "Architects daughter" +autonumber "[00]" + +actor IrsApiConsumer + + +box "IRS" #LightGrey + +IrsApiConsumer -> BatchController : POST /irs/orders +rnote left + 200k digital twin ids +end note +IrsApiConsumer <- BatchController : order id + +BatchController --> CreationBatchService: create batches +CreationBatchService -> CreationBatchService: split into parallel executable working packages + +rnote right + Currently this is not limited. + Limit of e.g. 5 jobs in parallel needs to be added. +end note + +loop + rnote right CreationBatchService + sequentially + end note + CreationBatchService -> JobEventLinkedQueueListener: execute working packages + JobEventLinkedQueueListener --> IrsApiConsumer: callback on completed batch +end + +@enduml diff --git a/docs/src/uml-diagrams/runtime-view/scaling-job-processing.puml b/docs/src/uml-diagrams/runtime-view/scaling-job-processing.puml new file mode 100644 index 0000000000..5c58947c2b --- /dev/null +++ b/docs/src/uml-diagrams/runtime-view/scaling-job-processing.puml @@ -0,0 +1,36 @@ +@startuml +skinparam monochrome true +skinparam shadowing false +skinparam defaultFontName "Architects daughter" +autonumber "[00]" + +actor IrsApiConsumer + + +box "IRS" #LightGrey + +IrsApiConsumer -> IrsController : POST /irs/jobs +rnote right IrsApiConsumer + id instead of globalAssetId +end rnote +IrsApiConsumer <- IrsController : job id + +participant "blackbox IRS processing" as irs_process + +IrsController -> irs_process +irs_process -> DTR: get twin by id +rnote right irs_process +1 call instead of 2 +end rnote +irs_process <- DTR: twin + +irs_process -> irs_process: globalAssetId of twin is saved in job response +rnote right irs_process + As is: the id with which the Job was started is saved as globalAssetId in the job + To be: Job contains the globalAssetId instead of the id +end rnote + +IrsApiConsumer -> IrsController : GET /irs/jobs/ +IrsApiConsumer <- IrsController : job + +@enduml From bb8fb3f23fd960680fd4108ed790c381736756a1 Mon Sep 17 00:00:00 2001 From: ds-jhartmann <57985712+ds-jhartmann@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:43:50 +0200 Subject: [PATCH 2/2] chore(docs): add sequence diagrams for improvements in scalability --- .../runtime-view/scaling-job-batch-processing.puml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/uml-diagrams/runtime-view/scaling-job-batch-processing.puml b/docs/src/uml-diagrams/runtime-view/scaling-job-batch-processing.puml index 4963437a09..29c104aeb5 100644 --- a/docs/src/uml-diagrams/runtime-view/scaling-job-batch-processing.puml +++ b/docs/src/uml-diagrams/runtime-view/scaling-job-batch-processing.puml @@ -19,8 +19,8 @@ BatchController --> CreationBatchService: create batches CreationBatchService -> CreationBatchService: split into parallel executable working packages rnote right - Currently this is not limited. - Limit of e.g. 5 jobs in parallel needs to be added. + As is: parallel processes are not limited + To be: limit of e.g. 5 jobs in parallel end note loop