Skip to main content
All Questions

Design a pipeline that computes ML features from supermarket stock and camera streams.

Unlock detailed company stats for this questionUpgrade

Design a data pipeline for a supermarket system that tracks SKUs of items in stock across hundreds of stores.

There are two streams:

  • Stock: items coming in at about 1M QPS from stores, each with item_id, number_of_items (+/- indicating buy/sell), quantity_before and timestamp.
  • Camera: images of items on shelves taken whenever the store changes, at about 100K QPS.

A database holds metadata about the items and stores. Generate signals from this data as features for a downstream ML model. Some signals are computed from item state joined with metadata, and some are temporal. You do not need to compute features for every item event: store state in Redis or a database and build the model inputs on each camera event.

Focus: scale, data quality and handling deduplication.

Community answers

No answers contributed by the community yet.

Related courses

Course

Machine Learning Engineer Interview Prep

Land your dream machine learning role at Meta, Google, Amazon, Apple, Microsoft, Nvidia, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Explore ML system design, core concepts, coding, behavioral interviews, and more.

Course

Behavioral Interviews: A Practical Guide for Engineers

Get offers at the level you deserve. Prep for senior+ behavioral interviews at FAANG and Tier-1 companies. Made with staff and principal engineers from Meta, Netflix, Google, and more. Avoid downleveling, elevate past projects, and stop sounding like a robot.