tags:

views:

98

answers:

4

We have an asp.net application that needs to be expanded to notify users when an update occurs. All users need to be notified even if they don't have the asp.net app opened. All notifications must occur at the same time for everyone, so email is not an option. The application will run on a corporate network with standardized client computers running Windows XP. Approximately 45 users/client computers need to receive these updates.

My initial thoughts are to create a windows service that runs on each client computer and polls a web service (say every minute) during business hours. When an update occurs it will set a notification time (say 5 minutes from the update). As the client computers poll the web service they will receive the update and use the notification time to schedule the notification on the client computer. The client computers will schedule the notification based on the time on the server not the time on the local computer. If this works properly all client computers will notify users at the exact same time.

Does this solution make sense? How would you do it differently?

EDIT: If a client is off or disconnected they will not receive the update and they do not need to receive the update in the future. These updates are only relevant for a short period of time.

+2  A: 

I'd say to use a "push" method, where each of the clients registers with the host (from a service), and when the host gets an update, it notifies all of the registered clients (services). But it sounds to me like there are some issues you need to consider as well; what if one (or more) of the clients are simply off at the time of the update? Do they get late notification, or none at all? What if the network is down for a set of users? Does that invalidate the update for all users?

McWafflestix
As McWafflestix said, with his answer as best solutions, you would now have to fix a few design issues:- if one (or more) of the clients are simply off at the time of the update? On te act of register u do a update missing check or push latest to the subscribervery good answer
Kamia
Good point, I was thinking any client that was off would receive the notification next time it connects and ignore it since it was in the past. If the client is not connected at the time of the notification they will not receive the notification. I'm not concerned about the network being down for a set of users, if that occurs we will have bigger issues than receiving these notifications.
Mike Bennett
A: 

Not really familiar with ASP - but this doesn't sound like you need a language-specific answer. Just have your updated POSTed to a webserver, then your clients can poll that server at their leisure. Give them the last X number of updates and they can decide if they need to update their UI. A design like this is better anyway, since if your app ever goes away from ASP (or you design other clients that need this info) it's in a standard (HTTP) communication format (RESTful design).

Also the Windows command:

net send <message>

can be used by an admin of a network to push messages to computers on that network

Gandalf
+1  A: 

I wouldn't do polling as all of your computers would be doing that and polling is not "synchronous". At least, not as much as push can be. Use a push method (like juggernaut - http://juggernaut.rubyforge.org/, or Push in Flash). I'm also pretty certain there's some sort of push client built into Windows, but I'm not a desktop app developer...

Walker
A: 

Have you considered Full Duplex WCF? It could do what you need.

schmoopy
I think you're right, that is what we need. Thanks
Mike Bennett