couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <kxe...@gmail.com>
Subject [REVIEW] CouchDB Replication Protocol
Date Mon, 11 Nov 2013 11:34:30 GMT
http://img-fotki.yandex.ru/get/5642/20344051.18/0_f425c_ae768f6b_origHi
everyone!

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.

[0]: https://issues.apache.org/jira/browse/COUCHDB-1824

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 (:

[1]: http://www.dataprotocols.org/en/latest/couchdb_replication.html
[2]: https://github.com/refuge/rcouch/wiki/Replication-Algorithm

Raw source for easy comment / collaborate on this draft:

https://gist.github.com/kxepal/7411853

Nicer HTML version:

http://kxepal.iriscouch.com/docs/dev/replication/protocol.html

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:

https://github.com/kxepal/replipy

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.

--
,,,^..^,,,

Mime
View raw message