Skip to main content

Why is it said that Relay communication is HTTP only?

5 replies [Last post]
enygma2002
Offline
Joined: 2008-12-22

Hi!

This is not very clear.

The jxta docs say that relays use HTTP to relay messages to firewalled/NATed peers. This implies that you need to use HTTP communication and that if you turn it off, you will not be able to use Relay peers.

In practice though, I am using relay peers through TCP *only* (HTTP disabled) and it works great. I have also set the tcp port to 80 to make sure the peers use an opened outgoing port.

It is also unclear why there is a separation between TCP (Network protocol) and HTTP (Application protocol, built on top of TCP).
Logically, if you were to disable TCP, all your communication would also be disable. Instead, jxta treats them as if they were both network protocols and HTTP can run independently from TCP. This is confusing.

So, from what I can assume, TCP communication (in jxta's world) means a binary protocol used over TCP. HTTP communication would mean the same data being wrapped in text data, specific to the HTTP protocol.
The HTTP option would be, indeed, useful to a limited (IMO) set of peers which have protocol level filtering on their network and for which it would not be enough just to use port 80.

So, back to the original problem, it should be made official that the Relay peers do NOT use HTTP by default. It is recommended that they run on port 80 and, if required, that they use HTTP wrapping (enable HTTP communication).

P.S.: In this post, enabling/disabling TCP/HTTP means using NetworkConfiguratior.enableTcp/Http(true/false).

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
adamman71
Offline
Joined: 2007-01-31

The culprit comment comes from page 161 in the 2.5 programmer's guide:

"If you are located behind a firewall or NAT, you must use HTTP and specify a relay node."

After checking with Mike:

i) Http is necessary behind corporate firewalls allowing only http connections (with stateful inspection).

ii) There are some mobile devices exposing only an Http API not backed by TCP.

davjoh
Offline
Joined: 2007-07-18

> The culprit comment comes from page 161 in the 2.5
> programmer's guide:
>
> "If you are located behind a firewall or NAT, you
> must use HTTP and specify a relay node."
>
> After checking with Mike:
>
> ii) There are some mobile devices exposing only an
> Http API not backed by TCP.

...which is fine, except that there's only HTTP transport in JXME 1.0 which is uses the JXTA Proxy rather than the JXTA Relay, and last I heard nobody had implemented the HTTP transport in the 'proxyless' JXME (which is TCP only as far as I could tell).

galato
Offline
Joined: 2007-07-06

I concur with this as well - I found out that the JXME proxyless (midp2/cldc) code comments out the HTTP transport support and it allows only TCP configuration. I configured the rdv/relay in the public domain to accept TCP and HTTP connections and I was able to get a mobile device running JXME proxyless using TCP transport in a NATed network to find the rdv/relay, discover the pipes of a jxse 2.5 peer that is on a different network and communicate with it. As you all know by now I got stuck when I tried replacing the jxse 2.5 peer with another JXME proxyless using TCP transport - they can both find each other's pipes but they cannot connect to them.

hamada
Offline
Joined: 2003-06-12

the relay will work with any usable transport, whether it is tcp, http, rf, etc. is irrelevant to it's functionality

nhtruongblb
Offline
Joined: 2009-12-21

I think so
--------------------------
[url=http://blinkb.vn]quang cao[/url] | [url=http://blinkb.vn]quang cao online[/url]