I’m creating a notification task. I have a web interface to create the task. So, I have two tables, one is NotificationToBeReleased and the other one is Notifications. I want to run a windows service on the server to find all the deliveryDate and start sending email to the users and delete the row from NotificationToBeReleased and enter into Notifications table.
I’m new to this, good basic start would help me a lot! or Any suggestion also welcome.
For firing scheduled tasks, take a look at Quartz.net.
For small notification projects the solution you suggested, polling a database for delivery dates, will work up to a point. The problem comes when you need to check any issues. What happens if the email fails to be sent for example? Should it leave the row there and keep checking every minute. What if the email did actually go out but we failed to clear the row. The user gets swamped with emails.
If you are after scalabilty, polling a database for notifications to send can become an issue. Better to use an enterprise message queue solution . Database as queue anti-pattern