Sorry if my question is abstract but let me explain my problem. I've got a forum that looks like to StackOverflow and built on nodejs and mongodb. There is posts and comments. I need to implement notification system which allows to notify users about adding a new answer to a post, changing post content, adding a new comments.
My problem is I've never implemented this feature before so at now I'm looking for best practices before I start. What I'm primary interested in is generic pattern of implementing this system. In particular what schema for notifications collection is needed? How to determinate subscribers to a post to send an notification? and other nuances which might be in such system.
Just to clarify that I don't need real-time notifications such in facebook but list of notifications at the top (like in SO) and ability to notify by email.
Please give some whitepapers on such system in an internet or some advises on how to implement such system from scratch.
Thanks.