I'm working on developing an activity stream for a running club I'm working with. Runners will be able to see all the fun and good things that they and their friends have been up to over the past few weeks.
Obie Fernandez gave a great talk on how to approach this using Redis at RailsConf 2012 (the videos on YouTube here) and I've adapted this to work within our app.
Having run it for a few days, it's clear my next challenge is to build aggregated items into this list now. Take for example the following feed:
Here it's clear that the top story would better collapse into something like "Shaun, Alexander and Ivo completed a Group Run...", but this poses an interesting question when thinking about comments. Currently a comment is associated with an individuals action of going on the run. So the comment on Ivo's attendance on the run are directed at him. In collapsing the story, I'm not entirely sure how to handle the commenting. It could be the comment then gets distributed amongst all the people you're friends with who went on the run, but I can see this very quickly becoming messy when people with have different sets of friends. The comments could instead just link directly back to the run itself, but then they lose the value of being able to reference a particular user's attendance.
I'd love to hear people's thoughts on this, and any pointers to good design patterns out there for handling this.