Skip to main content

Relay - is it used all the time?

2 replies [Last post]
ivarulz
Offline
Joined: 2007-08-17
Points: 0

Hello,

Question: a jxta client with some givent configurations (see bellow) will work the same behind a nat/firewall or having direct connection to internet? I mean, will the client use the relay peer even if not behind/firewall?

I want to distribute our application based on jxta, and don't want to puzzle the user with complicated settings, so the settings we have should work in all situations (nat, firewall, direct, etc), but I am concerned about the performance.

I have the following jxta configuration:

configurator.addSeedRelay(URI.create("www.example.com"));

configurator.setUseOnlyRelaySeeds ( true );
configurator.setUseOnlyRendezvousSeeds ( true );
if ( isModerator ) {
configurator.setTcpEnabled ( true );
configurator.setTcpIncoming ( true );
configurator.setTcpOutgoing ( true );

configurator.setHttpEnabled(true);
configurator.setHttpIncoming(true);
configurator.setHttpOutgoing(true);
configurator.setHttpPort(80);
} else {
configurator.setTcpEnabled ( false );
configurator.setTcpIncoming ( false );
configurator.setTcpOutgoing ( false );

configurator.setHttpEnabled(true);
configurator.setHttpIncoming(true);
configurator.setHttpOutgoing(true);
}

Thanks,
Adrian

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hamada
Offline
Joined: 2003-06-12
Points: 0

A relay will only be used when there no direct route between two nodes

ivarulz
Offline
Joined: 2007-08-17
Points: 0

Ok, thanks.

So, I consider that if the 2 peers can see each other directly, the relay is not used.