Question 1
At the onset of every festive season, there is a surge in quick commerce orders (i.e. orders delivered within 15 minutes) on Swiggy. The supply chain head at Swiggy for a city is interested in a real-time view of the inventory of her dark stores (i.e. stores without nameboards where the supplies are kept and used to fulfil app orders). She wants to see this be presented in a monitor mounted in her office wall that refreshes with the latest info on a city map every 1 minute. Along with the info, there also needs to be the current time so that she gets a visual confirmation that this is the latest data. This dashboard allows her to plan for new orders of specific supplies that she is running out of so that no customer is left unsatisfied. What solution option below best solves for the need?
Route a copy of every quick commerce item ordered to a Kafka topic, useSpark Structured Streaming to continuously read from this topic and update the current counts of supplies, and emit using output mode “Update”.
Route a copy of every quick commerce item ordered to a Kafka topic, useSpark Structured Streaming to periodically read from this topic every 1 minute and update the current counts of supplies, and emit all aggregates using the output mode “Complete”.
Route a copy of every quick commerce item ordered to a Kafka topic, useSpark Structured Streaming to periodically read from this topic every 1 minute and count the supplies ordered in that batch, and emit only all aggregates in that batch using the output mode “Append”.