◈ PulseFlow Cloud / Docs
Fictional platform · public test environment

Design notes / contract v1

Correlate once. Observe everywhere.

PulseFlow's fictional architecture separates durable event acceptance from analytical reads and outbound notifications. This keeps instrumentation predictable when a dashboard or destination is temporarily unavailable.

Data plane and control plane

Application / SDK / CLI
          |
          v
Regional ingest gateway -- auth, schema, quotas
          |
          v
Durable event log -----> normalization + redaction
          |                         |
          v                         v
Webhook delivery queue       Trace / metric indexes
          |                         |
          v                         v
Customer receiver              Query API + dashboard

Control plane: workspaces, scoped tokens, rules, retention

In this design, data stays in the selected workspace region. us-east-1 and eu-west-1 are illustrative region labels, not claims about deployed infrastructure. Control-plane changes propagate asynchronously; a newly revoked token may have a short cache invalidation window, which a real implementation would need to measure and document.

Identity and correlation

An event ID identifies a logical observation; a run ID groups a business workflow; a trace ID groups spans. These are different concepts. Retries keep the event ID, while a genuinely new workflow run receives a new run ID. The workspace is derived from validated credentials, then checked against the envelope; a client-supplied workspace field is never sufficient authorization.

BoundaryDemo contractConsumer responsibility
Ingestion202 after durable acceptanceKeep acceptance IDs for diagnostics
IndexingEventually consistent, target under 10 secondsAllow a visibility window before polling again
WebhooksAt least once; no global ordering guaranteeDeduplicate by workspace and event ID
IdempotencyIdentical request key/body cached for 24 hoursDo not reuse keys for unrelated operations

Backpressure and recovery

Each workspace has an independent token bucket. A burst that exceeds capacity returns 429 with Retry-After; sustained downstream failures accumulate in a bounded delivery queue. After the retry window expires, an event enters a dead-letter state and requires an explicit operator replay. A replay preserves the original event ID and records a new attempt ID for auditability.

Assume a worker can crash after committing its work but before acknowledging the message. A redelivery must not charge a customer twice or run a destructive action again. Use a durable deduplication record in the same transaction as the side effect; an in-memory set is only suitable for the browser demo.

Security and privacy boundaries

Operational trade-offs

Longer retention makes historical debugging easier but increases storage and privacy exposure. Aggressive batching reduces overhead but adds flush latency. Sampling keeps costs bounded but can hide rare failures; preserve errors and document which traffic was sampled. The synthetic incident history illustrates how queue age and consumer lag expose failures that request-count dashboards miss.

Next: emit a first event or review the webhook verification contract.