I am writing a list function in couchDB. I want to know if using a faster language than javascript would boost performance (i was thinking python, just because I know it).

Does anyone know if this is true, and has anyone tested whether it is true?

有帮助吗?

解决方案 2

You can use the V8 engine if you want for Couch. A guy from IrisCouch wrote couchjs to do this (I've seen him on Stack Overflow quite a bit too).

https://github.com/iriscouch/couchjs

Also for views, filtered replication, things like that, you can write the functions in Erlang instead of javascript. I've done that and seen around a 50% performance increase.

Seems you can write list functions in Erlang: http://tisba.de/2010/11/25/native-list-functions-with-couchdb/

其他提示

Generally the different view engines are going to give you the same speed.

Except erlang, which is much faster.

The reason for this is that erlang is what CouchDB is written in and for all other languages the data needs to get converted into standard JSON then sent to the view server, then converted back to the native erlang format for writing.

BUT, This performance "boost" only happens on view generation, which typically happens out -of-line of a request or only on the changed documents.

As in, real world usage performance difference between view servers is irrelevant most of the time.

Here is the list of all the view server implementations: http://wiki.apache.org/couchdb/View_server

I've never used the python ones, but if that is where you are comfortable, go for it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top