Design a data system to collect logs produced by autonomous driving simulations and aggregate/compute statistics from those logs. The system must handle the high volume of simulation-generated data. An embedded follow-up asks: given that simulation can generate abundant data but real-world on-vehicle test data is much more limited, how do you reconcile or bridge the two data sources when computing meaningful statistics?
Naive approach with serious trade-off — being authored.
Solid baseline with reasonable trade-offs — being authored.
Production-grade approach with explicit trade-off rationale — being authored.
Cover happy path. Clarify scope. Identify the obvious bottleneck. Pick a reasonable storage and reasonable scaling approach.
All of the above plus: explicit failure handling, durability vs latency trade-offs, choose the right batching/caching strategy, articulate why.
All of the above plus: organizational concerns (rollout, migration, on-call), quantitative analysis, multi-region considerations, what could go wrong with the proposed solution at 10x scale.
Common mistakes: Focusing only on storage/ingestion without addressing how statistics are computed or served; Ignoring the sim-to-real gap sub-problem entirely; Not defining the schema/structure of simulation log events before designing the pipeline
What passers do: Explicitly separating the ingestion, storage, computation, and serving layers; Proactively raising the sim-to-real gap issue and proposing concrete reconciliation mechanisms (importance weighting, source tagging)
Why people fail: Treating it as a generic log aggregation problem without addressing autonomous-driving-specific concerns; Struggling to articulate how to handle the data imbalance between simulation and real-world sources
Edge cases probed: Sim vs. real data volume imbalance and how it skews aggregate statistics; Schema evolution of log formats across simulation versions; Handling partial or corrupted simulation runs in aggregation
Alternative approaches: Lambda architecture (batch + speed layer) (Provides both real-time and historical aggregation but increases operational complexity with two code paths to maintain.); Pure streaming with stateful aggregation (Flink/Dataflow) (Lower latency for live simulation runs; harder to reprocess historical logs and manage exactly-once semantics at scale.); Offline-only batch pipeline (Spark on object storage) (Simpler to implement and reprocess, but no real-time visibility into ongoing simulation campaigns.)