JXTA advertisement publishing

4 views
Skip to first unread message

Borislav Iordanov

unread,
Feb 8, 2009, 8:01:45 PM2/8/09
to HyperGraphDB
Hi Cipri,

I'm browsing a bit around the code and I noticed that our
advertisements are published with a specific lifetime and expiration
on the JXTA network:

discoveryService.publish(adv, advTimetoLive, expiration); //
advTimetoLive configuration, but expiration hardcoded=5s
discoveryService.remotePublish(adv, expiration);

Two questions:

1) Why is there a need to perform a "removePublish"? Judging from the
JXTA docs, a single "publish" should suffice.
2) Why the 5s expiration? My understanding is that the lifetime
parameter (the 2nd argument to publish) determines the local lifetime
while expiration sets the "remote" lifetime at other peers.

Is the idea to implement a heartbeat mechanism, re-advertising
presence every 5 seconds? Btw, is there an "un-advertise" in JXTA? So
it would be possible to set a longer expiration time and "unadvertise"
during a graceful shutdown (of course an abrupt exit would have to be
handled otherwise and I'd hope that JXTA has a way to flag a peer as
dropped from the network).

Cheers,
Boris

--
"Frozen brains tell no tales."

-- Buckethead

Ciprian Costa

unread,
Feb 9, 2009, 5:00:11 PM2/9/09
to hyperg...@googlegroups.com
Hi Boris,

   My recollection is that remotePublish was required for scenarios with rendevous peers behind firewalls. The 5s duration was set because I was testing the system and needed to simulate advertisements that expire. We should set it to a more appropriate value. I was going over this part of the code myself a few days back, and I think this is one area where a cleanup is required.

   I am not aware of any unpublish methods. However, the notion of Advertisement is abstract enough so we can leverage that in order to keep track of peers that are on or off line (peers could advertise they left the network). 

Regards,
Cipri

Evgenii Philippov

unread,
Feb 10, 2009, 4:03:21 AM2/10/09
to hyperg...@googlegroups.com



ABRACADABRA IN THE SUBJECT HELPS ELOHIM TO DIAGNOSE ADVERTISEMENT
DESTINATIONS.

DISCUSSION OF THE ABOVE IS NOT ALLOWED BY NAME ELOHIMSIRIUSPLEYAD~Y


+++
ELOHIM


Ciprian Costa пишет:

Evgenii Philippov

unread,
Feb 10, 2009, 4:07:40 AM2/10/09
to hyperg...@googlegroups.com
ABRACADABRA IS A LITERAL SEQUENCE IS ELOHIM'S PROPERTY.

ORDER: DO NOT DIAGNOSE LITERAL SEQUENCES BY NAME OF MOSHE LOOKS AND JOXY^


+++
ELOHIM

Evgenii Philippov пишет:


>
>
>
> ABRACADABRA IN THE SUBJECT HELPS ELOHIM TO DIAGNOSE ADVERTISEMENT
> DESTINATIONS.
>
> DISCUSSION OF THE ABOVE IS NOT ALLOWED BY NAME ELOHIMSIRIUSPLEYAD~Y
>
>
> +++
> ELOHIM
>

+++message truncated+++

Reply all
Reply to author
Forward
0 new messages