Architecture and sequence templates
Diagrams from the course outline. Expand the Mermaid source below each diagram to copy and adapt it to the implementation. On small screens, scroll across a diagram to see all participants.
Cumulative architecture
Mermaid source
mermaid
flowchart TB
Client[Client / Test Runner] --> Gateway[NGINX API Gateway]
Gateway --> Order1[Order API 1]
Gateway --> Order2[Order API 2]
Gateway --> Restaurant[Restaurant API]
Order1 --> OrderDB[(Order DB)]
Order2 --> OrderDB
Order1 --> MQ[(RabbitMQ)]
MQ --> Payment[Payment Worker]
MQ --> Notification[Notification Worker]
Payment --> MQ
MQ --> Delivery[Delivery Coordinator]
Delivery --> Replica1[(Delivery Primary)]
Replica1 --> Replica2[(Replica 2)]
Replica1 --> Replica3[(Replica 3)]Checkout event sequence
Mermaid source
mermaid
sequenceDiagram
participant Client
participant N as NGINX
participant O as Order API
participant Q as RabbitMQ
participant P as Payment Worker
Client->>N: POST /orders
N->>O: Forward request
O->>O: Persist PENDING order
O-->>Client: 202 Accepted + order_id
O->>Q: OrderCreated (event_id)
Q->>P: Deliver event
P->>P: Durable idempotent payment result
P->>Q: Publish PaymentProcessed
P-->>Q: ACK after processingUsing the templates
Use the flowchart in Lecture 2 for container boundaries and in Lecture 6 for replication edges. Use the sequence diagram in Lecture 3 for ACK boundaries and in Lecture 4 for idempotency and compensation. Submit an updated diagram with Assignment 6.