简体   繁体   中英

wcf and duplex communication

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,

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM