<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: Tracking network down event [SEC=UNCLASSIFIED]</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Thanks for the example Michael.<BR>
<BR>
&quot;The receiving side will be notified when it, or some other party in the fragment it is now a member of, attempts to send a message.&quot; What if my I have a &quot;pure&quot; receiver which only receive but not send, and connection between the receiver and the spread daemon is down? in that case will it receive any notification?<BR>
<BR>
>From my testing it is not.<BR>
Yanchao<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Pilling, Michael [<A HREF="mailto:Michael.Pilling@dsto.defence.gov.au">mailto:Michael.Pilling@dsto.defence.gov.au</A>]<BR>
Sent: Sun 2/21/2010 11:00 PM<BR>
To: Guo, Yanchao; spread-users@lists.spread.org<BR>
Subject: RE: Tracking network down event [SEC=UNCLASSIFIED]<BR>
<BR>
UNCLASSIFIED<BR>
<BR>
The receiving side will be notified when it, or some other party in the fragment it is now a member of, attempts to send a message.<BR>
<BR>
To ensure this happens,<BR>
We wrote a ping function that is quite instructive on how the symettry of eVS can be used to make application functions very simple.<BR>
<BR>
This can be done as a separate process per node as we did, or it can be integrated into the application logic.<BR>
<BR>
The algorythm in pseudo code is:<BR>
<BR>
// Everyone calculates the next time they will send a ping:<BR>
Mynextpingsend = now + inter_ping_gap + random_integer_between(0, (number_of_parties_in_my_partition - 1)) * separation_time;<BR>
<BR>
On_alarm( Mynextpingsend) -&gt; spread_send( ping_message );<BR>
<BR>
On_receive(): Normal Message -&gt; recalculate next ping; reset ping alarm timer;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handle application message; // do nothing for pings<BR>
<BR>
Spread_change_message:&nbsp; handle it; note new number of parties in our partition;<BR>
<BR>
----------<BR>
<BR>
Basically, the random separation time ensures that usually everyone is not pinging at once.<BR>
When a ping or any other application message is heard the current wave of pings are surpressed, so there is no extra load during active periods.<BR>
<BR>
No matter how many partitions the network breaks into, some party in the partition in guaranteed to be first at sending a ping message no more than inter_ping_gap +&nbsp; (number_of_parties_in_my_partition - 1) * separation_time after the last message got through. At this point it will force spread to recalculate connectivity and notify all parties within that partition of configuration changes.<BR>
<BR>
<BR>
<BR>
<BR>
DSTO<BR>
PO BOX 1500<BR>
Att: Dr Michael Pilling<BR>
C3ID<BR>
Building 205<BR>
Edinburgh SA 5111<BR>
Ph +61 8 8259 7017<BR>
Fx +61 8 8259 5589<BR>
<BR>
<BR>
Important:&nbsp;&nbsp; This document remains the property of the Australian Defence<BR>
Organisation and is subject to the jurisdiction of the Crimes Act Section<BR>
70.&nbsp; If you have&nbsp; received&nbsp; this&nbsp; document in error, you are requested to<BR>
contact the sender and delete the document.&nbsp;&nbsp;<BR>
<BR>
<BR>
_____________________________________________<BR>
From:&nbsp;&nbsp; Guo, Yanchao [<A HREF="mailto:Yanchao.Guo@sac.com">mailto:Yanchao.Guo@sac.com</A>]<BR>
Sent:&nbsp;&nbsp; Friday, 19 February 2010 17:57<BR>
To:&nbsp;&nbsp;&nbsp;&nbsp; Pilling, Michael; spread-users@lists.spread.org<BR>
Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RE: Tracking network down event [SEC=UNCLASSIFIED]<BR>
<BR>
Thanks Michael.<BR>
<BR>
So from your description, can I say that my application will be notified only when it tries to send data? How about the receiving side?&nbsp;<BR>
<BR>
<BR>
IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email.<BR>
<BR>
<BR>
<BR>
</FONT>
</P>



DISCLAIMER: This e-mail message and any attachments are intended solely for the use of the individual or entity to which it is addressed and may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and permanently delete this message and any attachments. 
</BODY>
</HTML>