couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Ramage <>
Subject Re: Peer-to-Peer Replication
Date Thu, 07 Apr 2011 15:40:48 GMT
I think we are missing the issue. We do all agree that couch is great
at replicating when it has been wired up with src and dest urls.

The issue is more around creating a distributed graph management to
handle nodes (couches) in a peer to peer manner. I don't think this
space has been really explored.

For a local network, there are lots of service discovery protocols
that you could use, something like or
but of course this would be outside of what couch does. I think
BigCouch may have something like that built in, but someone from
Cloudant would have to confirm.

For a more p2p system, this is a much harder problem. For one, you
mentioned the network ports. If you are imagining average people using
this, then you would have to deal with managing port forwarding using
Internet Gateway Device Protocol. At least one couch on the end of a
replication would have to be able to be accessed by http through a
router. You would want a user friendly way to do this.

Next is managing the graph. This is hard. No help from couch again.
Nodes going up and down, etc.

It would be fun to see some work done on this. For extra points it
would be cool if it where done in erlang and could be contributed into
the couch core :)


On Thu, Apr 7, 2011 at 9:17 AM, Nebu Pookins <> wrote:
> On Wed, Apr 6, 2011 at 5:47 PM, Zdravko Gligic <> wrote:
>> In it's simplest form, consider a large community of members or peers,
>> in which each member subscribes to one or more of a dozen CouchDB
>> databases.
> Each peer would have their own CouchDB. So if you have a thousand
> peers, there are a thousand CouchDB instances, each with their local
> copy of the database.
>> Within each database, community members could post documents, comment
>> and/or take other actions on any one doc.  However, each of these
>> actions would not be an update to the original docs but would rather
>> be creations of new docs.
>> The end result should be a situation in which each subscriber
>> eventually ends up with all of the documents in their corresponding
>> local CouchDB copy.
> This is pretty much the default behaviour you get from CouchDB out of
> the box. The only issue is you need to make each instance aware of at
> least one other instance. And these connections should form a
> connected graph if you want everyone to see everyone else's changes.
> To "make aware" a particular CouchDB, you simply instruct it to
> replicate against a specific other instance (by providing a URL to the
> other instance).
> - Nebu

View raw message