Quite simply I have a SQL database with a .net front end and I need to set off event's when an specific time is reached . I call them alarms , so a user can set an alarm for say 12:30am on x day and when that time is reached on x day a popup would appear reminding them.
What is the best way to achieve this , should I poll the database or try to use SQL triggers?. I have not attempted this before so , if anyone has experience could you shed some light on the best approach? and any potholes that I should try to avoid falling into !.
Any insight = great
Yes sorry triggers where in my head for another project (lack of sleep).
To clarify , Multiple clients may be connected (usually 2 will always be on ,but it might be the case that everything goes down and none are connected) So I will need to think about how the alarms/popups happen. When they receive a popup alarm , they can choose to dismiss or "action" it , to say they have done the task.
Depending on the information on the alarm , different users should be notified i.e some people won't get the alarm if chosen , (hopefully achieve this through active directory logins and keep a table of current users & assign each to an area so people will only see alarms in there area, while others may just receive all )
Thanks for all the input : It sounds like I will want a central program or service?.
I could have a service that keeps polling the database checking alarm times and current active users, if found it updates a notification table which the user pages polls for every couple of seconds(10)(Clarify: The alarm times , should be put in well in advance and the alarm notification does not need to be seconds accurate). How does that sound?.
In terms of load , I can't see more than around 15-20 using it at the one time but usually only around 5-6.
Any glaringly obvious omissions or concerns?.