Help on my notification framework
Hey guys,
I'm working on a notification framework for our ASP.NET MVC 5 application. Whenever a notification is created in the table I need to:
- Show an alert on their dashboard (Using SignalR for this)
- Send an email of the notification to the user (Using Sendgrid for this)
- Send a Text Message of the notification to the user (Using Twillio for this)
Of course, we only send an email/text message if they have agreed to those types of notifications.
In the past what I have done is just created a console application that ran every 5 minutes that would send out email notifications and then update the notification record column sent = true.
However, I'm thinking there may be a better way, but I'd like some feedback. I'm thinking of using Azure functions and Azure Storage Queue's.
- We create a notification: Insert into dbo.Notification table (to show on the dashboard).
- At the same time we send a POST request to a webhook of an Azure function that inserts it into the queue for email/text messaging.
- We have another Azure function that then processes the items in the queue and sends the email and/or text.
Question:
1. Thoughts on this? Should I make it easier and not even use the queue?
2. I won't be updating the original notification record that we processed the email/text messaging. If it fails, it just fails with no re-processing possible.
3. I really just need a sanity check here guys.
0 comments:
Post a Comment