ARCHOS 525 BLUEPRINT · /d/dgm_photo-sharing
Photo sharing (presigned uploads, CDN and fan-out feeds)
12 COMPONENTS · 15 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_photo-sharing) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_photo-sharing)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_photo-sharing" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Photo sharing (presigned uploads, CDN and fan-out feeds) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
app_0[("Photo app")]
gw_1["API gateway"]
cdn_2[("Content delivery network (CDN)")]
photo_3["Photo service"]
obj_4[("Object storage")]
tsdb_5[("Time-series database (TSDB)")]
metadb_6[("Metadata store")]
cdc_7[("Change Data Capture (CDC)")]
queue_8[("Message queue")]
worker_9["Fanout workers"]
feed_10[("Distributed cache")]
capacity_11["Capacity Estimate"]
app_0 -->|"1. Calls with JWT · HTTPS"| gw_1
gw_1 -->|"2. Forwards (mTLS) · HTTP/2"| photo_3
photo_3 -->|"3. Returns URL · HTTP/2"| gw_1
gw_1 -->|"4. URL · HTTPS"| app_0
app_0 -->|"5. Uploads with URL · HTTPS"| obj_4
obj_4 -->|"6. Notifies upload done · HTTPS"| photo_3
photo_3 -->|"7. Saves record · HTTPS"| metadb_6
metadb_6 -->|"8. Streams changes · HTTPS"| cdc_7
cdc_7 -->|"9. Publishes reference · TCP"| queue_8
queue_8 -->|"10. Delivers reference · TCP"| worker_9
worker_9 -->|"11. Updates feeds · TCP"| feed_10
app_0 -->|"Fetches photo · HTTPS"| cdn_2
cdn_2 -->|"Fills on miss · HTTPS"| obj_4
photo_3 -->|"Reads feed first · TCP"| feed_10
tsdb_5 -->|"Scrapes queue lag · HTTPS"| queue_8COMPONENT STACK (11)
- Photo appSTATEFULUploads photos and opens the feed
- API gatewaySTATELESSChecks the JWT, then forwards the call
- Content delivery network (CDN)STATEFULCaches photos near the viewer
- Photo serviceSTATELESSSigns upload URLs, saves records, reads feeds
- Object storageSTATEFULHolds the photo files
- Time-series database (TSDB)STATEFULStores queue lag
- Metadata storeSTATEFULPhoto records and the follower list
- Change Data Capture (CDC)STATEFULReads new records from the change stream
- Message queueSTATEFULHolds references, not photo files
- Fanout workersSTATELESSAdd the photo to each follower feed
- Distributed cacheSTATEFULHolds each feed as a sorted set of ids
REQUEST & DATA FLOW (15)
- Photo app → API gateway (Calls with JWT)[HTTPS]
- API gateway → Photo service (Forwards (mTLS))[HTTP/2]
- Photo service → API gateway (Returns URL)[HTTP/2]
- API gateway → Photo app (URL)[HTTPS]
- Photo app → Object storage (Uploads with URL)[HTTPS]
- Object storage → Photo service (Notifies upload done)[HTTPS]
- Photo service → Metadata store (Saves record)[HTTPS]
- Metadata store → Change Data Capture (CDC) (Streams changes)[HTTPS]
- Change Data Capture (CDC) → Message queue (Publishes reference)[TCP]
- Message queue → Fanout workers (Delivers reference)[TCP]
- Fanout workers → Distributed cache (Updates feeds)[TCP]
- Photo app → Content delivery network (CDN) (Fetches photo)[HTTPS]
- Content delivery network (CDN) → Object storage (Fills on miss)[HTTPS]
- Photo service → Distributed cache (Reads feed first)[TCP]