[Spread-users] detecting network outages

John Lane Schultz jschultz at spreadconcepts.com
Wed Jul 8 15:50:30 EDT 2009

Good point!

Another way he could solve it by changing the rules is to spawn a special
thread that goes and sends pings on all of the mailboxes about which he is
concerned periodically.


John Lane Schultz
Spread Concepts LLC
Phn: 443 838 2200 
-----Original Message-----
From: spread-users-bounces at lists.spread.org
[mailto:spread-users-bounces at lists.spread.org] On Behalf Of Daniel F.
Sent: Wednesday, July 08, 2009 3:01 PM
To: Spread Users
Subject: Re: [Spread-users] detecting network outages

In message <96366251.20090708142326 at spreadconcepts.com>, John Schultz
>>From the receiver's side an easier way to achieve the same effect as
>LIVE would be to have your clients send a hello msg periodically (e.g. -
> few seconds) that will force the tcp/ip channel to figure out if it is
>or not. In the scenario you laid out above, the remote client should
quickly g
>et a failure on the socket.

John, you changed the rules of the game :)  Matt asked how he could detect
a loss of connection while stuck in a blocking SP_receive() (which
ultimately boils down to being stuck in a blocking recv()) at a remote
client (or at least that's how I understood it).  Assuming a normal TCP
connection, he'll stay stuck forever (or two hours with a default
SO_KEEPALIVE) if network connectivity between the two nodes is lost.
If he were using event-driven I/O, using select/poll/epoll/etc. before
calling SP_receive(), then he could do as you suggest and periodically
send out his own no-op/hello messages after a suitable timeout.


Spread-users mailing list
Spread-users at lists.spread.org

More information about the Spread-users mailing list