This was basically the entire interview wrapped into one prompt.
Start by clarifying requirements and scale, then propose a pipeline that ingests raw data into cheap object storage while extracting metadata and features at ingest time. Design a multi-tiered storage and indexing strategy that balances cost and query performance, and expose a declarative query API with fine-grained access control. Emphasize trade-offs between latency, cost, and flexibility at each layer.
Pro tip: Anchor your design around the query pattern: 'find clips where X' implies a two-phase search—first use a metadata index to narrow down candidate clips, then run expensive perception-based filters only on that subset. This avoids indexing every frame and keeps costs manageable.
Ask about data volume (PB/day?), latency needs (real-time vs batch), query types, retention, and compliance. Establish assumptions to guide design.
Propose a scalable ingestion pipeline (e.g., Kafka + stream processing) that writes raw data to object storage and extracts lightweight metadata (timestamps, GPS, sensor IDs) and heavy features (object detections, scene tags) at ingest time.
Tier storage: hot (recent, frequently accessed) on fast storage, warm (indexed metadata) on cheaper storage, cold (raw archives) on object storage. Build inverted indexes on extracted features and metadata for fast retrieval.
Create a declarative query API that supports filters on metadata and features (e.g., 'pedestrian near stop sign'). Implement role-based access control (RBAC) with row-level security to restrict data by team, region, or sensitivity.
Highlight trade-offs: ingest-time vs query-time feature extraction, index granularity, storage cost vs query latency. Mention techniques like columnar storage, partitioning, and caching.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.