<!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/rtf format -->

<P><B><SPAN LANG="en-us"><FONT COLOR="#000000" SIZE=2 FACE="Microsoft Sans Serif">UNCLASSIFIED</FONT></SPAN></B><SPAN LANG="en-us"><FONT FACE="Arial"> </FONT></SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">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.</FONT></SPAN></P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">To ensure this happens,</FONT><BR>
<FONT COLOR="#0000FF" SIZE=2 FACE="Arial">We wrote a ping function that is quite instructive on how the symettry of eVS can be used to make application functions very simple.</FONT></SPAN></P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">This can be done as a separate process per node as we did, or it can be integrated into the application logic.</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">The algorythm in pseudo code is:</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">// Everyone calculates the next time they will send a ping:</FONT><BR>
<FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Mynextpingsend = now + inter_ping_gap + random_integer_between(0, (number_of_parties_in_my_partition - 1)) * separation_time;</FONT></SPAN></P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">On_alarm( Mynextpingsend) -&gt; spread_send( ping_message );</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">On_receive(): Normal Message -&gt; recalculate next ping; reset ping alarm timer;</FONT><BR>
<FONT COLOR="#0000FF" SIZE=2 FACE="Arial">                    handle application message; // do nothing for pings</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Spread_change_message:  handle it; note new number of parties in our partition;</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">----------</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Basically, the random separation time ensures that usually everyone is not pinging at once.</FONT><BR>
<FONT COLOR="#0000FF" SIZE=2 FACE="Arial">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.</FONT></SPAN></P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">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 +  (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.</FONT></SPAN></P>
<BR>
<BR>
<BR>

<P><SPAN LANG="en-us"><FONT FACE="Times New Roman">DSTO</FONT><BR>
<FONT FACE="Times New Roman">PO BOX 1500</FONT><BR>
<FONT FACE="Times New Roman">Att: Dr Michael Pilling</FONT><BR>
<FONT FACE="Times New Roman">C3ID</FONT><BR>
<FONT FACE="Times New Roman">Building 205</FONT><BR>
<FONT FACE="Times New Roman">Edinburgh SA 5111</FONT><BR>
<FONT FACE="Times New Roman">Ph +61 8 8259 7017</FONT><BR>
<FONT FACE="Times New Roman">Fx +61 8 8259 5589</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>
<BR>

<P><SPAN LANG="en-us"><FONT SIZE=1 FACE="Courier New">Important:   This document remains the property of the Australian Defence</FONT><BR>
<FONT SIZE=1 FACE="Courier New">Organisation and is subject to the jurisdiction of the Crimes Act Section</FONT><BR>
<FONT SIZE=1 FACE="Courier New">70.  If you have  received  this  document in error, you are requested to</FONT><BR>
<FONT SIZE=1 FACE="Courier New">contact the sender and delete the document.  </FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>
<BR>

<P><SPAN LANG="en-us"><FONT SIZE=1 FACE="Tahoma">_____________________________________________</FONT><BR>
<B></B><B></B><B><FONT SIZE=1 FACE="Tahoma">From:  </FONT></B><FONT FACE="Arial"></FONT> <FONT SIZE=1 FACE="Tahoma">Guo, Yanchao [</FONT></SPAN><A HREF="mailto:Yanchao.Guo@sac.com"><SPAN LANG="en-us"><U><FONT COLOR="#0000FF" SIZE=1 FACE="Tahoma">mailto:Yanchao.Guo@sac.com</FONT></U></SPAN></A><SPAN LANG="en-us"><FONT SIZE=1 FACE="Tahoma">]</FONT><BR>
<B></B><B></B><B><FONT SIZE=1 FACE="Tahoma">Sent:  </FONT></B><FONT FACE="Arial"></FONT> <FONT SIZE=1 FACE="Tahoma">Friday, 19 February 2010 17:57</FONT><BR>
<B></B><B></B><B><FONT SIZE=1 FACE="Tahoma">To:    </FONT></B><FONT FACE="Arial"></FONT> <FONT SIZE=1 FACE="Tahoma">Pilling, Michael; spread-users@lists.spread.org</FONT><BR>
<B></B><B></B><B><FONT SIZE=1 FACE="Tahoma">Subject:       </FONT></B><FONT FACE="Arial"></FONT> <FONT SIZE=1 FACE="Tahoma">RE: Tracking network down event [SEC=UNCLASSIFIED]</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Thanks Michael.</FONT><FONT FACE="Arial"></FONT> </SPAN>
</P>

<P><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">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? </FONT><FONT FACE="Arial"> </FONT></SPAN></P>
<BR>

<P><SPAN LANG="en-us"><B><FONT COLOR="#FF0000" SIZE=2 FACE="Microsoft Sans Serif">IMPORTANT</FONT></B><FONT COLOR="#FF0000" SIZE=2 FACE="Microsoft Sans Serif">: 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>
</FONT></SPAN>
</P>

</BODY>
</HTML>