[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [syndication] <cloud>



> This brings up the issue of how to go about two way XML-RPC when one or
> other side is behind a firewall and isn't directly accessible. One route
> to this would be to use another transport protocol like jabber or smtp
> instead of http to get the message through. Another pattern would be
> some sort of relay server.

One of the things we're doing at the Tristero project is dealing with this
exact problem. We have a design for a generic HTTP firewall transgressor
(with support for arbitrary TCP streams as well), so it will easily do
XML-RPC.

The best solution is to use the relay pattern. The common firewall problem
is that of only allowing outbound connections. So the nodes behind the
firewall connect to a firewall transgression service when they want to be
able to receive connections. The service binds them to a new URL, which is
what they propagate to other people that they want to connect back to
them. This same service can be used to give static URLs to machines with
dynamic IPs.

Jabber seems like a different solution, but in fact the way Jabber solves
this problem is by implementing this same service only for the Jabber
protocol instead of HTTP. So all Jabber adds to the mix is the complexity
of encapsulation in another protocol.

SMTP is an excellent way to get a message out of behind a firewall when
the firewall does not allow outbound connections except to a whitelist.
You can also usually use HTTP here if the destination is on port 80. The
problem with SMTP is that it's not as convenient as HTTP for receiving
messages. Whereas with HTTP you connect to the transgression service and
wait for connections, with SMTP you need to either parse the local mail
spool file or connect to a POP or IMAP server and download the messages.
The SMTP solution is also an instantiation of the relay solution where the
mail server is your relay. SMTP is the only way to go for some very
restrictive firewall setups, but most people are behind firewalls where an
HTTP relay service would work just as well.