Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_hotel-reservation

Hotel Reservation System (hold, pay, confirm with a Saga)

12 COMPONENTS · 15 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[![Hotel Reservation System (hold, pay, confirm with a Saga) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_hotel-reservation/opengraph-image)](https://archos.sageideas.dev/d/dgm_hotel-reservation)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_hotel-reservation)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_hotel-reservation" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Hotel Reservation System (hold, pay, confirm with a Saga) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  guest_0[("Web Client")]
  pay_1[("Payment provider")]
  idp_2[("Identity provider (IdP)")]
  gw_3["API gateway"]
  svc_4["Reservation service"]
  hs_5[("Session store")]
  db_6[("Reservation database")]
  queue_7[("Message queue")]
  notif_8[("Notification service")]
  tsdb_9[("Time-series database (TSDB)")]
  alerting_10[("Alerting")]
  capacity_11["Capacity Estimate"]
  guest_0 -->|"1. Calls with JWT · HTTPS"| gw_3
  gw_3 -->|"2. Starts booking · HTTP/2"| svc_4
  svc_4 -->|"3. Holds / releases nights · TCP"| hs_5
  hs_5 -->|"4. Returns hold · TCP"| svc_4
  svc_4 -->|"5. Charges / refunds card · HTTPS"| pay_1
  pay_1 -->|"6. Returns result · HTTPS"| svc_4
  svc_4 -->|"7. Confirms booking · SQL"| db_6
  db_6 -->|"8. Returns outcome · SQL"| svc_4
  svc_4 -->|"9a. Returns booking · HTTP/2"| gw_3
  svc_4 -.->|"9b. Relays event from outbox · TCP"| queue_7
  queue_7 -.->|"10b. Delivers · TCP"| notif_8
  gw_3 -->|"10a. Relays booking · HTTPS"| guest_0
  idp_2 -->|"Publishes keys (JWKS) · HTTPS"| gw_3
  svc_4 -->|"Exports (OTLP) · OTLP"| tsdb_9
  tsdb_9 -->|"Feeds Alerting · HTTP"| alerting_10

COMPONENT STACK (11)

  • Web ClientSTATEFUL
    Searches and books rooms from an untrusted network
  • Payment providerSTATEFUL
    Charges and refunds cards; honours idempotency keys
  • Identity provider (IdP)STATEFUL
    Issues the JWT; publishes its signing keys
  • API gatewaySTATELESS
    Checks the JWT, then forwards the booking
  • Reservation serviceSTATELESS
    Runs the Saga: hold, charge, confirm or release
  • Session storeSTATEFUL
    Holds rooms 15 minutes; the key expires
  • Reservation databaseSTATEFUL
    Nights with a version; bookings by booking id
  • Message queueSTATEFUL
    Holds events for the notifier
  • Notification serviceSTATEFUL
    Emails the guest; drops repeated events by id
  • Time-series database (TSDB)STATEFUL
    Stores conflicts, expiries, refunds and latency
  • AlertingSTATEFUL
    Pages on-call when refunds or conflicts spike

REQUEST & DATA FLOW (15)

  1. Web Client → API gateway (Calls with JWT)[HTTPS]
  2. API gateway → Reservation service (Starts booking)[HTTP/2]
  3. Reservation service → Session store (Holds / releases nights)[TCP]
  4. Session store → Reservation service (Returns hold)[TCP]
  5. Reservation service → Payment provider (Charges / refunds card)[HTTPS]
  6. Payment provider → Reservation service (Returns result)[HTTPS]
  7. Reservation service → Reservation database (Confirms booking)[SQL]
  8. Reservation database → Reservation service (Returns outcome)[SQL]
  9. Reservation service → API gateway (Returns booking)[HTTP/2]
  10. Reservation service → Message queue (Relays event from outbox)[TCP]
  11. Message queue → Notification service (Delivers)[TCP]
  12. API gateway → Web Client (Relays booking)[HTTPS]
  13. Identity provider (IdP) → API gateway (Publishes keys (JWKS))[HTTPS]
  14. Reservation service → Time-series database (TSDB) (Exports (OTLP))[OTLP]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →