On Sun, Aug 23, 2009 at 3:20 AM, Tom Sante<[email protected]> wrote: > Like adam said, refactor each of those questions into a single view for each. > When you want to do a combined/advanced query send it to an external process: > http://wiki.apache.org/couchdb/ExternalProcesses > > The external process is a script (in a language of your choice) that > queries each view and handles the join logic and output json. > So you have the benefit that you don't have to tax the client with > heavy join calculations but still use couchdb as a proxy for handling > your query. > If you format the scripts json-output as a normal couchdb-return you > don't even need to modify your client code.
Just out of curiosity, why would you want to have the CouchDB server handle the join like this? Unless you are doing some fancier magic to keep the combined view up-to-date (ie, kicking rows out of the M-Set only when a sub-view has changed, etc.) I'm not sure I see why you would want to centralize a heavy-weight operation rather than de-centralize it. What am I missing? :) Adam -- Opscode, Inc. Adam Jacob, CTO T: (206) 508-4759 E: [email protected]
