This question evaluates proficiency in real-time stream processing, stateful aggregation and ranking, event-time windowing, and distributed systems concerns such as fault tolerance, deduplication, and scalability.
Design a real-time service that ingests purchase events and continuously outputs the top‑K most purchased items over configurable rolling windows (for example: last 5 minutes and last 24 hours).
Each purchase event contains:
Assume K and window sizes are configurable at runtime.
Specify and justify:
Make minimal, explicit assumptions as needed (e.g., target throughput, latency SLOs), and propose a design that works for both a short window (5m) and a long window (24h).
Login required