I have a reminder functionality using signal R in asp.net mvc I have userinterface to set the reminder time, If the current time matches the reminder time , it invokes a popup. I successfully implemented this functionality with Signal R by checking the database once in every 30 seconds by using javascript timer. If current time does not match, it gives '0'.If it matches, it return '1' and the popup is shown across all browsers. But can this checking the db for every 30 seconds can be replaced by signal R ? is there any way to bring this whole thing to signal R?
You can use System.Threading.Timer to create a periodical method call to both client and server side. According to Sample project created for stocks
_timer = new Timer(UpdateStockPrices, null, _updateInterval, _updateInterval);
It creates and Event-Delegate and calls UpdateStockPrices event timely with period of __updateInterval. In This event(code given below) you can broadcast the remainder message from server to all clients or clients who are associated with that remainder. You can write code as :-
Clients.All.updateStockPrice(stock);
You can refer to Timer from link:- http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx