Skip to main content

JXME Rendezvous

20 replies [Last post]
galato
Offline
Joined: 2007-07-06

I have a pretty elementary question regarding the network setup in JXME. Is the edge peer required to hardcode the peer ID of the rendezvous along with the rendezvous's IP address before it can contact it?? I cannot see any other way in the JXME baseline code or in the examples? This is the code in the tutorial examples ...

ConfigurationFactory.addSeedRendezvous( new URI(("tcp://126.12.22.144:9701")));
PeerID rdvPeerID = null;
rdvPeerID =
(PeerID)
IDFactory.fromURI(
new
URI("urn:jxta:uuid-59616261646162614E50472050325033DE6DFC0D22794E22B072C7A99881537703"));
ConfigurationFactory.addSeedRendezvousID(rdvPeerID);

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
shermes641
Offline
Joined: 2008-03-20

Forgive me for breaking in on this thread without any helpfull info.

My question to any of you on this thread is:

I am exploring the options for developing a peer to peer network.
It will have to be able to scale up to 1000's of peers and 1000's of groups.
Peers will be sharing small () Kbytes) intermittent data and large files (megabytes)

In your opinion is this technology mature enough to use for this purpose.

If not have you explored other possibilities ?

galato
Offline
Joined: 2007-07-06

Ok thanks Mohamed.

I ended up using the MIDP2.0 since it is also CDC API compatible but it based on a newer version of JXTA vs the CDC implementation. I can now use the JXME-MIDP2.0 to work on a mobile (CDC-enabled device), find and communicate with JXSE peers even if this device if behind NAT. It uses tcp transports.
Regarding the other question in this thread, why is it a requirement that the RDV peer ID is hardcoded in the code of the JXME-MIDP2 peer?

With JXSE 2.5, I cannot still get a JXSE peer to talk to another JXSE peer when it is behind NAT - I tried using http and tcp and still no luck. I am using the following setup - can you see anything in here that I am missing?

if (args[0].equals("rdv")) {
config.setPeerID((PeerID) IDFactory.fromURI(new URI(
"urn:jxta:uuid-59616261646162614E50472050325033DE6DFC0D22794E22B072C7A99881537703")
));

config.setMode(NetworkConfigurator.RDV_NODE | NetworkConfigurator.RELAY_NODE);

config.setHttpPort(9700);
config.setTcpPort(9701);
}
else if (args[0].equals("edge")) {

try {

config.addSeedRendezvous(new URI("http://129.11.62.182:9700"));
config.addSeedRelay(new URI("http://129.11.62.182:9701"));

}

manager.startNetwork();

Thanks

smaric
Offline
Joined: 2003-09-03

In response to
'can you configure a jxme peer in order to work like rendezvous?I was trying to do it, but for me was not possible.'

I haven't tried - but from reading the JXTA Programmers guide

JXTA peers can be categories into three main types:
•Minimal-Edge peers: Peers that implement only the required core JXTA services and may rely on other peers to act as their proxy for other services to fully participate in a JXTA Network. The proxy peers act as proxy for the non-core services. Typical minimal-edge peers include sensor devices and home automation devices,
•Full-Edge Peer: Peers that implements all of the core and standard JXTA services and can participate in all of the JXTA protocols. These peers form the majority of peers on a JXTA network and can include phones, PC's, servers, etc.
•Super-Peer: Peers that implement and provision resources to support the deployment and operation of a JXTA network. There are three key JXTA Super Peer functions. A single peer may implement one or more of these functions.
•Relay: Used to store and forward messages between peers that do not have direct connectivity because of firewalls or NAT. Only peers which are unable to receive connections from other peers require a relay.
•Rendezvous: Maintains global advertisement indexes and assists edge and proxied peers with advertisement searches. Also handles message broadcasting.
•Proxy: Used by minimal-edge peers to get access to all the JXTA network functionalities. The proxy peer translates and summarizes requests, responds to queries and provides support functionality for minimal-edge peers.

A jxme peer is not likely to be a 'Super-peer' as described above so is unlikely to be able to be configured to act as a Rendezvous peer

galato
Offline
Joined: 2007-07-06

Ack on the "underdocumented" part - I agree - it has not been easy to figure a lot of these things out.

Regarding the demo I did use the ChatDemo and also looked at some of the examples in the proxy version in order to build my peer for the MIDP2 (proxyless as you all call it). Between that and looking at older manuals of JXTA (2.3 and 2.4) I was able to build something that contacts the rdv/rly, generates pipes and communicates with JXSE 2.5 peers. I find that all these versions are is nothing more than ancient jxta code that satisfies the cldc/cdc compilers and you gotta work around them to build your work.

I will post more of my experiences with you guys down the road as I am understanding this more and more ...

afz
Offline
Joined: 2008-12-30

Hello again!

one question, can you configure a jxme peer in order to work like rendezvous?I was trying to do it, but for me was not possible. An another problem is soscket or pipe connections between two jxme peers. Could you help me with those problems?Thank very much, I continue working !

galato
Offline
Joined: 2007-07-06

I haven't tried that yet either - so far as I said in my original posting I am running peer 1 on a Linux machine under jxse, the rdv/rly on another Linux machine under jxse and the mobile peer on an N800 under jxme-midp2 (but the peer's code is for cdc). I will try to run a mobile rdv and also to perform comms between two mobile peers soon as well.

A project called Jadabs that I have been looking into (that resulted in a PhD thesis) was able to manage a middleware architecture using jxme peer across multiple mobile devices - if the author of Jadabs managed to do all that then I have a feeling we should be able to do so as well. No idea how he was able to gather so much information out of this project but may be he got all this on his own.

Good luck and keep in touch on this

afz
Offline
Joined: 2008-12-30

Hello!

thank you for the information. I will look for older manuals of JXTA. I do not understand you when you say to look examples in the midp distribution, you say in the proxy version?. I only found an example that is the chat for CDC version, but not the examples you say, if you can explain better, thank you :).

I am studying "Computer Engineering", and I need to do a project in order to finish my studies. This project is developed using JXME, so I have a problem, because I have a limit time to finish it. If I will not be able to develop the application in JXME proxyless version, I can see the proxy version...but I think that have a lot of limitations...but I can spend time and more time testing what can I do with proxyless version, if it works correctly, if have to much bugs...and without tutorials...

I have achieved some things with the tutorials of JXSE and other examples, for example, a bidipipe connection and socket connection, with a rendezvous peer in JXSE in localhost, and emulator for the mobile, but always in this way: jxme client with jxse server OR jxse client with jxme server. If I try to do it with both client and server jxme, crash (I put a post some days ago). I think that the problem is in the rendezvous, I do not know if it needs a special configuration or what.

I achieved to publish advertisements and to discovery them.

And other problem is trying to create a group...I was a lot of time looking where is the problem, and my conclusion is that in the class GenericPeerGroup, in the method loadModule, in this part:

________________
if (msi.equals(PeerGroup.refNetPeerGroupSpecID))
newMod = new ShadowPeerGroup();
else if (msi.equals(PeerGroup.refRendezvousSpecID))
newMod = new RendezVousServiceImpl();
.................

________________

simply there is not a "if" to compare with allPurposePeerGroupSpecID, defined in the class PeerGroup and that contains the implAdv when you try to create a group:

______________
public final static ModuleSpecID allPurposePeerGroupSpecID = (ModuleSpecID)
ID.create(URI.create(WK_ID_PREFIX + "000000010306"));
______________

so, I do not know if is a bug, or simply is not posible to create groups with the proxyless version....

I do not understand why exists the proxyless version if we can not get tutorials or examples. Tomorrow I meet with my teachers, perhaps they say to use the proxy version...

Thank you again for your reply. If you need something about the things that I achieved, ask me, and if you can help me with my problems, a lot of thanks!

Best regards,

Antonio

afz
Offline
Joined: 2008-12-30

Hello,

thank you for your reply. Your examples can be a great help for me, but if there are implemented withe proxy version, I do not know :(. The next two weeks I will continue testing small applications with the proxyless version, but if can achieve nothing special, perhaps I change to proxy version because I do not have time and I need something working at the ends of september. But I was thinking that, if with the proxyless version I can do at least the same functions that with the proxy version, I prefer to use the proxyless version thinking in the future.

So, thank you again and good luck, if you can send me some example that can help me, thank very much.

galato
Offline
Joined: 2007-07-06

Hi,

were you able to find any info on the Interview?

Thanks

arbalet
Offline
Joined: 2009-08-11

Hi All

I have a small beginners question. I have a network with 3 computers. Two of them are phone emulators(JXME) and the third one is a very simple RDV. Two emulators do recognize each other , i.e. the ADVs are OK. But the emulators fail to send/receive messages. I suspect that the RDV configuration is wrong, any ideas ?

Thanks

Boris

afz
Offline
Joined: 2008-12-30

Hello, I am working with JXME since about two months, and at the moment, I can tell you that I configure a JXME peer in the same way as you, but with a localhost ip and other ID, because I launched a JXSE rendezvous in localhost machine. One question, where did you find JXME proxyless examples or tutorials?, because I do not find to much information and I am following JXSE tutorials adapting the examples to JXME, and I have a lot of problems. I can not create a group, a JXME rendezvous peer.. etc. Could you tell me if you got good results with JXME?Thank you very much.

Thank you for your help and good luck, if I can help you in another question, ask please.

Antonio

galato
Offline
Joined: 2007-07-06

Hey Antonio,

I pretty much used the example in the midp directory of the distribution. I am running my peer app on a CDC device but I am using the jxme-midp2 (CLDC) version because it is based on newer version of JXTA, however it does not have an example. Still need to deal with java 1.4.x for all of it.

No other tutorials, or examples, or documentation and thus the frustration of months trying to get this to work - Mohamed who is the lead engineer on that project, Zorion who worked with JXME before and kicked his you know what to get things going and a few others helped a bit to get me going but primarily I am on my own. Apparently the world is moving more and more to mobile technologies presenting such an awesome potential for p2p designs such as JXTA/JXME but it seems me and you and Zorion are the only ones showing life on the list about it.

I would suggest to look at the examples in the midp distribution - it shows how to generate a netpeergroup, a rendezvous (with hardcoded ID which makes no sense to me) and also how to start a simple app. What can also help you is to go back and find an older manual (JXTA 2.3.4 or something) that actually describes procedures that can be used with JXME-MIDP2. Anything after that (2.5 etc.) could not necessarily work.

The best of luck

galato
Offline
Joined: 2007-07-06

By 'could not necessarily work' I meant certain newer classes and their methods may not compile with the jxta-cldc.jar distribution. A lot of JXTA newer versions managed very nicely to stay backwards compatible but you will find out that certain code paths have been abandoned. That's why an older manual that matches the JXTA version you are using may help a bit more (ex. NetworkManager does not exist in JXME and you have to use the ConfigurationFactory).

Cheers

galato
Offline
Joined: 2007-07-06

And by using a hardcoded ID for the RDV as I described I am getting the scenario where the edge peer is looking for IDs that are not matching the gateway (as it calls it). What is running is a RDV/RLY and from below it seems that the RDV is getting a different ID than the RLY - how is that possible? They are both the same peer!! Any ideas?

Thanks

Wakeup those waiting for route :Route to PID=urn:jxta:uuid-59616261646162614E504720503250338F03BEE36E1548699AFEC591A4D7872503
Addr=tcp://124.12.64.186:9701
Addr=tcp://[fe80:0:0:0:213:72ff:fe09:ea98]:9701
Addr=cbjx://uuid-59616261646162614E504720503250338F03BEE36E1548699AFEC591A4D7872503
Addr=jxtatls://uuid-59616261646162614E504720503250338F03BEE36E1548699AFEC591A4D7872503
Addr=relay://uuid-59616261646162614E504720503250338F03BEE36E1548699AFEC591A4D7872503
Gateways =
[1] urn:jxta:uuid-59616261646162614E50472050325033DE6DFC0D22794E22B072C7A99881537703

hamada
Offline
Joined: 2003-06-12

These are all the routes to the rendezvous transports.

Few relative comments on all JXME questions :

- Proxy based JXME -- Stale and no longer supported.
- CDC - in support of CDC based devices
- MIDP2.0 - replaces the proxy based binding, and CDC API compatible
- Only supports Edge mode, and no multicast support.
- As for lack of examples, the CDC tutorial are meant to also be used for the midp2.0 binding.

hamada
Offline
Joined: 2003-06-12

> These are all the routes to the rendezvous
> transports.
>
> Few relative comments on all JXME questions :
>
> - Proxy based JXME -- Stale and no longer
> supported.
> - CDC - in support of CDC based devices
> - MIDP2.0 - replaces the proxy based binding, and
> CDC API compatible
> - Only supports Edge mode, and no multicast support.
- Only TCP/IP is supported
>
> - As for lack of examples, the CDC tutorial are meant
> to also be used for the midp2.0 binding.