From 2146fbab9af9c318a51c14310c2fcebda791b6d7 Mon Sep 17 00:00:00 2001 From: Lennart Heinrich Date: Thu, 11 Dec 2025 20:09:44 +0100 Subject: [PATCH] split messaging sequence diagram --- plantuml/messaging-sequence-left.puml | 74 ++++++++++++++++++++++++++ plantuml/messaging-sequence-right.puml | 38 +++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 plantuml/messaging-sequence-left.puml create mode 100644 plantuml/messaging-sequence-right.puml diff --git a/plantuml/messaging-sequence-left.puml b/plantuml/messaging-sequence-left.puml new file mode 100644 index 0000000..3a3d533 --- /dev/null +++ b/plantuml/messaging-sequence-left.puml @@ -0,0 +1,74 @@ +@startuml Messaging Sequenzdiagramm Links + +group "Backend: Request produzieren und warten" + +Endpoint -> RequestReply: request(cmdW) + +RequestReply -> AtomicReference : <> +RequestReply <-- AtomicReference : responseRef + +RequestReply -> RequestReply : responses.put(\nrequestId,\nresponseRef) + +RequestReply -> Kafka: produce(cmdW) +RequestReply <-- Kafka : Ack + +RequestReply -> AtomicReference : wait() + +end + +note over Kafka : asynchron + +group "Persistence: Request konsumieren und enqueuen" + +Quarkus -> Kafka: poll() +Quarkus <-- Kafka: cmdW + +Quarkus -> CommandObserver: process(cmdW) + +CommandObserver -> Transaction: get(txId) +CommandObserver <-- Transaction: tx + +CommandObserver -> Transaction: queue(tx, cmdW) +CommandObserver <-- Transaction + +Quarkus <-- CommandObserver +Kafka <-- Quarkus : Ack + +end + +note over Transaction : asynchron + +... Persistence: Request verarbeiten und Response produzieren\n(siehe weiteres Sequenzdiagramm) ... + +note over Kafka : asynchron + +group "Backend: Response konsumieren und benachrichtigen" + +RequestReply -> Kafka : poll() +RequestReply <-- Kafka : respW + +RequestReply -> RequestReply : responses.get(requestId) + +RequestReply -> AtomicReference : set(respW) +RequestReply <-- AtomicReference + +RequestReply -> AtomicReference : notifyAll() +RequestReply <-- AtomicReference + +end + +note over RequestReply : asynchron + +group "Backend: Response zu Request zurückgeben" [synchron nach 1. Block, siehe oben] + +RequestReply <-- AtomicReference : wegen wait (siehe oben) + +RequestReply -> AtomicReference : get() +RequestReply <-- AtomicReference : respW + +Endpoint <-- RequestReply : respW + +end + +@enduml + diff --git a/plantuml/messaging-sequence-right.puml b/plantuml/messaging-sequence-right.puml new file mode 100644 index 0000000..1d5decd --- /dev/null +++ b/plantuml/messaging-sequence-right.puml @@ -0,0 +1,38 @@ +@startuml Messaging Sequenzdiagramm Rechts + +participant Kafka + +group "Persistence: Request verarbeiten und Response produzieren" + +Transaction -> CommandWrapper : process(cmdW) +CommandWrapper -> Command : <>\ndeserialize(cmdW) +CommandWrapper <-- Command : cmd + +CommandWrapper -> Command : process(cmd) + +Command -> CDI : select(Class) +Command <-- CDI : Processor + +Command -> Processor : process(cmd) +note over Processor : Verarbeitung\ndes Commands +Command <-- Processor : resp + +CommandWrapper <-- Command : resp +Transaction <-- CommandWrapper : resp + +Transaction -> CommandResponse : serialize(resp).copyIds(cmdW) +Transaction <-- CommandResponse : respW + +Transaction -> Interceptor : intercept(respW) +note over Interceptor : (asynchron;\nDetails nicht\ndargestellt) +Transaction <-- Interceptor + +Transaction -> Transaction : commit() + +Transaction -> Kafka : produce(respW) +Transaction <-- Kafka : Ack + +end + +@enduml +