[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Hub Operations
------=_NextPart_000_0018_01C4B2B8.F3016CE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MessagePort 3639 is someting that needs to be managed and if an
application=
claims responsibility for it, then I thing it also needs to take-on the ro=
le of hub function. One that takes the candy and does not share is not
wel=
l-liked in the playground.=20=20
In my xap work I'm trying to manage redundancy to achieve higher
availabili=
y rates. For me I want to have a hub which has only one role so if I take
=
action to manage that hub I will not need to also be concerned about other
=
functions that the hub may be performing. If my hub happens to double as
a=
n HTTP gateway, then if I swap-out the hub I will also need to figure out
h=
ow to restore the HTTP gateway function. While it all can be done, it
just=
adds to the complexity. The nice thing about xap is how the functionality=
can be split into very small building blocks. When these blocks start to =
do multiple things then the elegance is compromised.
----- Original Message -----=20
From: Patrick Lidstone (Personal e-mail)=20
To: xAP_developer@xxxxxxx=20
Sent: Friday, October 15, 2004 12:20 AM
Subject: RE: [xAP_developer] Hub Operations
I've been using the xapFramework hub and viewer and have the problems o=
f message duplication. To better understand what is happening I wrote a
hu=
b application based upon what I understood from the spec and Patrick
Lidsto=
ne 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
t=
he xapFramework viewer when I run my hub, but when I run the xapFramework
h=
ub I see 192.x.x.x. as the message From. It looks as if the xapFramework
h=
ub 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
dup=
licate messages. Is there concensus on how the hub should operate?
What is also interesting is that the viewer on machine X reports that i=
s sees the viewer on machine Y via the 127.0.0.1:3639 interface. I was
no=
t aware message sent on the loopback interface were visible on other
comput=
ers. What does the xapFramework viewer use to determine the From column
in=
the display?=20
A message sent on the loopback interface categorically cannot be receiv=
ed by any other host under any circumstances.=20
In my hub implementation messages received on the primary interface (p=
ort 3639) are sent on 127.0.0.1 to the subscribed port of each applicaton
o=
n the hub's PC using the port that the application indicated to which is
wa=
s 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.=20
This is the correct implementation.
Related question ....
In a PC desktop application is generally the case that more than one xa=
p application will be running. If this is the case then why will the
deskt=
op application grap port 3639 and prevent normal xap opeations until
manual=
ly stopped? It seems that a PC application should pick some other port
the=
n eventually become active when the hub function comes online.=20
Not sure if I have fully understood what you are saying here, but a hub=
less application running on a PC has no choice but to bind to 3639,
otherwi=
se 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
th=
e arbitrary port chosen by the app. There is a case to be made for
insistin=
g 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,
altho=
ugh I have the code in place, and will probably do so one day.
Patrick
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|