Grouping Notifications API

Hello everyone,

I opened a ticket a while ago about the SimilarityCalculator ([XWIKI-17034] Allow to define a custom SimilarityCalculator event algorithm - JIRA) because the current implementation annoys me when developing extension. My main issue is that it’s not possible in an extension to specify that you don’t want two notification of same type to be grouped together.

When trying to look how to fix it, I discovered that it would involve some design changes in the way we handle grouped notification, and some new APIs for it to be used or defined in extensions.
So I just created a new design page to try gathering the usecases related with grouping notifications, so please check it and provide feedback if you feel I’m missing some: