ARCHOS 525 BLUEPRINT · /d/dgm_polyglot-persistence
Polyglot persistence decision map
12 COMPONENTS · 11 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[](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_10COMPONENT STACK (12)
- Client applicationSTATEFULPlaces orders
- Support agentSTATEFULLooks up orders by id or email
- Resource serverSTATELESSChecks the JWT and runs the order command
- PostgreSQLSTATEFULWrite model: the system of record for orders
- Change Data Capture (CDC)STATEFULReads the database log through a slot
- Event logSTATEFULPer-key ordered, replayable change events
- Competing consumersSTATEFULApplies each change as a versioned upsert
- MongoDBSTATEFULMaterialized view of orders, sharded by customer id
- Search indexSTATEFULEmail-keyed index: order ids by email
- Time-series database (TSDB)STATEFULStores consumer lag over time
- AlertingSTATEFULPages on-call when consumer lag grows
- Capacity cardSTATELESSIllustrative inputs, not measured
REQUEST & DATA FLOW (11)
- Client application → Resource server (Calls with JWT)[HTTPS]
- Resource server → PostgreSQL (Commits order)[SQL]
- PostgreSQL → Change Data Capture (CDC) (Streams)[TCP]
- Change Data Capture (CDC) → Event log (Publishes)[TCP]
- Event log → Competing consumers (Consumes)[TCP]
- Competing consumers → MongoDB (Upserts view)[TCP]
- Competing consumers → Search index (Upserts index)[TCP]
- MongoDB → Support agent (Serves queries)[TCP]
- Search index → Support agent (Looks up by email)[TCP]
- Time-series database (TSDB) → Competing consumers (Scrapes consumer lag)[HTTPS]
- Time-series database (TSDB) → Alerting (Sends lag)[HTTPS]