couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Metson <>
Subject Re: Chaining of views/MapReduce
Date Mon, 22 Feb 2010 18:37:27 GMT
On 22 Feb 2010, at 18:16, James Marca wrote:

> I see two problems with the current proper way.  First, it seems  
> wasteful of disk space to have a view generated and then store  
> essentially the same thing as a separate db.  Second and more  
> importantly, as a developer you have to write long-lasting code that  
> pays attention to the source database to update the chain of view- 
> >db->view->db...->view when the source db data changes.  It would be  
> nicer if CouchDB could manage all that internally.  Perhaps the map  
> code could explicitly dump to a db, maybe something like  
> emit_chained with a required target db as a third argument, so that  
> changes to the source database can get cascaded automatically.

I have some python code that watches for N changes and pulls a view  
into a new database. I only knocked it up over the weekend and it uses  
a bunch of code from work (which others are welcome to use, but its  
currently not that portable) but if you're interested in that I can  
point you to it. With the _changes feed it's pretty simple to do,  
though I've not yet decided on how the view should propagate over -  
there are a lot of ways to deal with that...

View raw message