I'm implementing a feed in it some notifications should be displayed as a group (i.e. a user posted a comment on your video) and others as standalone notifications (Your video is featured this week). Highlighting new notifications is also a requirement
For grouped notifications, when the user consult his feed the entry should be something like
Joe and other 5 posted a comment on your video "Cooking with fire"
The problem is how to group the events when the notifications are interleaved.
In example, imagine the following log:
1 min ago Joe posted comment on video 1
10 mins ago Video 1 featured
11 mins ago Helen posted comment on video 1
11 mins ago Michael posted comment on video 1
14 mins ago David posted comment on video 1
14 mins ago Robert posted comment on video 1
The feed coud be grouped in several ways. Even new notifications may alter the groups breaking the highlighting.
Where can I read more about common solutions for this problem and how to store and return the notifications for my web service?