WCF Server Push connectivity test. Ping()?

Your approach sounds reasonable, here are some links that may or may not help (they are not quite exactly related): stackoverflow.com/questions/1427926/dete... tomasz.janczuk.org/2009/08/performance-o... Having some health check built into your application protocol makes sense If you are worried about malicious clients, then add authorization The second link I shared above has a sample pub/sub server, you might be able to use this code. A couple things to watch out for -- consider pushing notifications via async calls or on a separate thread. And set the sendTimeout on the tcp binding HTH.

Your approach sounds reasonable, here are some links that may or may not help (they are not quite exactly related): stackoverflow.com/questions/1427926/dete... tomasz.janczuk.org/2009/08/performance-o... Having some health check built into your application protocol makes sense. If you are worried about malicious clients, then add authorization. The second link I shared above has a sample pub/sub server, you might be able to use this code.

A couple things to watch out for -- consider pushing notifications via async calls or on a separate thread. And set the sendTimeout on the tcp binding. HTH.

Thanks! This is a good answer. As this question has to do, in part, with opinions, I'd like to get a few more, so I'm leaving it open.

But +1 so far. – uosÉ? Å¿ Nov 9 '09 at 17:26.

I wrote a WCF application and encountered a similar problem. My server checked clients had not 'plug pulled' by periodically sending a ping to them. The actual send method (it was asynchronous being a server) had a timeout of 30 seconds.

The client simply checked it received the data every 30 seconds, while the server would catch an exception if the timeout was reached. Authorisation was required to connect to the server (by using the built-in feature of WCF that force the connecting person to call a particular method first) so from a malicious client perspective you could easily add code to check and ban their account if they do something suspicious, while disconnecting users who do not authenticate. As the server I wrote was asynchronous, there wasn't any way to really block it.

I guess that addresses your last point, as the asynchronous send method fires off the ping (and any other sending of data) and returns immediately. In the SendEnd method it would catch the timeout exception (sometimes multiple for the client) and disconnect them, without any blocking or freezing of the server. Hope that helps.

You could use a publisher / subscriber service similar to the one suggested by Juval: msdn.microsoft.com/en-us/magazine/cc1635... This would allow you to persist the subscribers if losing the server is a typical scenario. The publish method in this example also calls each subscribers on a separate thread, so a few dead subscribers will not block others...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions