Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 981DBE0F6 for ; Thu, 31 Jan 2013 13:51:47 +0000 (UTC) Received: (qmail 44562 invoked by uid 500); 31 Jan 2013 13:51:47 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 44338 invoked by uid 500); 31 Jan 2013 13:51:47 -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 44303 invoked by uid 99); 31 Jan 2013 13:51:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2013 13:51:46 +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 (athena.apache.org: domain of randall.leeds@gmail.com designates 209.85.214.178 as permitted sender) Received: from [209.85.214.178] (HELO mail-ob0-f178.google.com) (209.85.214.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2013 13:51:40 +0000 Received: by mail-ob0-f178.google.com with SMTP id wd20so2916630obb.9 for ; Thu, 31 Jan 2013 05:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=ucCVIMbhgy5SWZYy7rSSMhSKTF/NhNFAuonAtcIJGMY=; b=vVwZsST9vIWHNiWUqqNW1FHrKiPqUtTWP/uOnsx3TRDMaPs8U+S1+ioIJFGveOiTyw aaoxvrq31h3vvcX/ZTHXLy0StbQwCfTAIVBmNAUOGk935sfGUZIXEZibEva/cTTGa47M V09llqKAzzhnWPM9pvmzS1NIBSf1mAz1gJq1ZStKAezrpHrh9vECxU3jm1MPyI4QVtbW pZv4bn3jFqLmo7G3BJ+bLOpOUbZy2lOrJteNbFNRaq1aCH4YcdfoZz/Rwdh4OIcU1r97 Msflg9AznmhLOyhHiE7UYF4tRWXQFS95G/pWt/SoZIrnmbMBVNRdFnOqQ7Q+WkfLBO7L DAcQ== MIME-Version: 1.0 X-Received: by 10.60.21.167 with SMTP id w7mr6566843oee.18.1359640280247; Thu, 31 Jan 2013 05:51:20 -0800 (PST) Received: by 10.76.71.104 with HTTP; Thu, 31 Jan 2013 05:51:19 -0800 (PST) In-Reply-To: References: <5102B439.10500@lymegreen.co.uk> Date: Thu, 31 Jan 2013 05:51:19 -0800 Message-ID: Subject: Re: Branch to switch from SpiderMonkey to Node.js From: Randall Leeds To: "dev@couchdb.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Jan 31, 2013 at 5:23 AM, Jason Smith wrote: > On Thu, Jan 31, 2013 at 12:55 PM, Paul Davis wrote: > >> >> That whole process sounds like not a lot of fun. >> > > Right. That is kind of my point. CouchDB is a JavaScript thing, and > nowadays people have a very well-adopted and well-understood JavaScript > engine on their computers. Maybe it should just use that. (Some) developers have node installed (or can install it easily). End users are a totally different story. They may be able to install it, but we're talking about adding a runtime dependency unless we bundle node. Imagine you have CouchDB installed and then a future node version breaks compatibility for some API used by the node-couchjs. You now have to decide whether to upgrade node or try to have multiple node versions so couchjs can continue to work. In short I think this is my issue: we're pushing problems down from maintainers and packagers to users. If we're just trying to make the building/packaging/maintaining process easier, I would rather bundle spidermonkey than bundle node (or bundle v8 and rewrite couchjs against v8). Thinking about this all a bit more, maybe this is a viable option: 1) Figure out how to refactor the JS code in couchjs to be engine agnostic. It likely mostly is already, but we may want to make the I/O a bit more abstracted and certainly give it an async API 2) Make couchjs an optional configure flag, which builds a couchjs that wraps step (1) 3) Have node-couchjs included, as pure JS code that also wraps (1), but don't bundle any dependency like node or v8 I think this would be a good solution unless we can demonstrate confidently that we can sandbox node appropriately for a view server. It lets your average developer get by without the spidermonkey hassle, but a maintainer of a downstream package can decide whether they want a sandboxed view server and don't mind dealing with spidermonkey packaging or to punt and add a runtime dependency on node. We could also run the JS test suite from the CLI using node-couchjs. Is there anyone who isn't served by this path, or whose problems are worsened by it?