Skip to main content

A working java application on LAN, now for the internet part.

3 replies [Last post]
Joined: 2008-04-24

we(project group) have now made an application that works fine with peers in the same subnet. The application sends java objects, files and other messages, and this works perfectly when the peers are in the same subnet. The application is intended to work over internet, but we are not sure how we should do this. The users(peers) will be behind firewalls and NAT's, and some wireless routers also drops broadcast messages.

If anybody could give us some help, hints or whatever with the problem, we will be very grateful! :)


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-13

The JXTA network config is very flexible (and powerful)... perhaps it is too flexible for the documentation to catch up with it.

Take these factors into consideration:

- mcast transport (multicast)

- Tcp transport
- Incoming
- Outgoing

- Http transport
- Incoming
- Outgoing
- External address
- Hide private address

- Use relay
- Use rdv
- Seeding
- Seeds

Almost all the combinations are valid. Do the math and you will know how many possibilities are available.

But the guideline is very straightforward. Between Peer A and Peer B, they must have at least one valid route to follow to reach each other. JXTA attempts to use the best available route if more than one route are available.

In your case, the application works in the LAN perhaps because the mcast is working without your knowing it. You may think the other routes you may have configured incorrectly are working for you while they are actually ignored by JXTA.

Now when you move the application to the internet environment, depending on the wrongly configured routes, the application will fail naturally.

In the Internet environment (with firewalls and NATs), here is a typical configuration.

The users should use Http transport, outgoing, (a bogus external incoming address which is a workaround of a JXTA configuration flaw), hide private address, use one or more rdv/relay servers outside the firewall. Use seeds to point to the rdv/relay servers. When you are comfortable with that, you can start to use seeding mechanism.

If you are the one to set up your own rdv/relay, I would explain that part in the next message.

Joined: 2008-04-07

hi ,,
u said the following stmt:-
if you are the one to set up your own rdv/relay, I would explain that part in the next message.
pl'z explain as sooon as possible,...
one more doubt... how we can set proxy configuration(proxy address,port;proxy username and proxy passwword ) in jxta configuration so that while running our application on internet using http protocol, i and the other peer to which i am communicating can configure thier own proxies,and thus can communicate....

Joined: 2007-09-05

I am also interested in how to set my own rdv/relay. Please thenetworker, could you explain us that?

Thanks in advance

g_grupta: Regarding your question on the proxy configuration, it is explained in the lastest version of the JXTA Reference Guide 2.5