You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Sean Allen <se...@monkeysnatchbanana.com> on 2008/12/30 18:35:23 UTC

a question about view servers...

what impact does the speed of the view server have on returning results?

for example, 3 listed on the wiki are...

lisp, ruby and python ones.

i know from having written code for all 3 that in general,

sbcl outperforms python which outperforms ruby.

would this be the case with a view server? is there much of a  
difference?

given that the view server communication channel is stdin and stdout,
should i be more concerned about startup time for view server?  
compiling the code, loading in modules etc?


Re: a question about view servers...

Posted by Thomas Kerpe <th...@googlemail.com>.
Just set an view as you done before (python code of course) and set
language in the view to python instead of javascript. That's all.

//Thomas

2009/1/3, paul jobs <we...@gmail.com>:
> how to use this python view server instead of using js view server
>
> On 12/31/08, Randall Leeds <ra...@gmail.com> wrote:
>>
>> I set one up in the following way.
>>
>> Install the couchdb-python module into your python environment of choice
>> (I
>> use virtualenv, which is wonderfully useful).
>>
>> Then add the line:
>> python=/path/to/bin/python -m couchdb.view
>>
>> To your couch.ini file under the query servers section.
>> And that should do it.
>>
>> -Randall
>>
>> On Wed, Dec 31, 2008 at 11:42, Sean Allen <sean@monkeysnatchbanana.com
>> >wrote:
>>
>>
>> > i havent set one up yet.
>> >
>> > i'm going to play with stuff in a couple weeks.
>> > when i do setup, i'm going to try out the lisp view server then write
>> > one
>> > that works with gnu smalltalk.
>> >
>> >
>> > On Dec 31, 2008, at 12:45 AM, paul jobs wrote:
>> >
>> >  Hey sean
>> >> can you show me the config files on how to setup the python view server
>> >> thanks a lot
>> >>
>> >> On 12/30/08, Sean Allen <se...@monkeysnatchbanana.com> wrote:
>> >>
>> >>>
>> >>> what impact does the speed of the view server have on returning
>> results?
>> >>>
>> >>> for example, 3 listed on the wiki are...
>> >>>
>> >>> lisp, ruby and python ones.
>> >>>
>> >>> i know from having written code for all 3 that in general,
>> >>>
>> >>> sbcl outperforms python which outperforms ruby.
>> >>>
>> >>> would this be the case with a view server? is there much of a
>> difference?
>> >>>
>> >>> given that the view server communication channel is stdin and stdout,
>> >>> should i be more concerned about startup time for view server?
>> compiling
>> >>> the code, loading in modules etc?
>> >>>
>> >>>
>> >>>
>> >
>>
>

Re: a question about view servers...

Posted by paul jobs <we...@gmail.com>.
how to use this python view server instead of using js view server

On 12/31/08, Randall Leeds <ra...@gmail.com> wrote:
>
> I set one up in the following way.
>
> Install the couchdb-python module into your python environment of choice (I
> use virtualenv, which is wonderfully useful).
>
> Then add the line:
> python=/path/to/bin/python -m couchdb.view
>
> To your couch.ini file under the query servers section.
> And that should do it.
>
> -Randall
>
> On Wed, Dec 31, 2008 at 11:42, Sean Allen <sean@monkeysnatchbanana.com
> >wrote:
>
>
> > i havent set one up yet.
> >
> > i'm going to play with stuff in a couple weeks.
> > when i do setup, i'm going to try out the lisp view server then write one
> > that works with gnu smalltalk.
> >
> >
> > On Dec 31, 2008, at 12:45 AM, paul jobs wrote:
> >
> >  Hey sean
> >> can you show me the config files on how to setup the python view server
> >> thanks a lot
> >>
> >> On 12/30/08, Sean Allen <se...@monkeysnatchbanana.com> wrote:
> >>
> >>>
> >>> what impact does the speed of the view server have on returning
> results?
> >>>
> >>> for example, 3 listed on the wiki are...
> >>>
> >>> lisp, ruby and python ones.
> >>>
> >>> i know from having written code for all 3 that in general,
> >>>
> >>> sbcl outperforms python which outperforms ruby.
> >>>
> >>> would this be the case with a view server? is there much of a
> difference?
> >>>
> >>> given that the view server communication channel is stdin and stdout,
> >>> should i be more concerned about startup time for view server?
> compiling
> >>> the code, loading in modules etc?
> >>>
> >>>
> >>>
> >
>

Re: a question about view servers...

Posted by Randall Leeds <ra...@gmail.com>.
I set one up in the following way.

Install the couchdb-python module into your python environment of choice (I
use virtualenv, which is wonderfully useful).

Then add the line:
python=/path/to/bin/python -m couchdb.view

To your couch.ini file under the query servers section.
And that should do it.

-Randall

On Wed, Dec 31, 2008 at 11:42, Sean Allen <se...@monkeysnatchbanana.com>wrote:

> i havent set one up yet.
>
> i'm going to play with stuff in a couple weeks.
> when i do setup, i'm going to try out the lisp view server then write one
> that works with gnu smalltalk.
>
>
> On Dec 31, 2008, at 12:45 AM, paul jobs wrote:
>
>  Hey sean
>> can you show me the config files on how to setup the python view server
>> thanks a lot
>>
>> On 12/30/08, Sean Allen <se...@monkeysnatchbanana.com> wrote:
>>
>>>
>>> what impact does the speed of the view server have on returning results?
>>>
>>> for example, 3 listed on the wiki are...
>>>
>>> lisp, ruby and python ones.
>>>
>>> i know from having written code for all 3 that in general,
>>>
>>> sbcl outperforms python which outperforms ruby.
>>>
>>> would this be the case with a view server? is there much of a difference?
>>>
>>> given that the view server communication channel is stdin and stdout,
>>> should i be more concerned about startup time for view server? compiling
>>> the code, loading in modules etc?
>>>
>>>
>>>
>

Re: a question about view servers...

Posted by Sean Allen <se...@monkeysnatchbanana.com>.
i havent set one up yet.

i'm going to play with stuff in a couple weeks.
when i do setup, i'm going to try out the lisp view server then write  
one that works with gnu smalltalk.

On Dec 31, 2008, at 12:45 AM, paul jobs wrote:

> Hey sean
> can you show me the config files on how to setup the python view  
> server
> thanks a lot
>
> On 12/30/08, Sean Allen <se...@monkeysnatchbanana.com> wrote:
>>
>> what impact does the speed of the view server have on returning  
>> results?
>>
>> for example, 3 listed on the wiki are...
>>
>> lisp, ruby and python ones.
>>
>> i know from having written code for all 3 that in general,
>>
>> sbcl outperforms python which outperforms ruby.
>>
>> would this be the case with a view server? is there much of a  
>> difference?
>>
>> given that the view server communication channel is stdin and stdout,
>> should i be more concerned about startup time for view server?  
>> compiling
>> the code, loading in modules etc?
>>
>>


Re: a question about view servers...

Posted by paul jobs <we...@gmail.com>.
Hey sean
can you show me the config files on how to setup the python view server
thanks a lot

On 12/30/08, Sean Allen <se...@monkeysnatchbanana.com> wrote:
>
> what impact does the speed of the view server have on returning results?
>
> for example, 3 listed on the wiki are...
>
> lisp, ruby and python ones.
>
> i know from having written code for all 3 that in general,
>
> sbcl outperforms python which outperforms ruby.
>
> would this be the case with a view server? is there much of a difference?
>
> given that the view server communication channel is stdin and stdout,
> should i be more concerned about startup time for view server? compiling
> the code, loading in modules etc?
>
>

Re: a question about view servers...

Posted by Paul Davis <pa...@gmail.com>.
On Tue, Dec 30, 2008 at 12:35 PM, Sean Allen
<se...@monkeysnatchbanana.com> wrote:
> what impact does the speed of the view server have on returning results?
>

The speed of any particular view server is only going to affect
generation times and views with reduces. When not performing a reduce
and querying a view that has no updates, CouchDB never touches the OS
process at all.

> for example, 3 listed on the wiki are...
>
> lisp, ruby and python ones.
>
> i know from having written code for all 3 that in general,
>
> sbcl outperforms python which outperforms ruby.
>
> would this be the case with a view server? is there much of a difference?
>
> given that the view server communication channel is stdin and stdout,
> should i be more concerned about startup time for view server? compiling the
> code, loading in modules etc?
>
>

CouchDB reuses view server processes for generating views. Forgiving
some caveats, view server startup is a onetime cost. Once the OS
process is spawned, it is reused for view generation.

Paul