Architecture Principles — Acme Marketing Data Ingestion
Architecture Principles — Acme Marketing Data Ingestion
Version: 0.1 Status: Draft Owner: Lead Architect Last reviewed: 2026-10-26
Purpose
These principles guide every decision in this architecture. Each ADR names the principles it upholds or trades off. They derive from the five business objectives in the brief: timely visibility, historical plus incremental, reliable and recoverable, cost-conscious, evolvable.
Business principles
| ID | Principle | Statement | Rationale | Implications |
|---|---|---|---|---|
| BP-01 | Decisions trace to objectives | Every architectural decision cites the business objective or assessment question it serves. | The brief asks for the reasoning behind decisions, not product knowledge. | ADRs carry a Related requirements line; the traceability log is maintained. |
| BP-02 | Pay for what runs | Cost scales with data volume and freshness actually consumed, not with provisioned peaks. | "Cost-conscious as data volumes grow." | Incremental everything; serverless or pausable compute; freshness tiers rather than one global SLA. |
| BP-03 | Evolve by adding, not rewriting | A new source is a new adapter plus metadata, never a change to shared pipelines. | "Evolve as additional data sources are introduced." | Source-adapter contract (AP-01); metadata-driven orchestration; conformed Gold model. |
| BP-04 | Sources are read-only | Ingestion never writes to, or stores state in, a source system. | Sources belong to other teams; periodic retrieval must be side-effect free. | Read-only integration identities; watermarks and cursors live in our control tables. |
Data principles
| ID | Principle | Statement | Rationale | Implications |
|---|---|---|---|---|
| DP-01 | Bronze is the log | Bronze is immutable, append-only and sufficient to rebuild Silver and Gold without touching a source. | Replay must not consume API quota or depend on event retention windows. | No updates or deletes in Bronze (erasure acts on the vault and the landing files); raw payload retained with provenance. |
| DP-02 | Provenance on every row | Every row carries source, object, batch id, extraction time and the source's own version marker. | Auditability; reconciliation; targeted reload. | Standard metadata columns in all layers; batch id propagates Bronze → Silver → Gold. |
| DP-03 | Push accelerates, poll guarantees | Completeness never depends on an event stream; change events only make data arrive sooner. | Salesforce replay is 72 hours, HubSpot webhooks are best-effort, Google Ads has no push. | Every source has a polling path that can reconstruct any window; push paths are optimisations. |
| DP-04 | Idempotent by construction | Any run can be re-executed for the same window with no duplicates and no side effects. | At-least-once delivery is the only achievable guarantee end to end. | Deterministic batch ids; MERGE on business key plus source version; partition overwrite for Gold; event ids for consumers. |
| DP-05 | Reconcile continuously | Source and lake are compared on a schedule; discrepancies become work items, not surprises. | "Complete, consistent and auditable." | Count and hash reconciliation per object per day; results stored; targeted reload. |
| DP-06 | Personal data is minimised and gated | Direct identifiers stop at the anonymisation gate before Bronze; every lake layer holds tokens from a separate vault, and erasure is the deletion of a mapping. | GDPR data minimisation; erasure that can be proven; broad audience for the lake. | Gate in the Bronze loader and a token vault outside OneLake (ADR 6); landing files short-lived and first in the erasure runbook; no payload logging. |
| DP-07 | Open formats | All persisted data is Delta/Parquet in a lake the organisation owns. | Exit path from any vendor; multiple engines. | No proprietary storage for Bronze, Silver or Gold; semantic models are views over Gold. |
Application principles
| ID | Principle | Statement | Rationale | Implications |
|---|---|---|---|---|
| AP-01 | One adapter contract per source | Every source implements the same contract: full extract, incremental extract, optional change receiver, reconciliation count. | BP-03; testability. | Adapters are swappable (built or bought) behind the same orchestration. |
| AP-02 | Separate orchestrate, extract, transform | Scheduling, extraction and transformation are different components with different failure modes. | Extraction fails on API limits; transformation fails on logic; orchestration fails on dependencies. | Pipelines orchestrate; adapters extract; notebooks transform. |
| AP-03 | Consumers subscribe | No pipeline calls a downstream system directly. Changes are published once; consumers subscribe. | Decoupling; retries and dead-lettering per consumer. | Outbox derived from the change feed → message bus → adapters (webhook, SSE, Fabric alerts). |
| AP-04 | Observable by default | Every run writes a ledger entry; every failure raises an alert; every metric is on a dashboard. | "Reliable and recoverable." | Control tables, Application Insights, Fabric monitoring, Activator alerts on job events. |
Technology principles
| ID | Principle | Statement | Rationale | Implications |
|---|---|---|---|---|
| TP-01 | Managed first | Prefer SaaS and PaaS over anything we patch. | Small team; cost of operations dominates. | Fabric, Azure Functions, Service Bus, Key Vault. |
| TP-02 | Everything as code | Azure resources, Fabric items, notebooks and semantic models are versioned and deployed from Git. | Reproducible environments; reviewable change. | Bicep or Terraform; Fabric Git integration and deployment pipelines. |
| TP-03 | Identities over secrets | Managed identities and OAuth where possible; remaining secrets in Key Vault, never in code or pipelines. | Three external platforms with three auth models. | Key Vault references; rotation runbook. |
| TP-04 | Boundaries by workspace, not convention | Access to restricted data is enforced by workspace and item permissions, not by naming. | Personal data in Bronze and Silver. | Separate workspaces for restricted and analytical layers. |
Principle conflicts
Priority order when principles conflict:
- Legal and security principles (DP-06, TP-03, TP-04).
- Data integrity principles (DP-01 to DP-05).
- Business principles (BP-01 to BP-04).
- Technology preferences (TP-01, TP-02).
Record every conflict and its resolution in the relevant ADR.
Review cadence
Reviewed at each new source onboarding and at least annually, through the change process in Phase H.