In retrospect I agree this could have been done on the javascript side ... and in the future I'll do it that way.
I think the multiple key range requests that Adam was referring too is still a good idea. - chad On Tue, Jan 11, 2011 at 1:37 PM, Timothy Shead <[email protected]> wrote: > 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: > > > http://stackoverflow.com/questions/1060539/parallel-asynchronous-ajax-requests-using-jquery > > Cheers, > Tim > > > -- > Timothy M. Shead > Sandia National Laboratories > 1424, Data Analysis and Visualization > >
