You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Cory Zue <cz...@dimagi.com> on 2010/09/13 16:18:29 UTC

under the hood of continuous rep.

Hi there,

I'm using couchdb to synchronize a bunch of distributed computers
whose only internet connection is a flaky GPRS modem and a suspect
EDGE network.  I had thought that getting them to sync up would be as
simple as firing off a continuous replication task and assuming that
replication will happen whenever the modem and network are
cooperating.  However empirically what I've seen is that they don't
appear to replicate very well or consistently at all.  However, if I
do a non-continuous replication when the connection is working okay it
seems to push everything fine.

I know from http://guide.couchdb.org/draft/replication.html#continuous
that the continuous replication algorithm "is complex and is
fine-tuned every once in a while" so it's undocumented, but is it
possible it's not designed very well for extremely flaky, up and down
connections?

My current plan is to get rid of continuous replication and just run a
cron job that tries to do synchronous replication a few times a day.
Does this seem to others like a reasonable alternative?  And hopefully
not too much more bandwidth intensive than continuous replication?

thanks,
Cory

Re: under the hood of continuous rep.

Posted by Randall Leeds <ra...@gmail.com>.
The two types of replication function the same way. The only difference is
that continuous waits for more changes rather than cutting the connection
when all documents have been replicated.

Continuous replication can still die when the network stops working. A
cron-job to restart it is a good idea. Starting a continuous replication is
an idempotent operation and safe to call repeatedly.

-Randall
> Hi there,
>
> I'm using couchdb to synchronize a bunch of distributed computers
> whose only internet connection is a flaky GPRS modem and a suspect
> EDGE network. I had thought that getting them to sync up would be as
> simple as firing off a continuous replication task and assuming that
> replication will happen whenever the modem and network are
> cooperating. However empirically what I've seen is that they don't
> appear to replicate very well or consistently at all. However, if I
> do a non-continuous replication when the connection is working okay it
> seems to push everything fine.
>
> I know from http://guide.couchdb.org/draft/replication.html#continuous
> that the continuous replication algorithm "is complex and is
> fine-tuned every once in a while" so it's undocumented, but is it
> possible it's not designed very well for extremely flaky, up and down
> connections?
>
> My current plan is to get rid of continuous replication and just run a
> cron job that tries to do synchronous replication a few times a day.
> Does this seem to others like a reasonable alternative? And hopefully
> not too much more bandwidth intensive than continuous replication?
>
> thanks,
> Cory