Design a notification ranking system for a large consumer product. Each user may receive candidate notifications from many sources: friend activity, comments, mentions, groups, marketplace updates, ads, product education, system alerts, and security messages.