You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Metin Akat <ak...@gmail.com> on 2009/11/25 14:54:32 UTC

Python view server and fractions

Dear All,

Me and my colleagues are Python/Pylons programmers.
During the last several months we have adopted CouchDB as our primary
database management system.
So far we are using javascript for writing views, but now we are
considering seriously migration to couchdb-python's view server,
mostly because of doing precise math with fractions (and long integers
if needed).

I have two questions:

1. I've read that the python view server is (much) slower/buggy etc.
Have you used it in production? What's your experience?

2. I'd like to use the fractions module (part of the standard library)
in my views. I know only one way to do it - import it inside the view
(import it every time the view is called). Is there some way to import
it "globally", so that it's always available to the views?


Regards,
Metin

Re: Python view server and fractions

Posted by Metin Akat <ak...@gmail.com>.
Hmm,
I've been playing with couchdb-pythonviews for several hours.
Still can't make it work.
Anyone knows how to use it?


On Wed, Nov 25, 2009 at 7:12 PM, Norbert Barlek <nb...@googlemail.com> wrote:
>> 1. I've read that the python view server is (much) slower/buggy etc.
>> Have you used it in production? What's your experience?
>
> See here:
>
> http://www.mikealrogers.com/archives/673
>
>> 2. I'd like to use the fractions module (part of the standard library)
>> in my views. I know only one way to do it - import it inside the view
>> (import it every time the view is called). Is there some way to import
>> it "globally", so that it's always available to the views?
>
> It should be trivial to add it to mikael's couchdb-pythonviews?
>
> HTH
> nb
>

Re: Python view server and fractions

Posted by Norbert Barlek <nb...@googlemail.com>.
> 1. I've read that the python view server is (much) slower/buggy etc.
> Have you used it in production? What's your experience?

See here:

http://www.mikealrogers.com/archives/673

> 2. I'd like to use the fractions module (part of the standard library)
> in my views. I know only one way to do it - import it inside the view
> (import it every time the view is called). Is there some way to import
> it "globally", so that it's always available to the views?

It should be trivial to add it to mikael's couchdb-pythonviews?

HTH
nb

Re: Python view server and fractions

Posted by Sebastian Cohnen <se...@googlemail.com>.
Hey Metin,

On 25.11.2009, at 14:54, Metin Akat wrote:

> Dear All,
> 
> Me and my colleagues are Python/Pylons programmers.
> During the last several months we have adopted CouchDB as our primary
> database management system.
> So far we are using javascript for writing views, but now we are
> considering seriously migration to couchdb-python's view server,
> mostly because of doing precise math with fractions (and long integers
> if needed).
> 
> I have two questions:
> 
> 1. I've read that the python view server is (much) slower/buggy etc.
> Have you used it in production? What's your experience?
> 
> 2. I'd like to use the fractions module (part of the standard library)
> in my views. I know only one way to do it - import it inside the view
> (import it every time the view is called). Is there some way to import
> it "globally", so that it's always available to the views?

I've never tried couchdb-python's view server. but basically all view servers are "simple" processes talking via stdin/stdout to couchdb. so I don't see a reason why you cannot import a library "globally". Also keep in mind that the view server process is not spawned every time a view is called.