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
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+++