You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Rodd Snook <ro...@gmail.com> on 2010/02/09 00:08:06 UTC

Any experience with partial replication via _changes?

Hi,

I'm a new CouchDB user in the middle of designing a new publishing
sub-system for a web app. One model that I'm considering is to use a kind of
partial replication, by listening to a filter on _changes, pulling out
documents with a "publish" flag on them and pushing them to a Couch instance
backing up the live site.

Is there anyone with experience doing something similar, who can tell me if
this is an effective strategy, or a recipe for headache and disaster? I'd
link to know ahead of time if there's some pitfall that's going to prevent
me from doing this with a manageably small piece of bash/perl/php.

Rodd

Re: Any experience with partial replication via _changes?

Posted by Markus Jelsma <ma...@buyways.nl>.
I think it's also wise to check for that publish-flag in the validation
function on the receiving end.

Cheers


Chris Anderson said:
> On Mon, Feb 8, 2010 at 3:08 PM, Rodd Snook <ro...@gmail.com> wrote:
>> Hi,
>>
>> I'm a new CouchDB user in the middle of designing a new publishing
>> sub-system for a web app. One model that I'm considering is to use a
>> kind of partial replication, by listening to a filter on _changes,
>> pulling out documents with a "publish" flag on them and pushing them
>> to a Couch instance backing up the live site.
>>
>> Is there anyone with experience doing something similar, who can tell
>> me if this is an effective strategy, or a recipe for headache and
>> disaster? I'd link to know ahead of time if there's some pitfall
>> that's going to prevent me from doing this with a manageably small
>> piece of bash/perl/php.
>>
>
> This seems like a sound design to me. By the time the replicator
> provides the features we'd like it to have (maybe CouchDB 1.1) you'll
> probably be able to do all this without any scripting code at all.
>
> Chris
>
>
> --
> Chris Anderson
> http://jchrisa.net
> http://couch.io




Re: Any experience with partial replication via _changes?

Posted by Chris Anderson <jc...@apache.org>.
On Mon, Feb 8, 2010 at 3:08 PM, Rodd Snook <ro...@gmail.com> wrote:
> Hi,
>
> I'm a new CouchDB user in the middle of designing a new publishing
> sub-system for a web app. One model that I'm considering is to use a kind of
> partial replication, by listening to a filter on _changes, pulling out
> documents with a "publish" flag on them and pushing them to a Couch instance
> backing up the live site.
>
> Is there anyone with experience doing something similar, who can tell me if
> this is an effective strategy, or a recipe for headache and disaster? I'd
> link to know ahead of time if there's some pitfall that's going to prevent
> me from doing this with a manageably small piece of bash/perl/php.
>

This seems like a sound design to me. By the time the replicator
provides the features we'd like it to have (maybe CouchDB 1.1) you'll
probably be able to do all this without any scripting code at all.

Chris


-- 
Chris Anderson
http://jchrisa.net
http://couch.io