The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Hub Operations


  • Subject: RE: Hub Operations
  • From: "Patrick Lidstone \(Personal e-mail\)" <patrick@xxxxxxxxxxxx>
  • Date: Fri, 15 Oct 2004 08:20:53 +0100


------=_NextPart_000_00AE_01C4B28F.E3403580
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit



I've been using the xapFramework hub and viewer and have the problems of
message duplication.  To better understand what is happening I wrote a
hub application based upon what I understood from the spec and Patrick
Lidstone feedback.  With my hub I no longer get the duplicate messages.
It is my understanding that the hub should use 127.0.0.1 to retransmit
messages to all xap applicaitons on the same PC.  I see this as the From
interface in the xapFramework viewer when I run my hub, but when I run
the xapFramework hub I see 192.x.x.x. as the message From.  It looks as
if the xapFramework hub is using the primary interface for
retransmission.  I do not know which is right or wrong, but I'm just
trying to get my system working without duplicate messages.  Is there
concensus on how the hub should operate?

What is also interesting is that the viewer on machine X reports that is
sees the viewer on machine Y via  the 127.0.0.1:3639 interface.  I was
not aware message sent on the loopback interface were visible on other
computers.  What does the xapFramework viewer use to determine the From
column in the display?

A message sent on the loopback interface categorically cannot be
received by any other host under any circumstances.

In my hub implementation  messages received on the primary interface
(port 3639) are sent on 127.0.0.1 to the subscribed port of each
applicaton on the hub's PC using the port that the application indicated
to which is was bound in the heartbeat message.  All applications send
their messages on the primary interface to port 3639.  I think these
messages will be seen by the local hub and any other computers on the
primary LAN.

This is the correct implementation.

Related question ....

In a PC desktop application is generally the case that more than one xap
application will be running.  If this is the case then why will the
desktop application grap port 3639 and prevent normal xap opeations
until manually stopped?  It seems that a PC application should pick some
other port then eventually become active when the hub function comes
online.

Not sure if I have fully understood what you are saying here, but a
hubless application running on a PC has no choice but to bind to 3639,
otherwise it will be both deaf to incoming xAP messages, and no outgoing
messages be heard by other xAP applications because they will not be
listening on the arbitrary port chosen by the app. There is a case to be
made for insisting that all apps include built in hub functionality,
although this obviously raises the bar for developers. I think the
majority of Stuart's apps take this approach; I haven't got round to it
for the majority of my apps, although I have the code in place, and will
probably do so one day.

Patrick


------=_NextPart_000_00AE_01C4B28F.E3403580
Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>


<DIV><FONT face=Tahoma
size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px
solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial size=2>I've been using the xapFramework
hub and viewer
and have the problems of message duplication.&nbsp; To better
understand what
is happening I wrote a hub application based upon what I understood from
the
spec and Patrick Lidstone feedback.&nbsp; With my hub I no longer get
the
duplicate messages.&nbsp; It is my understanding that the hub should
use
127.0.0.1 to retransmit messages to all xap applicaitons on the same
PC.&nbsp;
I see this as the From interface in the xapFramework viewer when I run my
hub,
but when I run the xapFramework hub I see 192.x.x.x. as the message
From.&nbsp; It looks as if the xapFramework hub is using the primary
interface
for retransmission.&nbsp; I do not know which is right or wrong, but
I'm just
trying to get my system working without duplicate messages.&nbsp; Is
there
concensus on how the hub should operate?</FONT></DIV>
<DIV><FONT face=Arial
size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2>What is also
interesting is that the viewer
on machine X reports that is sees the viewer on machine Y&nbsp;via
&nbsp;the
127.0.0.1:3639 interface.&nbsp; I was not aware&nbsp;message sent
on&nbsp;the
loopback interface were visible on other computers.&nbsp; What does the
xapFramework viewer use to determine the From column in the
display?<SPAN
class=027581507-15102004><FONT
color=#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=027581507-15102004></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=027581507-15102004><FONT
color=#0000ff>A message sent on the loopback interface categorically
cannot be
received by any other host under any
circumstances.</FONT>&nbsp;</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial
size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2>In my hub
implementation&nbsp; messages
received on the primary interface (port 3639) are sent on 127.0.0.1 to the
subscribed port of each applicaton on the hub's PC using the port that the
application indicated to which is was bound in the heartbeat
message.&nbsp;
All applications send their messages on the primary interface to port
3639.&nbsp; I think these messages will be&nbsp;seen
by&nbsp;the local hub and
any other computers on the primary LAN.<SPAN
class=027581507-15102004><FONT
color=#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=027581507-15102004></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=027581507-15102004><FONT
color=#0000ff>This is the correct
implementation.</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial
size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Related question
....</FONT></DIV>
<DIV><FONT face=Arial
size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2>In a PC desktop
application is generally
the case that more than one xap application will be running.&nbsp; If
this is
the case then why will the desktop application grap port 3639 and prevent
normal xap opeations until manually stopped?&nbsp; It seems
that&nbsp;a&nbsp;PC application should pick some&nbsp;other
port then
eventually become active when the hub function comes online.<SPAN
class=027581507-15102004><FONT
color=#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=027581507-15102004></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=027581507-15102004><FONT
color=#0000ff>Not sure if I have fully understood what you are saying
here,
but a hubless application running on a PC has no choice but to bind to
3639,
otherwise it will be both deaf to incoming xAP messages, and no outgoing
messages be heard by&nbsp;other xAP applications because they will not
be&nbsp;listening on the arbitrary port chosen by the app. There is a
case&nbsp;to be made for insisting that all apps include built in hub
functionality, although this obviously raises the&nbsp;bar for
developers. I
think the majority of Stuart's apps take this approach; I haven't got round
to
it for the majority of my apps, although&nbsp;I&nbsp;have the code
in place,
and will probably do so one
day.</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff size=2><SPAN
class=027581507-15102004></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT color=#0000ff size=2><SPAN
class=027581507-15102004>Patrick</SPAN></FONT></FONT><!--
**end egp html banner** --></DIV></BLOCKQUOTE>

<br>

<!-- **begin egp html banner** -->

<table border=0 cellspacing=0 cellpadding=2>
<tr bgcolor=#FFFFCC>
<td align=center><font size="-1"
color=#003399><b>Yahoo! Groups
Sponsor</b></font></td>
</tr>
<tr bgcolor=#FFFFFF>
<td align=center width=470><table border=0 cellpadding=0
cellspacing=0> <tr> <td align=center><font face=arial
size=-2>ADVERTISEMENT</font><br><a href="http://us.ard.yahoo.com/SIG=129bjvbp0/M=315388.5500238.6578046.3001176/D=groups/S=1705007709:HM/EXP=1097911290/A=2372354/R=0/SIG=12id813k2/*https://www.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS";
alt=""><img src="http://us.a1.yimg.com/us.yimg.com/a/ho/household/f2_free2_300x250_def_0904.gif";
alt="click here" width="300" height="250"
border="0"></a></td></t
r></table> </td>
</tr>
<tr><td><img alt="" width=1 height=1 src="http://us.adserver.yahoo.com/l?M=315388.5500238.6578046.3001176/D=groups/S=:HM/A=2372354/rand=203450171";></td></tr>
</table>

<!-- **end egp html banner** -->



<!-- **begin egp html banner** -->

<br>
<tt><hr width="500">
<b>Yahoo! Groups Links</b><br>
<ul>
<li>To visit your group on the web, go to:<br><a
href="http://groups.yahoo.com/group/xAP_developer/";>http://groups.yahoo.com/group/xAP_developer/</a><br>&nbsp;
<li>To unsubscribe from this group, send an email to:<br><a
href="mailto:xAP_developer-unsubscribe@xxxxxxx?subject=Unsubscribe";>xAP_developer-unsubscribe@xxxxxxx</a><br>&nbsp;
<li>Your use of Yahoo! Groups is subject to the <a href="http://docs.yahoo.com/info/terms/";>Yahoo!
Terms of Service</a>.
</ul>
</tt>
</br>

<!-- **end egp html banner** -->


</BODY></HTML>

------=_NextPart_000_00AE_01C4B28F.E3403580--




xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.