tags:

views:

136

answers:

2

I have a lot of client programs and one service. This Client programs communicate with the server with http channel with WCF.

The clients have dynamic IP. They are online 24h/day.

I need the following: The server should notify all the clients in 3 min interval. If the client is new (started in the moment), is should notify it immediately.

But because the clients have dynamic IP and they are working 24h/day and sometimes the connection is unstable, is it good idea to use wcf duplex?

What happens when the connection goes down? Will it automatically recover?

Is is good idea to use remote MSMQ for this type of notification ?

Regards,

+1  A: 

WCF duplex is very resource hungry and per rule of thumb you should not use more than 10. There is a lot of overhead involved with duplex channels. Also there is not auto-recover.

If you know the interval of 3 minutes and you want the client to get information when it starts why not let the client poll the information from the server?

Flo
In this moment the clients pools the info form the server. But I was looking for probably better solution. Sometimes the info in the server is not ready when the client asks, so the client needs to perform several requests, and because the huge amount of clients there can be unnecessary overload on the server. That is the reason that I am seeking for push technology. When the server is ready it pushes the info to all clients. I have found that MSMQ can push info to remote clients. I am not sure about auto recovery and security and of course about overload and possible problems.
darko petreski
In order to push data to the client using callbacks it has to register at the server at least once because you don't know the client IPs. You could also store each client IP in a list at the server when the client IP changes or the client starts. You can then use this list to contact the clients without using callbacks. But this would require a direct connection from the server to the client or port forwarding in case the client is behind a firewall.
Flo
A: 

When the connection goes down the callback will throw an exception and the channel will close.

I am not sure MSMQ will work for you unless each client will create an MSMQ queue for you and you push messages to each one of them. Again with an unreliable connection it will not help. I don't think you can "push" the data if you loose the connection to a client, client goes off-line or changes an IP without notifying your system.

Vitalik