Skip to main content

JXTA on LAN

7 replies [Last post]
moogin
Offline
Joined: 2010-04-22

Hello All,
I am interested in developing a P2P application that would run on an internal network with no visibility to the outside world. From what I gather, I can configure this application to find all the other peers on the network. All the examples I have found communicate to the outside JXTA network rendezvous peers. How Can I configure this application to run just on my LAN? There are no static IPs, they will be changing daily which is why I need to relocate all the peers on the network each time the application is fired up.

Even if there is some reading material someone could point me to, it would be very much appreciated. This is my first JXTA app but I am excited to get it started! Thanks in advance.

Message was edited by: moogin

Message was edited by: moogin

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ariel_ro
Offline
Joined: 2009-12-28

Hi,

I'm implenting such a solution and I can tell you don't need a rendezvous infrastructure to make things work inside the same subnet. All you need is setting up each peer as ADHOC and be sure that you can comunicate by multicast inside your LAN.

The rest is up to the platform, i.e. discovery services, peer ids generation and so on.

It is important to know that although it is a good start in learning JXTA, trying to do an app. like this is not without issues. JXTA seems to be quite buggy. :(

jxtathailand
Offline
Joined: 2010-05-06

Do you have some code examples that use multicast discovery through JXTA network with AdHoc mode to communicate between PCs on the same LAN?

Thanks

Message was edited by: jxtathailand

Message was edited by: jxtathailand

ariel_ro
Offline
Joined: 2009-12-28

Here is a class that does multicast discovery(outputs in the console the peers and puts them into a buffer when they're found).
It may be improved but from what I've tested it works.

jxtathailand
Offline
Joined: 2010-05-06

Thanks ariel_ro for the code but I cannot run it.

Could you please provide me:
magenta.model.dao.PeerVO.java
magenta.model.dao.java

and a java class which has main() function to use discovery service.

Thank you again.

ariel_ro
Offline
Joined: 2009-12-28

Come on, man! The least you could do is figure it out for yourself the rest. I assume you have basic knowledge of Java. Also, for learning Jxta look at the programmer's guide. It may not be the best, but it gives you some insight into the API and usage.

moogin
Offline
Joined: 2010-04-22

I guess another question is...Do I need to have a rendezvous setup on a static IP that the peers connect to, or can they discover a rendezvous setup on the lan? Sorry for all the silly questions, but JXTA seems like a great answer for what I am looking for...

aschiffman
Offline
Joined: 2003-07-28

Hi Moogin,

I implemented this technology a couple of years back. Wish I could remember the details, however, what I can tell you is I configured it to only search other JXTA Peers on the same subnet. i.e xxx.xxx.xxx.aaa

Where only .aaa peers would be discovered. Somebody else can probably tell you how to do this. I have the source code on a disk somewhere but not with me.

Good Luck,

Aaron