Task 12 – enhancing SportTracker by runner motivation using CoGroupByKey
In Task 11, we solved the problem of sending motivating push notifications to users currently on track using side inputs. We already know that this approach might suffer from the problem of forcing the side input to fit into memory for all users, which might become restrictive once we have many users. The chances are pretty high that we will not ever hit the memory limit in such a use case, but let's assume that we want to avoid using side inputs and use CoGroupByKey
instead.
Now, let's redefine Task 11 so that we can reimplement it by using CoGroupByKey
.
Problem definition
Implement Task 11 but instead of using side inputs, use CoGroupByKey to avoid any possible memory pressure due to forcing side input to fit into memory for all keys (user-tracks).
Problem decomposition discussion
We will reuse as much code from Task 11 as we can. Our discussion of the problem remains, so our...