this is a workspace where I am exploring how one could run a Wagn on CouchDB.  It's just rough scratches so far.

 

 

inclusions

datastructure: card records store a complete list of their ancestors

 

function(node) {

  node.ancestors.forEach(anc) {

     emit(anc.name, node);

  }

}

 

 

pattern cards

datastructure: ancestor_patterns ; stores list of pattern cards used by current card and ancestors.

 

nested views

from org.apache.couchdb.user:

On Fri, Aug 1, 2008 at 2:44 PM, Demetrius Nunes <deme...@gmail.com> wrote:

Does it make sense do evaluate a view on top of another previously computed view?

That's a standard pattern in map/reduce programming. CouchDB doesn't support it out of the box (managing the cache-expiry on the nested views is the big challenge).

I've created a script that copies the map index of a view into another database, for further processing.

 

[...]
Chris Anderson http://jchris.mfdz.com

 

from damiens blog:  http://damienkatz.net/2008/02/incremental_map.html

The restriction on map functions is that they must be referentially transparent. That is, given the same input document, they will always emit the same key/value pairs. This allows CouchDB views to be updated incrementally, only reindexing the documents that have changed since the last index update.

this would seem to nix the idea of having the key generation from a view depend on another view.  So we have to go with some kind of datastructure for storing what pattern cards we need.