Message Boards

Duplicated notification body

Václav Suchánek, modified 2 Years ago.

Duplicated notification body

Junior Member Posts: 25 Join Date: 8/15/18 Recent Posts

I have a question about notifications.

When a notification is sent, a record is created in the usernotificationevent table that carries in payload column useful information that is used to display the notification.
The body of the notification (usually HTML code) is also a part of the record in the payload.

What is bothering me is the fact there is a duplication of records. For each user who receives a notification, there is an entry in the usernotificationevent table.
Ie. if it sends one message that is addressed to 10000 users, then 10000 records will appear in the database with the same information in the payload.
Instead of this there could be only one record that would carry the body of the notification.

I'm wondering what is the main purpose or benefit of this approach? Does it shorten the time of reading data from the database? Or is it convenient to use a template of some system? Does it play a key role in the processing of different types of notifications such as website, email or sms?

 

Thank you very much and have a nice day,

Vaclav

thumbnail
Olaf Kock, modified 2 Years ago.

RE: Duplicated notification body (Answer)

Liferay Legend Posts: 6396 Join Date: 9/23/08 Recent Posts

One way or another, you'd have to store 10000 records sooner or later - if only to store the "read" state for the message.

If you're using notification to this scale, you might want to check if you're better off with general alerts. Note: Notifications technically could also be personalized, e.g. contain personalized links or text.

Are 10000 users all of your userbase or only a small fraction​​​​​​​?

Václav Suchánek, modified 2 Years ago.

RE: RE: Duplicated notification body

Junior Member Posts: 25 Join Date: 8/15/18 Recent Posts

Let's say our userbase is about 10000 users.
If there is a tendency to have notifications personalized then it makes sense to me.

Thank you very much for your answer.