Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CEF11030B for ; Fri, 16 Aug 2013 09:49:24 +0000 (UTC) Received: (qmail 73392 invoked by uid 500); 16 Aug 2013 09:49:21 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 73203 invoked by uid 500); 16 Aug 2013 09:49:21 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 73187 invoked by uid 99); 16 Aug 2013 09:49:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 09:49:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of volker.mische@gmail.com designates 74.125.83.43 as permitted sender) Received: from [74.125.83.43] (HELO mail-ee0-f43.google.com) (74.125.83.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 09:49:13 +0000 Received: by mail-ee0-f43.google.com with SMTP id e52so837914eek.2 for ; Fri, 16 Aug 2013 02:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Vb+viaOdlFjtGNpuLj6xffBUe/Of/SYEfidY3v1Typ8=; b=my9jGxvqnZXVxApiZRRDkIo+8qK2vMrOrSp71E8Wk6b6aF8gUG0bXHbtQwwsbF1erz OqaKJkbTms05BF2dEfrybnJEnWVZyt6H59GqQKrtHyRW8MVoKQmtQfUUGBxOIegdMv+x DFq1zikP956QgNg19kIaBEr+SDX4mc5ZcK6iTDqRpDAAREPtB6Mcb1IpRiQiutcuKgtC H26OOFp0j6o0sMF3CCsYG0qSY9t3hM4KBntDmNFl5eh9BTKRTaHQ93iB1hYPFtT5jc2T 3rx3D87smiHbSaytrnRDXFLwY4SLl6fLe2zTVsWRTJeHlj5jeAhmSiiEPzX1v2hVDGRS 4y/g== X-Received: by 10.14.103.69 with SMTP id e45mr1079234eeg.51.1376646533322; Fri, 16 Aug 2013 02:48:53 -0700 (PDT) Received: from [192.168.0.6] (dslb-084-056-042-091.pools.arcor-ip.net. [84.56.42.91]) by mx.google.com with ESMTPSA id a1sm1457413eem.1.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 02:48:52 -0700 (PDT) Message-ID: <520DF58D.6040308@gmail.com> Date: Fri, 16 Aug 2013 11:49:01 +0200 From: Volker Mische User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130630 Icedove/17.0.7 MIME-Version: 1.0 To: Alexander Shorin CC: "user@couchdb.apache.org" , "dev@couchdb.apache.org" Subject: Re: Erlang vs JavaScript References: <57E7BFC7-8B8E-4014-8569-B03F99B73E35@apache.org> <520DEB55.8090203@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 08/16/2013 11:32 AM, Alexander Shorin wrote: > On Fri, Aug 16, 2013 at 1:12 PM, Benoit Chesneau wrote: >> I agree, (modulo the fact that I would replace a string by a binary ;) but >> that would be only possible if we extract the metadata (_id, _rev) from the >> JSON so couchdb wouldn't have to decode the JSON to get them. Streaming >> json would also allows that but since there is no guaranty in the >> properties order of a JSON it would be less efficient. > > What if we split document metadata from document itself? E.g. pass > _id, _rev and other system or meta fields with separate object. Their > size much lesser than whole document, so it will be possible to fast > decode this metadata and decide is doc need to be processed or not > without need to decode/encode megabytes of document's json. Sure, this > adds additional communication roundtrip, but in case if it will be > faster than json decode/encode - why not? That would be the ultimate-ultimate goal. Cheers, Volker