[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
RE: hub compliance - dropping ports
- Subject: RE: hub compliance - dropping ports
- From: Broadfoot, Kieran J
- Date: Wed, 27 Aug 2003 13:15:00 +0000
Kevin,
Thanks for all your responses, I had started to respond to your first opus
but decided against it ;-)
Ive been lurking around the xap world for some time but ive finally got
some
dedicated time to get my code written to help out. As Im primarily solaris
and linux and most of my work is perl I decided on a perl module set for
xAP
(although I also have xap messages feeding off a TINI board in java)
The xAP module effectively provides methods for creating messages, decoding
them, setting segments etc and publishing them onto the network. You can
also set the module into listen mode to receive messages. Basically if it
cant find a hub it immediately takes on the role of hub (only if set to
listen), it will handle passing messages on the correct interfaces to other
ports on the machine running xapplets etc.
Perl doesn't do threading right now hence its better to use forking where
you need multiple tasks running at the same time. Ive played with forks a
lot at work and im not a big fan for this type of application hence my
heartbeats are a little non-deterministic. The hub gets itself into a loop
checking every second for new messages. If nothing appears it increments
the timer value for the heartbeats otherwise it will take the message pass
on to all slaves and then hand off to the message logic which may or may
not
respond etc. Given theres a latency involved in executing the logic it may
miss a second in the loop which means my timer my have reached 10 loops yet
it could easily have been more than 10 seconds. The busier the hub the less
regular my heartbeats will appear.
As an aside after some testing last night I came across a similar problem
in
perl as per VB on windows with respect to publishing on the loopback
interface. Some OS dependent code may need to enter into the module.
hope this explains my situation. adding a fork to handle heartbeats adds
significant complexity which im sure is worthwhile but likewise the cost of
having slow heartbeats may in the long run be more expensive. Ill see what
I can to rectify the situation.
On a different note I mentioned to Mark H a while ago about plans of mine
to
write an ldap <-> xap connector so I could store config data in it or
other
info such as names, CIDs etc. This should conceivably work with Active
Directory for any windows server types who might be interested.
thanks
kieran
p/s As an aside having re-read this message before sending Ive realised I
could probably make the deep loop more deterministic and hence far more
likely to send heartbeats on time!
-----Original Message-----
From: Kevin Hawkins [mailto:<a
href="/group/xAP_developer/post?postID=pUtNbfj3pqwuxq0neDj9mms-iHDptgIPvV9J-19v8mzCk-H9waDZ2V6F2iwYJQO_Cq8BhrPRCwL_zqFM6P7FHPQ">lists@u...</a>]
Subject: RE: [xAP_developer] hub compliance - dropping ports
Hi again Kieran,
Just re-read your message and you state your application is a HUB in
Perl !! Should have read it more carefully.
I have to say that a hub is such a vital component to the operation
of all the other xAPp's that I feel it should be able to send a dependable
and consistent heartbeat itself.
Plus given the 2 heartbeat timeouts for each of possibly many
connected devices, will those not be handled by forks - or by just by a big
loop, decrementing a timeout counter for each ?
Of course as you're writing a hub you are never going to fall foul
of a timeout yourself at all - and other hubs make no use of your hub
heartbeat - only when you get to writing a xAP that utilises a hub might
you
suffer being timed out. But a network monitor (if there was one) might
flag a failure of your hub which is a significant network failing that has
a
knock on effect to all connected xAP's.
Unless I'm on the wrong track - again :-)
K
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|