Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 87052 invoked from network); 2 Aug 2010 18:50:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Aug 2010 18:50:19 -0000 Received: (qmail 33982 invoked by uid 500); 2 Aug 2010 18:50:18 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 33927 invoked by uid 500); 2 Aug 2010 18:50:18 -0000 Mailing-List: contact dev-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 dev@couchdb.apache.org Received: (qmail 33919 invoked by uid 99); 2 Aug 2010 18:50:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 18:50:18 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mikeal.rogers@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-gw0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 18:50:13 +0000 Received: by gwj20 with SMTP id 20so1919150gwj.11 for ; Mon, 02 Aug 2010 11:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=oYyMWM99NZDGJNR01usn+1uchiMybWne5d1WaFF5jUw=; b=sp6TaZBoXaFBrgR0u6zKlJEaFuCPGhrLEDXDL7FvNOSWyF9ukSUr5L3cSzCWs39znV gw6ewo08liP4tbaQRlhOXUfCd+lIIKm3tEDf38nXZBgxzn7zEVGQUb0p7ztu1luFIh/4 S8JleoKZxQB0CN+Hr/X+UIWv1Ru1D5U14RTwY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=c/mgAvMxVOBCjH8vDDGKxqoe7DjtwETluHWzI5RS6HxX8NYJ5lsP7fMGhph25kmN8B bN4rQUWFAv1N5zToEIaOZXezxbA/lwNUym0AEP8PvVlDiY2QzPamAsFCBqwMXecaqGSS +EHjDqLPgaQqZkTLrkcN1wopNMHpuRvn91s7I= MIME-Version: 1.0 Received: by 10.150.170.16 with SMTP id s16mr7366197ybe.355.1280774992340; Mon, 02 Aug 2010 11:49:52 -0700 (PDT) Received: by 10.231.186.202 with HTTP; Mon, 2 Aug 2010 11:49:52 -0700 (PDT) In-Reply-To: References: Date: Mon, 2 Aug 2010 11:49:52 -0700 Message-ID: Subject: Re: Proposal for changes in view server/protocol From: Mikeal Rogers To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd39aa274a6f9048cdbaaf0 --000e0cd39aa274a6f9048cdbaaf0 Content-Type: text/plain; charset=ISO-8859-1 Back up a few steps. The view server line protocol while being terribly defined and taking breaking changes in almost every release has still maintained a fair amount of alternate implementations in languages other than JavaScript. I seriously doubt that we would see this kind of diverse additions to CouchDB if the barrier to integrating was writing erlang. We shouldn't fix fundamental problems with the view server protocol and architecture solely by moving it in to erlang. I'm also *highly* skeptical of the perceived performance benefits of moving the js in to erlang compared to moving away from full JSON parsing and just doing selective parsing/validation and storing the JSON string as opposed to the native erlang representation. I can write this idea up in greater detail in another thread but the native JSON parser in *any* language is likely to be faster than something that parses the native erlang terms so it's only faster on the erlang side to not hit the serialization again which we would get if we stored the string+parsed underscore properties instead of the full native erlang terms. Not to mention the security and durability considerations of moving the view server in to erlang. There is a reason erlang views aren't enable by default. -Mikeal On Mon, Aug 2, 2010 at 11:39 AM, Jason Smith wrote: > On Tue, Aug 3, 2010 at 01:35, Randall Leeds > wrote: > > > Either way we're waiting for a response from couch to call back into > > JS, it's just whether we're calling the original function or the > > continuation. > > I don't have a strong preference either way, but I do slightly favor > > the callback continuation as a mild style preference. > > > > I have to say, callback style is way nicer. I have not thought about how > that would look from non-Javascript query servers though. > > > > In either case, do we have to add some new response format so the > > query server can say "Hey call me again and tell me what to do with > > this result?" > > In other words, both of our suggestions can work on top of the same > > change that needs to happen to the view server line protocol, so you > > can code up either one and we can settle on what it should look like > > to people writing update handlers later, no? > > > > I suppose so. But I am unclear because earlier in the thread I posted > working code that allows me to handle save conflicts (or validation > failures) from within javascript, with no change to the line protocol. > (That > is about all it has going for it in fact!) > > -- > Jason Smith > Couchio Hosting > --000e0cd39aa274a6f9048cdbaaf0--