<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title></title>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
body {
  margin: 5px 5px 5px 5px;
  background-color: #ffffff;
}
/* ========== Text Styles ========== */
hr { color: #000000}
body, table /* Normal text */
{
 font-size: 9pt;
 font-family: 'Courier New';
 font-style: normal;
 font-weight: normal;
 color: #000000;
 text-decoration: none;
}
span.rvts1 /* Heading */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-weight: bold;
 color: #0000ff;
}
span.rvts2 /* Subheading */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-weight: bold;
 color: #000080;
}
span.rvts3 /* Keywords */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-style: italic;
 color: #800000;
}
a.rvts4, span.rvts4 /* Jump 1 */
{
 font-size: 10pt;
 font-family: 'Arial';
 color: #008000;
 text-decoration: underline;
}
a.rvts5, span.rvts5 /* Jump 2 */
{
 font-size: 10pt;
 font-family: 'Arial';
 color: #008000;
 text-decoration: underline;
}
span.rvts6
{
 font-size: 11pt;
 font-family: 'tahoma';
 font-weight: bold;
 color: #ffffff;
 background-color: #0000ff;
}
span.rvts7
{
 font-family: 'arial';
}
a.rvts8, span.rvts8
{
 font-family: 'arial';
 color: #0000ff;
 text-decoration: underline;
}
span.rvts9
{
 font-size: 6pt;
 font-family: 'times new roman';
}
span.rvts10
{
 font-family: 'arial';
 font-weight: bold;
}
span.rvts11
{
 font-size: 8pt;
 font-family: 'arial';
}
span.rvts12
{
 font-size: 0pt;
 font-family: 'arial';
 vertical-align: super;
}
span.rvts13
{
 font-size: 7pt;
 font-family: 'arial';
}
a.rvts14, span.rvts14
{
 font-size: 7pt;
 font-family: 'arial';
 color: #0000ff;
 text-decoration: underline;
}
span.rvts15
{
 font-size: 6pt;
 font-family: 'arial';
 font-weight: bold;
 color: #999999;
}
span.rvts16
{
 font-size: 6pt;
 font-family: 'arial';
 color: #999999;
}
span.rvts17
{
 font-size: 12pt;
 font-family: 'times new roman';
}
/* ========== Para Styles ========== */
p,ul,ol /* Paragraph Style */
{
 text-align: left;
 text-indent: 0px;
 padding: 0px 0px 0px 0px;
 margin: 0px 0px 0px 0px;
}
.rvps1 /* Centered */
{
 text-align: center;
}
--></style>
</head>
<body>

<p>I looked at sp.c and it does look like your bug report and fix seem correct. &nbsp;I'm *REALLY* surprised this hasn't been seen before now, because this bug looks like it should affect any little endian architecture, which most client machines are.</p>
<p><br></p>
<p>1) Spread is an asynchronous messaging system, meaning that wall clock time has little to do with when messages are delivered and processed. &nbsp;However, depending on the level of service requested by the sender it can be that members M1 and M2 receive the same messages in the exact same order (i.e. - AGREED_MESS).</p>
<p><br></p>
<p>2) A spread daemon maintains a message delivery queue for each client that is connected to it. &nbsp;Messages for a given client will remain in its queue until that client reads it, disconnects or is forcibly disconnected. &nbsp;One common way to manipulate this queue is to change its maximum size at compile time. &nbsp;If too many messages pile up for a given client, then it will eventually be forcibly disconnected by the daemon. &nbsp;To dynamically measure and manipulate this queue you would have to alter the daemon and probably the client-daemon protocol to enable the extended functionality you desire.</p>
<p><br></p>
<p>3) Load sharing is usually accomplished in Spread in a round-robin fashion simply by having the Nth member of the group process every Nth message modulo the size of the group while using the AGREED_MESS level of service. &nbsp;When Spread delivers a membership change, everyone gets the same membership list in the same order and can know its position within the list and thus know which messages it should process and which it should ignore.</p>
<p><br></p>
<p>Cheers!</p>
<p>John</p>
<p><br></p>
<p>---</p>
<p>John Lane Schultz</p>
<p>Spread Concepts LLC</p>
<p>Phn: 443 838 2200&nbsp;</p>
<p>Fax: 301 560 8875</p>
<p><br></p>
<p>Friday, January 18, 2008, 5:16:46 AM, you wrote:</p>
<p><br></p>
<div><table border=0 cellpadding=1 cellspacing=2>
<tr valign=top>
<td width=12 style="background-color: #0000ff;">
<p><span class=rvts6>&gt;</span></p>
</td>
<td width=803 style="background-color: #ffffff;">
<p><span class=rvts7>Bug:</span></p>
<p><span class=rvts7>&nbsp;</span></p>
<p><span class=rvts7>Sp.c</span></p>
<p><span class=rvts7>int SP_connect_timeout(</span></p>
<p><span class=rvts7>&#8230;</span></p>
<p><span class=rvts7>&nbsp; &nbsp; &nbsp; host_address = ( (i1 &lt;&lt; 24 ) | (i2 &lt;&lt; 16 ) | (i3 &lt;&lt; 8) | i4 ); // bug here</span></p>
<p><span class=rvts7>&nbsp;</span></p>
<p><span class=rvts7>under win32 on AMD Athlon XP 2800+ it is not work&#8230;</span></p>
<p><span class=rvts7>If string for connect is&nbsp;</span><a class=rvts8 href="mailto:3333@128.220.221.1">3333@128.220.221.1</a></p>
<p><span class=rvts7>TCP connection goes to port 3333, IP 1.221.220.128, but it is expected &#8220;128.220.221.1&#8221;</span></p>
<p><span class=rvts7>&nbsp;</span></p>
<p><span class=rvts7>I suggest use instead:</span></p>
<p><span class=rvts7>host_address = htonl(( (i1 &lt;&lt; 24 ) | (i2 &lt;&lt; 16 ) | (i3 &lt;&lt; 8) | i4 ));</span></p>
<p><span class=rvts7>&nbsp;</span></p>
<p><span class=rvts7>&nbsp;</span></p>
<p><span class=rvts7>Questions:</span></p>
<p><span class=rvts7>&nbsp;</span></p>
<p><span class=rvts7>1)</span><span class=rvts9>&nbsp; &nbsp; &nbsp; &nbsp;</span><span class=rvts7>How works message synchronization &#8211; i.e. if someone sends message(MSG) to group with two members M1 and M2 is message arrived in the same time to both members or asynchronously?</span></p>
<p><span class=rvts7>2)</span><span class=rvts9>&nbsp; &nbsp; &nbsp; &nbsp;</span><span class=rvts7>As I understand a message stays in some queue on spread demon(s) until all spread users in group received it. Is it true? How I can manipulate this queue &#8211; measure max load, change size, add &#8220;expired time&#8221;?</span></p>
<p><span class=rvts7>3)</span><span class=rvts9>&nbsp; &nbsp; &nbsp; &nbsp;</span><span class=rvts7>How I can change the &#8220;strategy of delivery&#8221;? For example I want to implement load sharing in the group with two members M1 and M2. Odd messages process M1, even messages process M2.&nbsp;</span></p>
<p><span class=rvts7>&nbsp;</span></p>
<p><span class=rvts7>Best regards,</span></p>
<p><span class=rvts10>Igor Lobiv</span></p>
<p><span class=rvts7>Telco Software Development Sector</span></p>
<p><span class=rvts11>&nbsp;</span></p>
<p><span class=rvts7>SITRONICS Telecom Solutions, Czech Republic a.s.</span></p>
<div><table border=0 cellpadding=0 cellspacing=0>
<tr valign=top>
<td width=360 style="background-color: #ffffff;">
<p><span class=rvts12>&nbsp;</span></p>
</td>
</tr>
</table>
</div>
<p><span class=rvts13>Tel.: +420 211 030 655, &nbsp;Mobile: +420 724 936 638, Fax: +420 296 524 103&nbsp;</span></p>
<p><span class=rvts13>BB Centrum &#8211; Beta, Vyskočilova 1461/2b, 140 00 &nbsp;Praha 4, Czech Republic</span></p>
<p><a class=rvts14 href="http://www.sitronicsts.com/">www.sitronicsts.com</a></p>
<p><br></p>
<p><span class=rvts15>DISCLAIMER</span></p>
<p><span class=rvts16>This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Top secret. Please delete it before read. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.</span></p>
<p><span class=rvts17>&nbsp;</span></p>
</td>
</tr>
</table>
</div>

</body></html>