Skip to content

Sequence diagrams

Every file in crates/merlion-render/tests/fixtures/sequence/. Participants keep their source order, and every message, note and fragment sits where the source puts it, so a sequence repeats byte for byte without a layout hint.

The five llm- sources carry the mistakes a language model makes, such as a message with no :, a fragment left open or a stray end, and render through the parser’s repairs.

Incident escalation A failing health check pages the on-call engineer, who acknowledges within five minutes or the page escalates to the secondary. altacknowledgedwithin 5 minutesnoacknowledgement Health probeHealth probe PagerPager Primary on-callPrimary on-call Secondaryon-callSecondaryon-call The all-clearcloses theincident for both health checkfailed 3 times in arow page(sev 2) ack escalate(sev 2) ack
Incident escalation
Diagram source
sequenceDiagram
%% The on-call path, from page to all-clear.
accTitle: Incident escalation
accDescr {
A failing health check pages the on-call engineer, who acknowledges within
five minutes or the page escalates to the secondary.
}
participant Probe as Health probe # the /healthz poller, every 10s
participant Pager
actor Primary as Primary on-call
actor Secondary as Secondary on-call
Probe->>Pager: health check failed 3 times in a row
Pager->>+Primary: page(sev 2)
alt acknowledged within 5 minutes
Primary-->>-Pager: ack
else no acknowledgement
Pager->>Secondary: escalate(sev 2)
Secondary-->>Pager: ack
end
Note over Primary,Secondary: The all-clear closes the incident for both
Sequence diagram Sequence diagram. 4 participants, 7 messages. Participants: Planner, Executor, Sandbox, Judge model (Model). 1. Planner → Executor: run(plan 3 steps) loop per step: 2. Executor → Sandbox: exec(step) alt exit 0: 3. Sandbox --> Executor: stdout, 40ms else non-zero exit: 4. Sandbox --> Executor: exit 1, stderr 5. Executor → Judge model: repair(step, stderr) 6. Judge model --> Executor: patched step 7. Executor --> Planner: 3 of 3 steps green Note over Planner,Judge model: A repaired step is rerun once before the plan fails loopper step altexit 0non-zero exit PlannerPlanner ExecutorExecutor SandboxSandbox Judge modelJudge model A repaired step is rerun oncebefore the plan fails run(plan 3 steps) exec(step) stdout, 40ms exit 1, stderr repair(step, stderr) patched step 3 of 3 steps green
Diagram source
sequenceDiagram
participant Planner
participant Executor
participant Sandbox@{ "type": "boundary" }
participant Model as Judge model
Planner->>Executor: run(plan 3 steps)
loop per step
Executor->>+Sandbox: exec(step)
alt exit 0
Sandbox-->>-Executor: stdout, 40ms
else non-zero exit
Sandbox--xExecutor: exit 1, stderr
Executor->>+Model: repair(step, stderr)
Model-->>-Executor: patched step
end
end
Executor-->>Planner: 3 of 3 steps green
Note over Planner,Model: A repaired step is rerun once before the plan fails
Sequence diagram Sequence diagram. 3 participants, 7 messages. Participants: Client, Gateway, Upstream. 1. Client → Gateway: GET /v1/reports loop Up to 4 attempts, 100ms doubling: 2. Gateway → Upstream: GET /reports alt 200 OK: 3. Upstream --> Gateway: 12 KiB of JSON else 503 Service Unavailable: 4. Upstream --> Gateway: connection reset 5. Gateway → Gateway: sleep(backoff) break attempts exhausted: 6. Gateway --> Client: 504 Gateway Timeout 7. Gateway --> Client: 200 OK loopUp to 4 attempts, 100msdoubling alt200 OK503 Service Unavailable breakattempts exhausted ClientClient GatewayGateway UpstreamUpstream GET /v1/reports1 GET /reports2 12 KiB of JSON3 connection reset4 sleep(backoff)5 504 Gateway Timeout6 200 OK7
Diagram source
sequenceDiagram
autonumber 1 1
participant Client
participant Gateway
participant Upstream
Client->>+Gateway: GET /v1/reports
loop Up to 4 attempts, 100ms doubling
Gateway->>+Upstream: GET /reports
alt 200 OK
Upstream-->>-Gateway: 12 KiB of JSON
else 503 Service Unavailable
Upstream--xGateway: connection reset
Gateway->>Gateway: sleep(backoff)
end
end
break attempts exhausted
Gateway-->>Client: 504 Gateway Timeout
end
Gateway-->>-Client: 200 OK
Sequence diagram Sequence diagram. 2 participants, 18 messages. Participants: A, B. 1. A — B: solid, no head 2. A --> B: dotted, no head 3. A → B: solid, filled head 4. A --> B: dotted, filled head 5. A ↔ B: solid, filled both ends 6. A --> B: dotted, filled both ends 7. A → B: solid, cross 8. A --> B: dotted, cross 9. A → B: solid, async 10. A --> B: dotted, async 11. A → B: solid, half top 12. A → B: solid, half bottom 13. A → B: solid, stick top 14. A → B: solid, stick bottom 15. A ← B: reverse half top 16. A ← B: reverse half bottom 17. A ← B: reverse stick top 18. A ← B: reverse stick bottom AA BB solid, no head dotted, no head solid, filled head dotted, filled head solid, filled both ends dotted, filled both ends solid, cross dotted, cross solid, async dotted, async solid, half top solid, half bottom solid, stick top solid, stick bottom reverse half top reverse half bottom reverse stick top reverse stick bottom
Diagram source
sequenceDiagram
participant A
participant B
A->B: solid, no head
A-->B: dotted, no head
A->>B: solid, filled head
A-->>B: dotted, filled head
A<<->>B: solid, filled both ends
A<<-->>B: dotted, filled both ends
A-xB: solid, cross
A--xB: dotted, cross
A-)B: solid, async
A--)B: dotted, async
A-|\B: solid, half top
A-|/B: solid, half bottom
A-\\B: solid, stick top
A-//B: solid, stick bottom
A/|-B: reverse half top
A\|-B: reverse half bottom
A//-B: reverse stick top
A\\-B: reverse stick bottom
Sequence diagram Sequence diagram. 5 participants, 7 messages. Participants: API, Queue, Thumbnailer, Indexer, Object store (Bucket). 1. API → Queue: publish(upload.created) par thumbnail: 2. Queue → Thumbnailer: upload.created 3. Thumbnailer → Object store: PUT /thumbs/{id}.webp and index: 4. Queue → Indexer: upload.created 5. Indexer → Object store: HEAD /uploads/{id} Note over Thumbnailer,Indexer: Both consumers ack independently 6. Thumbnailer --> Queue: ack 7. Indexer --> Queue: ack Ingest Workers parthumbnailindex APIAPI QueueQueue ThumbnailerThumbnailer IndexerIndexer Object storeObject store Both consumers ackindependently publish(upload.created) upload.created PUT /thumbs/{id}.webp upload.created HEAD /uploads/{id} ack ack
Diagram source
sequenceDiagram
box rgb(232, 240, 254) Ingest
participant API
participant Queue@{ "type": "queue" }
end
box transparent Workers
participant Thumbnailer
participant Indexer
end
participant Bucket@{ "type": "database" } as Object store
API-)Queue: publish(upload.created)
par thumbnail
Queue-)Thumbnailer: upload.created
Thumbnailer->>Bucket: PUT /thumbs/{id}.webp
and index
Queue-)Indexer: upload.created
Indexer->>Bucket: HEAD /uploads/{id}
end
Note over Thumbnailer,Indexer: Both consumers ack independently
Thumbnailer--)Queue: ack
Indexer--)Queue: ack
Device authorisation grant Sequence diagram. 4 participants, 10 messages. Participants: User, Device CLI (CLI), Auth server (Auth), Token store (Store). 1. User → Device CLI: merlion login 2. Device CLI → Auth server: POST /device/code 3. Auth server --> Device CLI: user_code, verification_uri, interval=5s Note over User,Device CLI: The CLI prints the code and waits 4. User → Auth server: Opens the verification page and approves loop Every 5s until approved or expired: 5. Device CLI → Auth server: POST /token (grant_type=device_code) alt still pending: 6. Auth server --> Device CLI: 400 authorization_pending else approved: 7. Auth server → Token store: Persist refresh token 8. Token store --> Auth server: ok 9. Auth server --> Device CLI: access_token, refresh_token 10. Device CLI → User: Signed in as user@example.com loopEvery 5s until approved orexpired altstill pendingapproved UserUser Device CLIDevice CLI Auth serverAuth server Token storeToken store The CLI prints the code andwaits merlion login1 POST /device/code2 user_code, verification_uri,interval=5s3 Opens the verification pageand approves4 POST /token(grant_type=device_code)5 400 authorization_pending6 Persist refresh token7 ok8 access_token, refresh_token9 Signed in asuser@example.com10
Device authorisation grant
Diagram source
---
title: Device authorisation grant
---
sequenceDiagram
autonumber
actor User
participant CLI as Device CLI
participant Auth@{ "type": "boundary", "alias": "Auth server" }
participant Store@{ "type": "database" } as Token store
User->>CLI: merlion login
CLI->>+Auth: POST /device/code
Auth-->>-CLI: user_code, verification_uri, interval=5s
Note over User,CLI: The CLI prints the code and waits
User->>Auth: Opens the verification page and approves
loop Every 5s until approved or expired
CLI->>+Auth: POST /token (grant_type=device_code)
alt still pending
Auth-->>CLI: 400 authorization_pending
else approved
Auth->>+Store: Persist refresh token
Store-->>-Auth: ok
Auth-->>-CLI: access_token, refresh_token
end
end
CLI->>User: Signed in as user@example.com
Sequence diagram Sequence diagram. 3 participants, 5 messages. Participants: Cron, Reporter, Mailer. 1. Cron → Reporter: build(weekly digest) 2. Reporter → Reporter: aggregate 14 sources 3. Reporter → Mailer: Send the digest to every subscriber of the weekly report 4. Mailer --> Cron: queued 4 812 messages 5. Cron → Reporter: build(daily digest) CronCron ReporterReporter MailerMailer build(weekly digest) aggregate 14 sources Send the digest to everysubscriber of the weeklyreport queued 4 812 messages build(daily digest)
Diagram source
sequenceDiagram
autonumber 10 5
participant Cron
participant Reporter
participant Mailer
Cron->>Reporter: build(weekly digest)
Reporter->>Reporter: aggregate 14 sources
Reporter->>Mailer:wrap: Send the digest to every subscriber of the weekly report
Mailer-->>Cron:nowrap: queued 4 812 messages
autonumber off
Cron->>Reporter: build(daily digest)
Sequence diagram Sequence diagram. 4 participants, 6 messages. Participants: Customer, Web app (Web), API gateway (API), Bank. 1. Customer → Web app: Place order 2. Web app → API gateway: POST /orders loop Every minute: 3. API gateway → Bank: Authorise payment 4. Bank --> API gateway: Approved alt bank declines: 5. Bank --> Web app: Declined else bank approves: 6. Web app --> Customer: Order confirmed Note over Customer,Bank: One order, one transaction loopEvery minute altbank declinesbank approves CustomerCustomer Web appWeb app API gatewayAPI gateway BankBank One order, onetransaction Place order POST /orders Authorisepayment Approved Declined Order confirmed
Diagram source
sequenceDiagram
actor Customer
participant Web as Web app
participant API as API gateway
participant Bank
Customer->>Web: Place order
Web->>API: POST /orders
loop Every minute
API->>Bank: Authorise payment
Bank-->>API: Approved
end
alt bank declines
Bank-->>Web: Declined
else bank approves
Web-->>Customer: Order confirmed
end
Note over Customer,Bank: One order, one transaction
Release train Sequence diagram. 4 participants, 6 messages. Participants: Developer (Dev), CI, Registry, Production (Prod). 1. Developer → CI: push tag v4.2.0 2. CI → CI: cargo test --workspace 3. CI → CI: cargo clippy -- -D warnings opt benchmarks changed: 4. CI → CI: cargo bench -- --save-baseline v4.2.0 5. CI → Registry: publish merlion-render 4.2.0 6. Registry --> Production: pull 4.2.0 Note left of Developer: The train leaves every Thursday optbenchmarks changed DeveloperDeveloper CICI RegistryRegistry ProductionProduction The train leaves everyThursday push tag v4.2.0 cargo test --workspace cargo clippy -- -D warnings cargo bench ----save-baseline v4.2.0 publish merlion-render 4.2.0 pull 4.2.0
Diagram source
%%{init: {"merlion": {"autoTone": false}}}%%
sequenceDiagram
title Release train
participant Dev as Developer
participant CI
participant Registry@{ "type": "database" }
participant Prod as Production
Dev->>CI: push tag v4.2.0
activate CI
CI->>CI: cargo test --workspace
CI->>CI: cargo clippy -- -D warnings
opt benchmarks changed
CI->>CI: cargo bench -- --save-baseline v4.2.0
end
CI->>Registry: publish merlion-render 4.2.0
deactivate CI
Registry-->>Prod: pull 4.2.0
Note left of Dev: The train leaves every Thursday
Sequence diagram Sequence diagram. 4 participants, 6 messages. Participants: Writer, Primary, Write-ahead log (Wal), Read replicas (Replica). 1. Writer → Primary: BEGIN; UPDATE accounts SET balance = balance - 25 2. Primary → Write-ahead log: append(lsn=4821) 3. Primary --> Writer: COMMIT par stream to replicas: 4. Write-ahead log → Read replicas: lsn=4821 and acknowledge the writer: 5. Write-ahead log --> Primary: flushed(lsn=4821) Note right of Read replicas: Replicas serve reads at lsn 4821 once applied 6. Read replicas --> Write-ahead log: applied(lsn=4821) parstream to replicasacknowledge the writer WriterWriter PrimaryPrimary Write-ahead logWrite-ahead log Read replicasRead replicas Replicas serve reads at lsn4821 once applied BEGIN; UPDATE accountsSET balance = balance - 25 append(lsn=4821) COMMIT lsn=4821 flushed(lsn=4821) applied(lsn=4821)
Diagram source
sequenceDiagram
participant Writer
participant Primary@{ "type": "database" }
participant Wal@{ "type": "queue" } as Write-ahead log
participant Replica@{ "type": "collections" } as Read replicas
Writer->>+Primary: BEGIN#59; UPDATE accounts SET balance = balance - 25
Primary->>Wal: append(lsn=4821)
Primary-->>-Writer: COMMIT
par stream to replicas
Wal-)Replica: lsn=4821
and acknowledge the writer
Wal--)Primary: flushed(lsn=4821)
end
Note right of Replica: Replicas serve reads at lsn 4821 once applied
Replica-->>Wal: applied(lsn=4821)
Sequence diagram Sequence diagram. 3 participants, 3 messages. Participants: Supervisor, Worker, Log. 1. Supervisor → Worker: start(batch 7) 2. Worker → Log: 2400 rows written 3. Supervisor → Log: batch 7 complete SupervisorSupervisor WorkerWorker LogLog start(batch 7) 2400 rows written batch 7 complete
Diagram source
sequenceDiagram
participant Supervisor
participant Worker
participant Log
Supervisor->>Worker: start(batch 7)
Worker->>Log: 2400 rows written
destroy Worker
Supervisor->>Log: batch 7 complete
Sequence diagram Sequence diagram. 3 participants, 5 messages. Participants: Mobile, Sync, Store. 1. Mobile → Sync: open(session) 2. Sync → Store: read(cursor) 3. Store --> Sync: cursor=8812 4. Sync --> Mobile: 41 changes since 8812 5. Mobile → Sync: ack(8853) MobileMobile SyncSync StoreStore open(session) read(cursor) cursor=8812 41 changes since 8812 ack(8853)
Diagram source
sequenceDiagram
participant Mobile
participant Sync
participant Store
Mobile->>Sync open(session)
Sync->>Store read(cursor)
Store-->>Sync cursor=8812
Sync-->>Mobile: 41 changes since 8812
Mobile->>Sync: ack(8853)
Sequence diagram Sequence diagram. 3 participants, 6 messages. Participants: Browser, CDN, Origin. 1. Browser → CDN: GET /app.js alt cache hit: 2. CDN --> Browser: 200 OK (from edge) else cache miss: 3. CDN → Origin: GET /app.js 4. Origin --> CDN: 200 OK 5. CDN --> Browser: 200 OK (stale) 6. Browser → CDN: GET /app.css altcache hitcache miss BrowserBrowser CDNCDN OriginOrigin GET /app.js 200 OK (from edge) GET /app.js 200 OK 200 OK (stale) GET /app.css
Diagram source
sequenceDiagram
participant Browser
participant CDN
participant Origin
Browser->>CDN: GET /app.js
alt cache hit
CDN-->>Browser: 200 OK (from edge)
else cache miss
CDN->>Origin: GET /app.js
Origin-->>CDN: 200 OK
end
else stale while revalidate
CDN-->>Browser: 200 OK (stale)
end
Browser->>CDN: GET /app.css
Sequence diagram Sequence diagram. 4 participants, 9 messages. Participants: User, Agent, Tool runtime (Tools), Search API (Search). 1. User → Agent: Which release broke the p95? 2. Agent → Tool runtime: tool_use(search, {"q": "p95 regression"}) 3. Tool runtime → Search API: GET /search?q=p95+regression 4. Search API --> Tool runtime: 3 hits 5. Tool runtime --> Agent: tool_result(3 hits) alt enough evidence: 6. Agent → User: Release 4.2 doubled the p95 else needs another call: 7. Agent → Tool runtime: tool_use(fetch, {"url": "..."}) 8. Tool runtime --> Agent: tool_result(body) 9. Agent → User: Release 4.2 doubled the p95 altenough evidenceneeds another call UserUser AgentAgent Tool runtimeTool runtime Search APISearch API Which release broke the p95? tool_use(search, {"q": "p95regression"}) GET/search?q=p95+regression 3 hits tool_result(3 hits) Release 4.2 doubled the p95 tool_use(fetch, {"url": "..."}) tool_result(body) Release 4.2 doubled the p95
Diagram source
sequenceDiagram
participant User
participant Agent
participant Tools as Tool runtime
participant Search as Search API
User->>Agent: Which release broke the p95?
Agent->>Tools: tool_use(search, {"q": "p95 regression"})
Tools->>Search GET /search?q=p95+regression
Search-->>Tools: 3 hits
Tools-->>Agent: tool_result(3 hits)
alt enough evidence
Agent->>User: Release 4.2 doubled the p95
else needs another call
Agent->>Tools: tool_use(fetch, {"url": "..."})
Tools-->>Agent: tool_result(body)
Agent->>User: Release 4.2 doubled the p95
Sequence diagram Sequence diagram. 3 participants, 4 messages. Participants: Scheduler, Worker, Metrics. 1. Scheduler → Worker: lease(job 91) loop until the lease expires: 2. Worker → Metrics: heartbeat(job 91) opt backlog over 1000: 3. Worker → Scheduler: request another worker 4. Worker --> Scheduler: done(job 91) loopuntil the lease expires optbacklog over 1000 SchedulerScheduler WorkerWorker MetricsMetrics lease(job 91) heartbeat(job 91) request another worker done(job 91)
Diagram source
sequenceDiagram
participant Scheduler
participant Worker
participant Metrics
Scheduler->>Worker: lease(job 91)
loop until the lease expires
Worker->>Metrics: heartbeat(job 91)
opt backlog over 1000
Worker->>Scheduler: request another worker
Worker-->>Scheduler: done(job 91)
Sequence diagram Sequence diagram. 4 participants, 5 messages. Participants: Rider, Rider app (App), Dispatch, Driver. 1. Rider → Rider app: Request a ride Note right of Rider: The pickup pin is dragged before sending 2. Rider app → Dispatch: POST /rides Note over Dispatch,Driver: Dispatch holds the offer for 15s 3. Dispatch → Driver: Offer ride 4471 4. Driver --> Dispatch: accepted Note left of Driver: Declining releases the offer to the next driver 5. Dispatch --> Rider app: driver assigned, ETA 4 min Mobile clients Dispatch RiderRider Rider appRider app DispatchDispatch DriverDriver The pickup pin isdragged beforesending Dispatch holdsthe offer for 15s Decliningreleases the offerto the next driver Request a ride POST /rides Offer ride 4471 accepted driver assigned,ETA 4 min
Diagram source
sequenceDiagram
box Aqua Mobile clients
actor Rider
participant App as Rider app
end
box rgba(255, 240, 200, 0.6) Dispatch
participant Dispatch
participant Driver
end
Rider->>App: Request a ride
Note right of Rider: The pickup pin is <br/>dragged before sending
App->>Dispatch: POST /rides
Note over Dispatch,Driver: Dispatch holds the offer for 15s
Dispatch->>Driver: Offer ride 4471
Driver-->>Dispatch: accepted
Note left of Driver: Declining releases the offer to the next driver
Dispatch-->>App: driver assigned, ETA 4 min
Sequence diagram Sequence diagram. 4 participants, 7 messages. Participants: Client, Router, Streaming model (Model), Trace collector (Trace). 1. Client → Router: POST /v1/messages (stream=true) 2. Router → Streaming model: forward prompt, 2 400 tokens par_over tokens and telemetry share the wall clock: 3. Streaming model --> Router: token deltas 4. Router --> Client: SSE data frames and: 5. Router → Trace collector: span(ttft=180ms) 6. Streaming model --> Router: stop_reason=end_turn 7. Router --> Client: message_stop par_overtokens andtelemetry sharethe wall clock ClientClient RouterRouter Streaming modelStreaming model Trace collectorTrace collector POST/v1/messages(stream=true) forward prompt, 2400 tokens token deltas SSE data frames span(ttft=180ms) stop_reason=end_turn message_stop
Diagram source
sequenceDiagram
participant Client
participant Router
participant Model as Streaming model
participant Trace@{ "type": "entity" } as Trace collector
Client->>+Router: POST /v1/messages (stream=true)
Router->>+Model: forward prompt, 2 400 tokens
par_over tokens and telemetry share the wall clock
Model--)Router: token deltas
Router--)Client: SSE data frames
and
Router-)Trace: span(ttft=180ms)
end
Model-->>-Router: stop_reason=end_turn
Router-->>-Client: message_stop
Card payment with 3-D Secure The checkout service authorises a card, steps up to 3-D Secure when the issuer asks for it, and captures on success. criticalauthorise the cardissuer asks for a challengeissuer declines ShopperShopper CheckoutCheckout Payment providerPayment provider IssuerIssuer 3-D Secure page Pay 49.00 EUR POST /payments Authorisation request challenge_required Redirect the shopper Enter the one-time code 483912 challenge_passed declined (insufficient funds) captured Order confirmed
Card payment with 3-D Secure
Diagram source
sequenceDiagram
accTitle: Card payment with 3-D Secure
accDescr: The checkout service authorises a card, steps up to 3-D Secure when the issuer asks for it, and captures on success.
actor Shopper
participant Checkout
participant PSP as Payment provider
participant Issuer
Shopper->>+Checkout: Pay 49.00 EUR
Checkout->>+PSP: POST /payments
critical authorise the card
PSP->>+Issuer: Authorisation request
Issuer-->>-PSP: challenge_required
option issuer asks for a challenge
create participant ThreeDS as 3-D Secure page
PSP->>ThreeDS: Redirect the shopper
ThreeDS->>Shopper: Enter the one-time code
Shopper->>ThreeDS: 483912
destroy ThreeDS
ThreeDS-->>PSP: challenge_passed
option issuer declines
PSP-->>Checkout: declined (insufficient funds)
end
PSP-->>-Checkout: captured
Checkout-->>-Shopper: Order confirmed
Sequence diagram Sequence diagram. 4 participants, 8 messages. Participants: Caller, Edge, Token bucket (Limiter), Origin. 1.05. Caller → Edge: GET /v1/search 1.15. Edge → Token bucket: take(1) alt tokens available: 1.25. Token bucket --> Edge: allowed, 17 left 1.35. Edge → Origin: GET /v1/search 1.45. Origin --> Edge: 200 OK 1.55. Edge --> Caller: 200 OK else bucket empty: 1.65. Token bucket --> Edge: denied, refill in 800ms 1.75. Edge --> Caller: 429 Too Many Requests alttokens availablebucket empty CallerCaller EdgeEdge Token bucketToken bucket OriginOrigin GET /v1/search1.05 take(1)1.15 allowed, 17 left1.25 GET /v1/search1.35 200 OK1.45 200 OK1.55 denied, refill in 800ms1.65 429 Too ManyRequests1.75
Diagram source
sequenceDiagram
autonumber 1.05 0.1
actor Caller
participant Edge
participant Limiter@{ "type": "control" } as Token bucket
participant Origin
Caller->>Edge: GET /v1/search
Edge->>+Limiter: take(1)
alt tokens available
Limiter-->>-Edge: allowed, 17 left
Edge->>Origin: GET /v1/search
Origin-->>Edge: 200 OK
Edge-->>Caller: 200 OK
else bucket empty
Limiter-->>Edge: denied, refill in 800ms
Edge--xCaller: 429 Too Many Requests
end
Sequence diagram Sequence diagram. 4 participants, 7 messages. Participants: Orchestrator, Orders, Payments, Inventory. 1. Orchestrator → Orders: cancel(order 8812) 2. Orders --> Orchestrator: cancelled rect: Note over Orchestrator,Inventory: Compensating transactions par refund the card: 3. Orchestrator → Payments: refund(49.00 EUR) 4. Payments --> Orchestrator: refunded and restock the items: 5. Orchestrator → Inventory: restock(sku A-19, qty 1) 6. Inventory --> Orchestrator: restocked 7. Orchestrator → Orders: saga complete rect parrefund the cardrestock the items OrchestratorOrchestrator OrdersOrders PaymentsPayments InventoryInventory Compensating transactions cancel(order 8812) cancelled refund(49.00 EUR) refunded restock(sku A-19, qty 1) restocked saga complete
Diagram source
sequenceDiagram
participant Orchestrator
participant Orders
participant Payments
participant Inventory
Orchestrator->>+Orders: cancel(order 8812)
Orders-->>-Orchestrator: cancelled
rect rgb(255, 235, 235)
Note over Orchestrator,Inventory: Compensating transactions
par refund the card
Orchestrator->>+Payments: refund(49.00 EUR)
Payments-->>-Orchestrator: refunded
and restock the items
Orchestrator->>+Inventory: restock(sku A-19, qty 1)
Inventory-->>-Orchestrator: restocked
end
end
Orchestrator->>Orders: saga complete
Sequence diagram Sequence diagram. 2 participants, 3 messages. Participants: Runner, Artifacts. 1. Runner → Artifacts: upload(bundle.zip, 18 MiB) 2. Artifacts --> Runner: stored, sha256 4f2a… 3. Runner → Artifacts: upload(coverage.json, 240 KiB) RunnerRunner ArtifactsArtifacts upload(bundle.zip, 18 MiB) stored, sha256 4f2a… upload(coverage.json, 240KiB)
Diagram source
sequenceDiagram
participant Runner
participant Artifacts
link Runner: Logs @ https://example.com/runs/91/logs
links Artifacts: {"Bundle": "https://example.com/runs/91/bundle.zip"}
properties Runner: {"class": "self-hosted"}
details Runner: {"region": "eu-central-1"}
Runner->>Artifacts: upload(bundle.zip, 18 MiB)
Artifacts-->>Runner: stored, sha256 4f2a…
Runner->>Artifacts: upload(coverage.json, 240 KiB)
Sequence diagram Sequence diagram. 4 participants, 9 messages. Participants: Browser, Edge worker (Edge), Room object (Room), Socket. 1. Browser → Edge worker: GET /ws (Upgrade: websocket) 2. Edge worker → Socket: 101 Switching Protocols 3. Edge worker → Room object: attach(sessionId) 4. Room object --> Edge worker: joined, 3 peers 5. Socket → Browser: {"type":"hello","peers":3} 6. Browser → Socket: {"type":"cursor","x":12,"y":40} 7. Socket → Room object: broadcast(cursor) 8. Browser → Socket: close(1000) 9. Edge worker --> Browser: session closed BrowserBrowser Edge workerEdge worker Room objectRoom object Socket GET /ws (Upgrade:websocket) 101 Switching Protocols attach(sessionId) joined, 3 peers {"type":"hello","peers":3} {"type":"cursor","x":12,"y":40} broadcast(cursor) close(1000) session closed
Diagram source
sequenceDiagram
participant Browser
participant Edge as Edge worker
participant Room@{ "type": "control" } as Room object
Browser->>+Edge: GET /ws (Upgrade: websocket)
create participant Socket@{ "type": "boundary" } as Socket
Edge->>Socket: 101 Switching Protocols
Edge->>+Room: attach(sessionId)
Room-->>-Edge: joined, 3 peers
Socket-)Browser: {"type":"hello","peers":3}
Browser-)Socket: {"type":"cursor","x":12,"y":40}
Socket-)Room: broadcast(cursor)
destroy Socket
Browser-xSocket: close(1000)
Edge-->>-Browser: session closed