PROFESSIONAL-DATA-ENGINEER · Question #359
You are designing a real-time system for a ride hailing app that identifies areas with high demand for rides to effectively reroute available drivers to meet the demand. The system ingests data from…
The correct answer is B. Group the data by using a hopping window in a Dataflow pipeline, and write the aggregated data to Memorystore. Option B is correct because the requirement calls for a 30-second aggregation window recalculated every 2 seconds - this is the definition of a hopping (sliding) window: a fixed-size window that advances by a smaller hop interval, producing overlapping results. Memorystore…
Question
Options
- AGroup the data by using a tumbling window in a Dataflow pipeline, and write the aggregated data to Memorystore.
- BGroup the data by using a hopping window in a Dataflow pipeline, and write the aggregated data to Memorystore.
- CGroup the data by using a session window in a Dataflow pipeline, and write the aggregated data to BigQuery.
- DGroup the data by using a hopping window in a Dataflow pipeline, and write the aggregated data to BigQuery.
How the community answered
(22 responses)- A9% (2)
- B77% (17)
- C5% (1)
- D9% (2)
Explanation
Option B is correct because the requirement calls for a 30-second aggregation window recalculated every 2 seconds - this is the definition of a hopping (sliding) window: a fixed-size window that advances by a smaller hop interval, producing overlapping results. Memorystore (managed Redis) is the right sink because the requirement explicitly demands low-latency storage for real-time dashboard visualization, which is Redis's core strength.
A is wrong because a tumbling window is non-overlapping and fixed - a 30-second tumbling window would only produce output every 30 seconds, not every 2 seconds as required.
C is wrong on two counts: session windows are activity-gap-based (used for modeling user sessions, not fixed-time aggregations), and BigQuery is a data warehouse optimized for analytical queries, not sub-second dashboard reads.
D is wrong because while the hopping window is correct, BigQuery's ingestion and query latency makes it unsuitable for the low-latency visualization requirement - Memorystore is the appropriate low-latency store here.
Memory tip: Think of it as "hop = overlap." When the output frequency (every 2s) is shorter than the window size (30s), you need a hopping window. And whenever you see "low-latency" + "real-time dashboard" on GCP, that's a signal pointing to Memorystore, not BigQuery.
Topics
Community Discussion
No community discussion yet for this question.