couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <>
Subject [REVIEW] CouchDB Replication Protocol
Date Mon, 11 Nov 2013 11:34:30 GMT

CouchDB Replication Protocol is the most bikeshedding docs topic at now(:

Due to COUCHDB-1824[0] I had to set all dots above i by myself and
understand how replication works and what protocol it uses.


I took Benoit's article from Data Protocol site[1] and improved it by
adding one additional goal: help developers create third-party tools
with easy that may sync with CouchDB. The result is looks quite
similar to the RCouch Protocol Algorithm[2] description, but a bit
more human-friendly (:


Raw source for easy comment / collaborate on this draft:

Nicer HTML version:

I'd like to ask everyone for help with reviewing this document and:

1) CouchDB devs, Benoit, Jens and Dale: please take a look if there is
need to correct technical things or rewrite if they are wrong since
you're all guru of this topic
2) All devs: take a quick overview and decide if this information is
clear for you to create sync-able peer using your favourite framework
without need to read tcpdumps and CouchDB sources (however, you still
better to do this to resolve all wtfs)
3) Everyone: feel free to correct spelling and rewrite phrases if they
looks awkward (:

For instance, I made small Flask (Python) application by following
this Protocol Definition that may be used both as Source and Target
for replication:

Not sure that it will pass all CouchDB replication tests, but at least
it's able to sync with npm repository - that was enough for me now to
see that protocol definition is really useful.

So that's all for this. Thanks! (:

P.S. While all storytelling goes from Replicator's point of view, it's
all about how to made an endpoint that could be used as source/target
for Replication. There is no any details about Replicator
implementation, but some suggestions and hints are given to. Probably,
that was a mistake and there was need to describe whole Replicator
things, but I decided to use as base question "what is need to do to
let my favourite data storage sync with CouchDB in both directions"
instead of "how CouchDB Replicator works". He is quite complex app to
be described again in non-Erlang language.

P.P.S. Examples will be rewritten to be more consistent a bit later.


View raw message