Interview prompt
Problem context
Skills being evaluated
Use the sequence below to surface constraints, choose boundaries, test failure behavior, and defend trade-offs. Concrete numbers are interview assumptions, not claims about a real production system.
Clarify the decision
- Define whether the metric is final, provisional, or revisable and which clock governs business truth. Identify late-data horizon, correction policy, decision impact, and required reproducibility.
Establish scale assumptions
- Estimate event volume, out-of-order distribution, state size, nightly recomputation cost, and affected decisions. Watermarks should follow observed lateness rather than a convenient fixed interval.
Functional and non-functional requirements
- Batch and stream use one versioned semantic definition, outputs carry provenance and completeness, corrections are explicit, and consequential decisions remain reconstructable.
High-level architecture
- Create a shared transformation specification and test fixtures, canonical immutable input log, versioned feature or metric store, stream processor for provisional results, and batch verifier that emits correction events rather than overwriting invisibly.
Data model and flow
- Inputs carry event and ingestion times, source sequence, schema, and correction linkage. Outputs carry computation version, input watermark, confidence or finality, and superseded result ID.
Consistency and transaction boundaries
- Use event-time windows with explicit late-data rules. Online readers choose the newest approved result under policy, while finance may wait for a closed watermark and later restatement workflow.
Failure modes and recovery
- Checkpoint streaming state, make corrections idempotent, and reconcile missing source ranges before declaring final. A bad computation version is disabled through policy while prior outputs remain available.
Security and privacy
- Apply identical access and privacy transformations in both paths, and restrict retained raw input by purpose. Correction history is auditable without exposing sensitive feature values broadly.
Observability and SLOs
- Measure batch-stream delta, late-event rate, watermark age, correction magnitude, version coverage, and decisions changed after correction. Alert on semantic drift even when both pipelines are healthy.
Capacity and cost
- Share source and semantic assets but allow optimized execution engines. Incremental batch verification and targeted recompute reduce cost compared with rewriting the full online store nightly.
Alternatives and trade-offs
- A single engine reduces implementation drift but may fit one workload poorly. A shared semantic contract plus parity tests allows two engines while making disagreement observable and governed.
Evolution and migration
- Version transformations, dual-compute on identical inputs, compare by cohort, and switch reader policy only after parity thresholds. Backfill new versions without erasing prior decision evidence.
What Staff and Principal candidates should emphasize
- Principal candidates define finality and correction semantics, not just Lambda versus Kappa architecture. They make disagreement a measurable contract and protect downstream decisions from silent overwrite.
Decision trade-offs
Execution model
Option A
One engine for batch and stream
Option B
Separate engines under one semantic contract
Recommendation:Share definitions, fixtures, and provenance; use separate engines only when parity is continuously measured and deviations are explicit.
Correction
Option A
Overwrite online values nightly
Option B
Publish versioned correction events
Recommendation:Publish corrections with provenance so readers, audits, and affected decisions can distinguish revision from unexplained mutation.
Follow-up interview questions
- 01When is a streaming result final?
- 02How do you handle an event arriving months late?
- 03Can batch and stream use different feature implementations?
- 04How do you notify downstream decisions changed by a correction?
Common weak answers and mistakes
- 01Saying Kappa architecture removes semantic drift without addressing late data and corrections.
- 02Overwriting results without provenance or changed-decision tracking.
- 03Using processing time for a business metric governed by event time.
- 04Comparing only aggregate totals and missing cohort-specific divergence.
Interviewer evaluation rubric
Chooses a named architecture but leaves finality, late events, correction, and provenance undefined.
Defines shared transforms, event time, watermarks, versioned outputs, parity tests, and corrections.
Adds finality policy, source reconciliation, changed-decision impact, security parity, and targeted recompute.
Aligns technical correction semantics with finance, risk, audit, and product expectations across different truth horizons.