Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_polyglot-persistence

Polyglot persistence decision map

12 COMPONENTS · 11 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[![Polyglot persistence decision map — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_polyglot-persistence/opengraph-image)](https://archos.sageideas.dev/d/dgm_polyglot-persistence)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_polyglot-persistence)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_polyglot-persistence" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Polyglot persistence decision map — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("Client application")]
  agent_1[("Support agent")]
  api_2["Resource server"]
  pg_3[("PostgreSQL")]
  cdc_4[("Change Data Capture (CDC)")]
  log_5[("Event log")]
  consumer_6[("Competing consumers")]
  mongo_7[("MongoDB")]
  search_8[("Search index")]
  tsdb_9[("Time-series database (TSDB)")]
  alerting_10[("Alerting")]
  capacity_11["Capacity card"]
  client_0 -->|"1. Calls with JWT · HTTPS"| api_2
  api_2 -->|"2. Commits order · SQL"| pg_3
  pg_3 -->|"3. Streams · TCP"| cdc_4
  cdc_4 -->|"4. Publishes · TCP"| log_5
  log_5 -->|"5. Consumes · TCP"| consumer_6
  consumer_6 -->|"6a. Upserts view · TCP"| mongo_7
  consumer_6 -->|"6b. Upserts index · TCP"| search_8
  mongo_7 -->|"7a. Serves queries · TCP"| agent_1
  search_8 -->|"7b. Looks up by email · TCP"| agent_1
  tsdb_9 -->|"Scrapes consumer lag · HTTPS"| consumer_6
  tsdb_9 -->|"Sends lag · HTTPS"| alerting_10

COMPONENT STACK (12)

  • Client applicationSTATEFUL
    Places orders
  • Support agentSTATEFUL
    Looks up orders by id or email
  • Resource serverSTATELESS
    Checks the JWT and runs the order command
  • PostgreSQLSTATEFUL
    Write model: the system of record for orders
  • Change Data Capture (CDC)STATEFUL
    Reads the database log through a slot
  • Event logSTATEFUL
    Per-key ordered, replayable change events
  • Competing consumersSTATEFUL
    Applies each change as a versioned upsert
  • MongoDBSTATEFUL
    Materialized view of orders, sharded by customer id
  • Search indexSTATEFUL
    Email-keyed index: order ids by email
  • Time-series database (TSDB)STATEFUL
    Stores consumer lag over time
  • AlertingSTATEFUL
    Pages on-call when consumer lag grows
  • Capacity cardSTATELESS
    Illustrative inputs, not measured

REQUEST & DATA FLOW (11)

  1. Client application → Resource server (Calls with JWT)[HTTPS]
  2. Resource server → PostgreSQL (Commits order)[SQL]
  3. PostgreSQL → Change Data Capture (CDC) (Streams)[TCP]
  4. Change Data Capture (CDC) → Event log (Publishes)[TCP]
  5. Event log → Competing consumers (Consumes)[TCP]
  6. Competing consumers → MongoDB (Upserts view)[TCP]
  7. Competing consumers → Search index (Upserts index)[TCP]
  8. MongoDB → Support agent (Serves queries)[TCP]
  9. Search index → Support agent (Looks up by email)[TCP]
  10. Time-series database (TSDB) → Competing consumers (Scrapes consumer lag)[HTTPS]
  11. Time-series database (TSDB) → Alerting (Sends lag)[HTTPS]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →