Skip to main content

JXME - Problem where all edge peers no rendezvous peer

3 replies [Last post]
krobinson
Offline
Joined: 2007-06-12
Points: 0

Hello,
I am in the final throws of completing my master's thesis. The goal is to have a group of devices which dynamically form a TCP/IP network running over a Bluetooth piconet. These devices will send/receive messages, transfer code and dynamically load that code.

I have done the java component which sets up the Bluetooth layer.

The next part requires JXME edge peers to exist in tht Bluetooth piconet. Because the Bluetooth network is self-contained all the devices will need to use JXME (v 2.1.3). There is no default rendezvous peer implementation.

I have a number of questions:

1. Is this sort of network topology possible or do you at least need one Rendezvous peer.

2. If this topology is possible how do you use ConfigurationFactory to not seed the .jxta/PlatformConfig file with a relay peer and a rendezvous peer?

3. I am using the code examples from the GroupDemo and JXTA programmer' guilde 2.3. This is being done on the same linux box running in two separate directories. Peer number 1 (P1) gets a discovery service, adds a discovery listener, creates a group and repeatedley publishes it, both locally and remotely. Peer number 2 (P2) gets a discovery service, add a discovery listener (the one that prints out all the responses) and repeatedly calls get remoteAdvertisements() where all the fields are null except for the type of ad wanted and the threshold.
When I use a traffic analyser (wireshark formerly ethereal) to see what is going on I see P1 getting details of the rendezvous peer and then send messages to the rendezvous peer. I do not see any broadcast occurring. With P2, I see the same thing.

What I would like it to do a broadcast on the local area network for both publishing and getting.

I do see this error when I create a group. It appears where there is no rendezvous service. It then uses Endpoint.propogate(). One of the parameters is null at line 496 ResolverServiceImpl.
if(null != rendezvous) {
// Walk the message
rendezvous.walk((Message) queryMsg.clone(), handlerName, outQueName, RendezVousService.DEFAULT_TTL);
// propagate to local net as well
rendezvous.propagateToNeighbors(queryMsg, handlerName, outQueName, 2);
} else {
endpoint.propagate(queryMsg, handlerName, outQueName);
}

-------------------------------------------------------

T E S T S

-------------------------------------------------------

Running au.edu.qut.ranet.jxme.impl.JXMEImplTest

Jul 2, 2007 12:33:01 AM au.edu.qut.ranet.jxme.impl.JXMEImpl

INFO: about to make new Net Peer Group

Creating a new group advertisement
Uncaught Throwable in thread : PeerView Timer for urn:jxta:uuid-9E992C1CE00345F68981E5A63D04E66A02
java.lang.NullPointerException
at net.jxta.impl.resolver.ResolverServiceImpl.sendQuery(ResolverServiceImpl.java:496)
at net.jxta.impl.discovery.DiscoveryServiceImpl.getRemoteAdvertisements(DiscoveryServiceImpl.java:302)
at net.jxta.impl.discovery.DiscoveryServiceImpl.getRemoteAdvertisements(DiscoveryServiceImpl.java:253)
at net.jxta.impl.rendezvous.PeerView.discoverRdvAdverisements(PeerView.java:708)
at net.jxta.impl.rendezvous.PeerView.seed(PeerView.java:1937)
at net.jxta.impl.rendezvous.PeerView.kick(PeerView.java:966)
at net.jxta.impl.rendezvous.PeerView.access$900(PeerView.java:138)
at net.jxta.impl.rendezvous.PeerView$KickerTask.run(PeerView.java:2377)
at java.util.Timer$Scheduler.run(Timer.java:399)
at java.lang.Thread.run(Thread.java:710)
Group = BlueSoccerTeam
Group ID = urn:jxta:uuid-9E992C1CE00345F68981E5A63D04E66A02
Jul 2, 2007 12:33:04 AM au.edu.qut.ranet.jxme.impl.JXMEImpl publishGroup
INFO: Group BlueSoccerTeam published successfully.

Any help would be greatly appreciated.
regards,
ken.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
asghar
Offline
Joined: 2005-07-26
Points: 0

Hi,

From the JXSE API´s JavaDoc about the interface net.jxta.rendezvous.[b]RendezVousService[/b]:
The Standard Reference Implementation [b]requires[/b] that at least one peer in a PeerGroup act as a Rendezvous.

Currently a JXME driven peer can not act as a Rendezvous (missing JXME Proxyless). I think, that’s why we must have at any time, at least one JXSE driven peer in our net to act as JXME Proxy, if JXME peers are to be supported by ourApp.

Asghar

krobinson
Offline
Joined: 2007-06-12
Points: 0

Thanks for that. I suspected as much. I am now trying to use JXSE 2.4.1 and from it NetworkConfigurator.newAdHocConfiguration(URI storeHome).

I am using 0.91 GNU Classpath with JamVM. My question is how much j2SE5.0 is in there versus J2SE1.4.2? Specifically is there much generics and enumerations.

If it there is much I may need to update to a generics branch of 0.91 classpath

Look forward to your reply

regards,
ken.

krobinson
Offline
Joined: 2007-06-12
Points: 0

Just giving anyone who is interested an update. Seems there are some generics and enumerations in the JXSE 2.5_rc1. Consequently I needed to change to classpath-generics. It now works. Thanks to those who looked at problem as well as the person that answered it.

ken.