On Mar 7, 2009, at 5:41 AM, Jan Lehnardt wrote:
On 7 Mar 2009, at 11:21, David Van Couvering wrote:
- What protocol is used for replication across nodes? I'm
assuming it's
HTTP but just checking. In a peer-to-peer system, this sounds
like it
means
that each participant has to open up their HTTP port for
replication to
work. Is that correct?
Yes.
Hm. I am concerned that your Average Joe does not like the idea of
opening
up their HTTP port, and probably doesn't know how to. Folks used
to hacking
with BitTorrent maybe, but that's not the target user I was really
considering.
I was thinking of maybe piggybacking replication messages on a
protocol that
already supports push over the Internet and works for most users -
like
XMPP.
But I'm not an expert in network protocols/security, and before I
jump into
that, I am wondering if there are simpler solutions so that it's
Very Easy
for Mr. Average Joe or Jill to install a CouchDB app where peer-to-
peer
replication Just Works.
This an open issue, you're right. I don't think the protocol matters
as much.
The "common trick" is to setup an intermediate server machine that
all peers
can push to and pull from (replication is both, push and pull). I
don't think
XMPP magically opens ports for users :)
1+
Peers who cannot connect to one another can replicate to a publicly
accessible server to achieve the same thing. Also, with a publicly
available server, the peers can sync without being online at the same
time.
-Damien
That said, there are a couple ways around this problem and the best
is to
combine them all which I believe is what Skype does which in my
experience
works quite well in this regard.
[And then I start writing about the technique and when I was looking
for
references, I found these, so I just give you the links and spare
you my
ramblings :)]
http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481
http://sebsauvage.net/punching/
Searching for "firewall punching" gives you some more resources.
Cheers
Jan
--