couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ethan <>
Subject Saving changes
Date Wed, 27 Mar 2013 02:00:13 GMT
Hi! I'd like to build an "offline replication" system for CouchDB.
Basically, I'd like to build a system that can synchronize over an
intermediary that isn't trusted (like a typical web host). Ideally, I'd
grab whatever CouchDB sends over the wire to do replication, compress,
encrypt, and sign it, and then upload it (say via SSH). I'm looking for
more information on how to build something that does that. So far all I've
found is

First, although _replicate can take "source" or "target" as URLs, anything
that isn't an HTTP URL gets "invalid database". So much for replicating
file:// :)

Secondly, I tried to bring up a simple HTTP server and try to synchronize
against it to try to wire sniff what's going on. It seems like the first
thing CouchDB does when replicating is do a HEAD request on the database.
I'm guessing it's trying to get the database's sequence number. I thought I
would try to do the same thing against CouchDB. When I do, the database

r$ curl -vX HEAD
* About to connect() to port 5984 (#0)
*   Trying
* connected
* Connected to ( port 5984 (#0)
> HEAD /mydb/ HTTP/1.1
> User-Agent: curl/7.27.0
> Host:
> Accept: */*
* additional stuff not fine transfer.c:1037: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Server: CouchDB/1.2.0 (Erlang OTP/R15B01)
< Date: Wed, 27 Mar 2013 01:59:35 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 223
< Cache-Control: must-revalidate
* additional stuff not fine transfer.c:1037: 0 0
* additional stuff not fine transfer.c:1037: 0 0

(The last line repeats until I kill it with Control-C.)

Is there anything like a comprehensive guide to how replication works, or
how to interoperate with it?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message