Skip to main content

Issue to retrieve PipeAdvertisements using latest trunk code

10 replies [Last post]
adamman71
Offline
Joined: 2007-01-31

Hi,

I am encountering an issue when trying to discover remote PipeAdvertisements using the latest code in the Trunk.

The scenario is the following:

i) I use 3 peers: EDGE_CLIENT, RDV_GLOBAL, EDGE_SERVICE. Both edges connect successfully to the RDV_GLOBAL.

ii) The EDGE_SERVICE creates a child peergroup called ApplicationPeerGroup, and within the ApplicationPeerGroup, it create another child peergroup called UserPeerGroup. Within the UserPeerGroup, it publishes locally and remotely a PipeAdvertisement.

iii) The EDGE_CLIENT connects to the Net Peer Group, manages to remotely get the PeerGroup Advertisement of the ApplicationPeerGroup, then create this PeerGroup.

iv) Next the EDGE_CLIENT, remotely get the peer group advertisement for the UserPeerGroup from within the ApplicationPeerGroup and manages to create that ApplicationPeerGroup.

v) Then, the EDGE_CLIENT tries to retrieve the PipeAdvertisement remotely from EDGE_SERVICE from within the UserPeerGroup, but unsuccessfully. I am using the following call:

MyDiscoveryService.getRemoteAdvertisements(null, DiscoveryService.ADV, "Name", "*", 50); // I am giving it enough time to do the work before I check in my local cache

REM: The EDGE_CLIENT is started after the EDGE_SERVICE, so it is not up when the pipe advertisement is published remotely from the EDGE_SERVICE.

Why do I manage to get PeerGroup Advertisements successfully from EDGE_SERVICE and not Pipe Advertisements?

Anyone has encountered this issue?

Thanks,

J.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ruozeng_w
Offline
Joined: 2009-08-25

Hi, would you like to tell me what do you mean about "explicitly activate the rendezvous behavior in the child peer groups"?I hava the same problem now……and I'm using JXTA2.4.1
Thank you!

mick_000
Offline
Joined: 2009-01-22

Hi. Y not try specifying some exact value for the parameter "name" in the getRemoteAdvertisements() instead of "*"?? It might work.

hamada
Offline
Joined: 2003-06-12

queries work only on indexed fields locally and remotely. Consult the advertisement's indexables tags for exact fields and case when searching.

adamman71
Offline
Joined: 2007-01-31

Hi,

More information: the search is made on a non-indexed field. Is there an issue if one searches for advertisements on fields which are not indexed? Are less results to be expected in 2.5? I know for sure that my research works on 2.4.

Thanks,

J.

hamada
Offline
Joined: 2003-06-12

only indexed fields can be queried on.

adamman71
Offline
Joined: 2007-01-31

Hi Mohamed,

Thanks for the clarification. I got it wrong, I double checked in the code and the field I was querying on is in fact an indexed field.

Later, I have tried to make a remote search for pipe advertisement using its ID and I get no result too. A pipe ID is an indexed field in Pipe Advertisements.

It looks like a bug to me. When I make a local search on the edge posting the pipe advertisement, I can see it. But, when I make a remote search from the other edge I never get this pipe advertisement.

However, I never get an issue when I fetch peer group advertisements remotely. I always get them. Any ideas?

Thanks,

J.

adamman71
Offline
Joined: 2007-01-31

Ok, my bad.

I retract, there is no issue. I just forgot to explicitly activate the rendezvous behavior in the child peer groups. Now it works fine.

Sorry,

J.

yasseen
Offline
Joined: 2009-05-31

Could you please explain how did you solve that problem .
This was a fault in JXTA practical.
There is no any example describing how to get the published PipeAdvertisement.

Regards

Y.

origama
Offline
Joined: 2007-04-19

Hi Adamman71,
I will probably not get the point, but all the times I have encountered a behaviour like that I have blame it to the absence of a Rendezvous in the new group.

If you don't have a rendezvous in the ApplicationPeerGroup you cannot rely on SRDI for the Discovery, so that it will be done only relying on the underlying multicast service.

Probably this isn't what you was looking for, and surely you already knew that, but I hope it helps.

Cheers.

adamman71
Offline
Joined: 2007-01-31

Thanks Origama,

But the way I create peergroups guarantees that a RDV is available. If not, I would not be able to retrieve the peergroup advertisements. I manage to get these using with TCP/IP only (no multicasting).

J.