You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2013/06/14 10:25:14 UTC
[17/32] git commit: updated
refs/heads/1781-reorganize-and-improve-docs to 11fd32a
Describe query_servers config section.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/00372922
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/00372922
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/00372922
Branch: refs/heads/1781-reorganize-and-improve-docs
Commit: 003729226be9fee09ca077011ae3004069d395ec
Parents: 7fdc275
Author: Alexander Shorin <kx...@apache.org>
Authored: Wed Jun 12 15:09:41 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Wed Jun 12 16:06:30 2013 +0400
----------------------------------------------------------------------
share/doc/build/Makefile.am | 3 ++
share/doc/src/config/daemons.rst | 2 +-
share/doc/src/config/index.rst | 1 +
share/doc/src/config/query-servers.rst | 62 +++++++++++++++++++++++++++++
4 files changed, 67 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/00372922/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index 7c187bc..d1baa84 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -65,6 +65,7 @@ html_files = \
html/_sources/config/index.txt \
html/_sources/config/native-query-servers.txt \
html/_sources/config/os-daemons.txt \
+ html/_sources/config/query-servers.txt \
html/_sources/config/replicator.txt \
html/_sources/config/ssl.txt \
html/_sources/config/stats.txt \
@@ -127,6 +128,7 @@ html_files = \
html/config/index.html \
html/config/native-query-servers.html \
html/config/os-daemons.html \
+ html/config/query-servers.html \
html/config/replicator.html \
html/config/ssl.html \
html/config/stats.html \
@@ -187,6 +189,7 @@ src_files = \
../src/config/index.rst \
../src/config/native-query-servers.rst \
../src/config/os-daemons.rst \
+ ../src/config/query-servers.rst \
../src/config/replicator.rst \
../src/config/ssl.rst \
../src/config/stats.rst \
http://git-wip-us.apache.org/repos/asf/couchdb/blob/00372922/share/doc/src/config/daemons.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/daemons.rst b/share/doc/src/config/daemons.rst
index 9feb6f0..0de55e8 100644
--- a/share/doc/src/config/daemons.rst
+++ b/share/doc/src/config/daemons.rst
@@ -112,7 +112,7 @@ compactor handling::
``query_servers``
-----------------
-`Query servers` manager::
+:ref:`Query servers <config/query_servers>` manager::
[daemons]
query_servers={couch_query_servers, start_link, []}
http://git-wip-us.apache.org/repos/asf/couchdb/blob/00372922/share/doc/src/config/index.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/index.rst b/share/doc/src/config/index.rst
index 8d8806b..2eec13c 100644
--- a/share/doc/src/config/index.rst
+++ b/share/doc/src/config/index.rst
@@ -58,6 +58,7 @@ Content:
httpd
native-query-servers
os-daemons
+ query-servers
replicator
ssl
stats
http://git-wip-us.apache.org/repos/asf/couchdb/blob/00372922/share/doc/src/config/query-servers.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/query-servers.rst b/share/doc/src/config/query-servers.rst
new file mode 100644
index 0000000..1ea2416
--- /dev/null
+++ b/share/doc/src/config/query-servers.rst
@@ -0,0 +1,62 @@
+.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
+.. use this file except in compliance with the License. You may obtain a copy of
+.. the License at
+..
+.. http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+.. License for the specific language governing permissions and limitations under
+.. the License.
+
+.. highlight:: ini
+
+.. _config/query_servers:
+
+``[query_servers]`` :: Query Servers Configuration
+==================================================
+
+.. versionchanged:: 1.2: Added CoffeeScript query server
+
+CouchDB delegates computation of :ref:`design documents <ddocs>` functions to
+external query servers. The external query server is a special OS process which
+communicates with CouchDB over standard input/output using a very simple
+line-based protocol with JSON messages.
+
+The external query server may be defined in configuration file following next
+pattern::
+
+ [query_servers]
+ LANGUAGE = PATH ARGS
+
+Where:
+
+- ``LANGUAGE``: is a programming language which code this query server may
+ execute. For instance, there are `python`, `ruby`, `clojure` and other query
+ servers in wild. This value is also used for `ddoc` field ``language``
+ to determine query server that will process his functions.
+
+ Note, that you may setup multiple query servers for the same programming
+ language, but you have to name them different (like `python-dev` etc.).
+
+- ``PATH``: is a system path to the executable binary program that runs the
+ query server.
+
+- ``ARGS``: optionally, you may specify additional command line arguments for
+ the executable ``PATH``.
+
+The default query server is written in :ref:`Javascript <queryserver_js>`,
+running via `Mozilla SpiderMonkey`_::
+
+ [query_servers]
+ javascript = /usr/bin/couchjs /usr/share/couchdb/server/main.js
+ coffeescript = /usr/bin/couchjs /usr/share/couchdb/server/main-coffee.js
+
+
+.. _Mozilla SpiderMonkey: https://developer.mozilla.org/en/docs/SpiderMonkey
+
+.. seealso::
+ :ref:`Native Erlang Query Server <config/native_query_servers>` that allows
+ to process Erlang `ddocs` and runs within CouchDB bypassing stdio
+ communication and JSON serialization/deserialization round trip overhead.