Programmable Messaging API  ·  View 07 of 22  ·  Structure

Layered Architecture

Eight layers: submit goes down, receipts come back up, and only one layer writes durably.

Editable source SVG draw.io All views
Tenant edge Send API Cloud Run Batch and dry-run Status query Callback dispatch signed Console and reporting Admission Destination normalise Sender and jurisdiction Client-reference dedup Consent and compliance fails closed Quota and credit Ownership Message ledger Cloud Spanner Body and media store Cloud Storage State projection Bigtable Scheduling Class lanes Pub/Sub Cross-tenant fairness Route leases Memorystore Pacing and parking Cloud Tasks TTL expiry sweeper Routing and adapters Route selector Per-route breaker SMS and MMS adapter WhatsApp adapter RCS adapter Session plane Carrier binds GKE StatefulSet Allowlisted egress Cloud NAT Credential custody Secret Manager Ingest (upwards) Receipt ingest verify and dedup Inbound ingest Correlate and apply monotonic Quarantine uncorrelatable Keyword interception Control plane Route and price table Spanner Sender-identity registry Compliance rule set versioned Consent store append-only Audit log 7 years every submit then ack by class attempt provider ref hot path Layered Architecture — Submit Downwards, Receipts Upwards Interface / broker Application we own Security / platform Data store Queue / topic Risk / gap synchronous event / async The only layer that writes durably on submit is Ownership; everything below it is retryable. v 1.0 · owner Integration Platform Architecture

Decisions

  • Admission sits above ownership so that a refusal costs nothing and an acceptance costs a durable write — the cheap answer is always the fast one.
  • Consent and compliance is the one evaluation on the submit path that fails closed; everything below it degrades instead.
  • Ingest is drawn as its own upward layer because its load is unrelated to submit load and three times its volume.

Assumptions

  • Control-plane reads are served from caches with a bounded staleness ceiling; past it, compliance fails closed.
  • 25,000 receipts/second steady against 8,000 accepted messages/second: one message produces several facts.

Deliberate omissions

  • Edges between every layer pair: only the ones that constrain the design are drawn.