Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 561F5DBE5 for ; Sat, 18 May 2013 13:02:34 +0000 (UTC) Received: (qmail 12075 invoked by uid 500); 18 May 2013 13:02:34 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 11999 invoked by uid 500); 18 May 2013 13:02:34 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 11846 invoked by uid 99); 18 May 2013 13:02:33 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 May 2013 13:02:33 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 075D23193F2; Sat, 18 May 2013 13:02:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: djc@apache.org To: commits@couchdb.apache.org Date: Sat, 18 May 2013 13:02:32 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] git commit: updated refs/heads/1.3.x to fe56a84 Updated Branches: refs/heads/1.3.x 24b1e8a49 -> fe56a84c3 docs: improve language in Erlang query server section. Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e4cfc402 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e4cfc402 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e4cfc402 Branch: refs/heads/1.3.x Commit: e4cfc4023b0c96ae9ebad27b293df045b7f86964 Parents: 24b1e8a Author: Dirkjan Ochtman Authored: Sat May 18 14:41:52 2013 +0200 Committer: Dirkjan Ochtman Committed: Sat May 18 14:41:52 2013 +0200 ---------------------------------------------------------------------- share/doc/src/query-servers.rst | 42 +++++++++++++++------------------ 1 files changed, 19 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/e4cfc402/share/doc/src/query-servers.rst ---------------------------------------------------------------------- diff --git a/share/doc/src/query-servers.rst b/share/doc/src/query-servers.rst index e77abd7..a5b7895 100644 --- a/share/doc/src/query-servers.rst +++ b/share/doc/src/query-servers.rst @@ -339,19 +339,17 @@ Erlang .. warning:: - Erlang query server runs out of sandbox feature like JavaScript has to! - This means, that Erlang code has full access to your OS, file system and - network which may leads to security issues. While Erlang functions are - faster than JavaScript ones, you need to be careful with running them, - especially if they wasn't written by your own hands. - - Keep in mind: don't trust every code - review it first before running. + Unlike the JavaScript query server, the Erlang query server does not + run in a sandbox. This means Erlang code has full access to your OS, + filesystem and network, which may lead to security issues. While Erlang + functions are faster than JavaScript ones, you need to be careful + about running them, especially if they were written by someone else. .. note:: - Due to security restriction, Erlang query server is disabled by default. - To enable it you'll need to edit your `local.ini` to include a + Due to security restrictions, the Erlang query server is disabled by + default. To enable it, you need to edit your `local.ini` to include a ``native_query_servers`` section: .. code-block:: ini @@ -359,13 +357,13 @@ Erlang [native_query_servers] erlang = {couch_native_process, start_link, []} - And don't forget to restart CouchDB after that and use ``language: "erlang"`` - property in your Erlang design documents. + Don't forget to restart CouchDB after updating the configuration, and + use the ``language: "erlang"`` property in your Erlang design documents. .. function:: Emit(Id, Value) - Emits `key`-`value` pair to view indexer process. + Emits `key`-`value` pairs to view indexer process. .. code-block:: erlang @@ -378,10 +376,10 @@ Erlang .. function:: FoldRows(Fun, Acc) - Helper to iterate over all rows in list function. + Helper to iterate over all rows in a list function. :param Fun: Function object. - :param Acc: Previous returned value by `Fun`. + :param Acc: The value previously returned by `Fun`. .. code-block:: erlang @@ -399,7 +397,7 @@ Erlang .. function:: GetRow() - Retrieves next row from related view result. + Retrieves the next row from a related view result. .. code-block:: erlang @@ -421,7 +419,7 @@ Erlang .. function:: Log(Msg) - :param Msg: Message to log in at CouchDB `INFO` level. + :param Msg: Log a message at the `INFO` level. .. code-block:: erlang @@ -432,8 +430,8 @@ Erlang Emit(<>, V) end. - On map function run in CouchDB logs (e.g. at `/var/log/couchdb/couch.log`) - you may find next record: + After the map function has run, the following line can be found in + CouchDB logs (e.g. at `/var/log/couchdb/couch.log`): .. code-block:: text @@ -453,7 +451,7 @@ Erlang "!" end. - Function above produces next response: + The function above produces the following response: .. code-block:: text @@ -464,8 +462,8 @@ Erlang :param Headers: Proplist of :ref:`response object`. - Initialize :ref:`listfun` response. At this point response code and headers - may be defined. For example, next function redirect to CouchDB web site: + Initialize :ref:`listfun` response. At this point, response code and headers + may be defined. For example, this function redirects to the CouchDB web site: .. code-block:: erlang @@ -477,5 +475,3 @@ Erlang ]}), "Relax!" end. - -