couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <>
Subject Re: multiple view requests
Date Tue, 11 Jan 2011 15:21:26 GMT
On Jan 11, 2011, at 9: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

Hi Chad, I did some work on submitting multiple queries to a single view in one POST to that
view.  I'll try to clean it up and submit the patch this week.  Multiple queries to different
views in the same view group would be a straightforward extension internally, but I'm not
sure what the HTTP API would look like for that.  Queries to different view groups should
always require separate requests IMO.

The case to track this would be - please
feel free to comment, especially if the proposed feature doesn't meet your needs.  Cheers,


View raw message