Task 11 – Enhancing SportTracker by runner motivation using side inputs
In our first task for this chapter, we will enhance the SportTracker
application we used in Task 5. We want to create motivating push notifications for users who are currently on track. Users will be notified every minute with information on whether their running performance over the last minute was better than their average pace over the last 5 minutes. Let's look at this problem in more detail.
Problem definition
Calculate two per-user running averages over the stream of artificial GPS coordinates that we generated for Task 5. One computation will be the average pace over a longer (5-minute) interval, while the other will be over a shorter (1-minute) interval. Every minute, for each user, output information will be provided regarding whether the user's current 1-minute pace is higher or lower than the longer average if the short average differs by more than 10%.
We will use our output_topic...