jeudi 17 novembre 2016

How many rows to insert per notification in a notification system?

Following on from this question I am looking at building a similar notification system and I have a question (which has an obvious answer I think but I'd prefer to have some other opinions):

If a particular post generated a million likes, and then someone adds a comment to that post, I would need to notify those million people who liked the post about the comment that was added. Is the only way to achieve this to write a million rows into a NotificationRead table which has the NotificationID and 'send' them to the various users?

I can't visualise any other approach that would let me keep a track of who read their notifications and potentially inserting a million rows per post per notification sounds daunting and expensive.

Is there any other way to do it? I am using SQL Server 2014 and my application server is ColdFusion 2016

Aucun commentaire:

Enregistrer un commentaire