couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Shead" <>
Subject Re: multiple view requests
Date Tue, 11 Jan 2011 18:37:56 GMT
On 1/11/11 7:58 AM, Chad George wrote:
> Is there any work being done on getting multiple views in a single HTTP
> request. I'm thinking of something similar to the multiple doc API.
> I just finished my first significant webapp with couchdb and one of the
> things that was a little annoying with a javascript client was all the
> nested async callbacks required to get all the data required for a
> particular function to process.
> Sometimes this was 3 or 4 nested view lookups, and gracefully handling
> errors is difficult. It would be much easier if I could pack them into a
> single async call to couchdb then handle errors or success just once.
> This isn't really a critical feature since it can be done with multiple
> requests, I'm not even sure it has the performance benefits that the
> multi-doc api has ... but it certainly would be handy to have around when we
> need it.
> - Chad

You can write some generic javascript to execute multiple parallel 
queries, calling a single callback when all of them return.  Here's a 
thread with several different approaches:


Timothy M. Shead
Sandia National Laboratories
1424, Data Analysis and Visualization

View raw message