You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Dirkjan Ochtman <di...@ochtman.nl> on 2010/05/22 10:10:35 UTC

Query server protocol/view server questions

Hi all,

I've been trying Python views this week, and ran into some problems.

1. Breaking changes helpfully says that the line protocol changed in
0.11, but fails to detail what changed.
2. Are error messages still supposed to be objects, or are they now
lists? This was changed on the wiki for log, but not for error.
3. It would be helpful if the wiki page [1] had a more complete
overview of the protocol.

And some questions:

1. On the wiki someone asks if the reduce values are guaranteed to be
passed in-order, and I'd be interested to hear that, too.
2. Relatedly, are the keys passed guaranteed to be a contiguous block?
If not, why not?
3. Is it possible to distinguish from the view server side under which
version of the protocol its running? If not, could that be added?

Cheers,

Dirkjan

[1] http://wiki.apache.org/couchdb/View_server

Re: Query server protocol/view server questions

Posted by Dirkjan Ochtman <di...@ochtman.nl>.
On Mon, May 24, 2010 at 17:47, Mikeal Rogers <mi...@gmail.com> wrote:
> Which Python view sever are you using

I'm trying to update the one in couchdb-python.

> Last time i checked the one in couchdb-python was out of date.
>
> I wrote one that should be up to date and supports show/list
>
> http://github.com/mikeal/couchdb-pythonviews

Yes, I saw that, and I did look at what it was doing.

> The view server line protocol is a moving target and has change in
> nearly every release.

Then maybe it would be helpful to detail the changes somewhere? This
doesn't seem like a very large burden on those who change it...

Cheers,

Dirkjan

Re: Query server protocol/view server questions

Posted by Mikeal Rogers <mi...@gmail.com>.
Which Python view sever are you using

Last time i checked the one in couchdb-python was out of date.

I wrote one that should be up to date and supports show/list

http://github.com/mikeal/couchdb-pythonviews

I think benoit was using my code, or maybe he went and wrote a new
one, for a view server that he was bundling with couchdbkit.

The view server line protocol is a moving target and has change in
nearly every release.

-Mikeal

On Sat, May 22, 2010 at 1:10 AM, Dirkjan Ochtman <di...@ochtman.nl> wrote:
> Hi all,
>
> I've been trying Python views this week, and ran into some problems.
>
> 1. Breaking changes helpfully says that the line protocol changed in
> 0.11, but fails to detail what changed.
> 2. Are error messages still supposed to be objects, or are they now
> lists? This was changed on the wiki for log, but not for error.
> 3. It would be helpful if the wiki page [1] had a more complete
> overview of the protocol.
>
> And some questions:
>
> 1. On the wiki someone asks if the reduce values are guaranteed to be
> passed in-order, and I'd be interested to hear that, too.
> 2. Relatedly, are the keys passed guaranteed to be a contiguous block?
> If not, why not?
> 3. Is it possible to distinguish from the view server side under which
> version of the protocol its running? If not, could that be added?
>
> Cheers,
>
> Dirkjan
>
> [1] http://wiki.apache.org/couchdb/View_server
>

Re: Query server protocol/view server questions

Posted by Mark Hammond <sk...@gmail.com>.
Hi Dirkjan,

On 22/05/2010 6:10 PM, Dirkjan Ochtman wrote:

> 1. On the wiki someone asks if the reduce values are guaranteed to be
> passed in-order, and I'd be interested to hear that, too.
> 2. Relatedly, are the keys passed guaranteed to be a contiguous block?
> If not, why not?

IIUC, couch declines to make any such promises regardless of the current 
implementation.  It is required that reduce functions be not only 
"referentially transparent, but it must also be commutative and 
associative"[1] - which means the answer to both the above is "no".

> 3. Is it possible to distinguish from the view server side under which
> version of the protocol its running? If not, could that be added?

I'm not aware of the view protocol version being formalized anywhere - 
is the version of couchdb itself enough to meet your requirements?

[1] http://damienkatz.net/2008/02/incremental_map.html

Cheers,

Mark