From dev-return-22658-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Mon Jul 9 14:00:53 2012 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 E7B73D47E for ; Mon, 9 Jul 2012 14:00:52 +0000 (UTC) Received: (qmail 5056 invoked by uid 500); 9 Jul 2012 14:00:52 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 5006 invoked by uid 500); 9 Jul 2012 14:00:52 -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 4985 invoked by uid 99); 9 Jul 2012 14:00:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 14:00:51 +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 paul.joseph.davis@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vb0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 14:00:45 +0000 Received: by vbzb23 with SMTP id b23so7882180vbz.11 for ; Mon, 09 Jul 2012 07:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=Ha9pgo0hI/fIM8Xqsaxx7p0H35W8lp7hd5YgNxtWAZc=; b=g+InKi72bigeQRzwy0r0tiCHzXyABMGlBqsdtiU7hTZTu8QoWUxfLjQP9XFhyqqY3W SjGR2pKX6vnTYq7VCoXEVubX6mcuEUKQm01KlGK1KOPMWLxdN/l8Y4toZGmgp2YDLh1e GIy0k1Y1e+v9/yYytQv4qH53bC9Vp8gYfAxY+KL+mqjyC88Y43bcHKa60BuPmp83R440 5iPTt3kv81vK3Rn8R2Pa+wrpcgfLDmVmgVfBvbvkoSmDhk1b1WZOv+FBdlOVWffEcIiI uFQ4voQRVUHKAMmP1FJhMjmKNUSELqCraZlcvKQlN5jJnTBAoRs9UVAKruYR4UwDzeJX gNZQ== Received: by 10.52.100.36 with SMTP id ev4mr15626443vdb.43.1341842424134; Mon, 09 Jul 2012 07:00:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.157.7 with HTTP; Mon, 9 Jul 2012 06:59:43 -0700 (PDT) In-Reply-To: References: From: Paul Davis Date: Mon, 9 Jul 2012 08:59:43 -0500 Message-ID: Subject: Re: couch_query_server refactoring To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Beno=EEt, Lately I've been contemplating removing a lot of the Erlang mechanics for this by rewriting couchjs as a single process/multi threaded application. I've seen a lot of issues related to our process handling and I also think we can probably speed things up considerably if we change how this works. Ie, if we move to an asynchronous message passing interface instead of the serialized stdio interface we should be able to get some nice speedups in throughput while also removing a lot of the resource usage. As part of that we should also do what you suggest and look into refactoring the top layer to make this stuff a lot cleaner where we call it in places like the rewriter and what not. I'm also not sure what you mean about the couchapp module. Right now if I had to guess I could see a couple Erlang apps: one that encompasses couchjs for JS code, one for Erlang code (for the view/list/show etc) etc etc. I could also see having the rewriter/list/show stuff in its own app as well but its early and I'm not quite awake yet. On Mon, Jul 9, 2012 at 8:10 AM, Benoit Chesneau wrote= : > I'm working on the couch_query_server refactoring: > - extract it from the couch app > - introduce generic way to add query servers written in Erlang or > calling OS processes like couchjs (so rather than distinct os > processes from native only call an erlang module with some arguments) > - split the couchapp engine in its own module. > > I'm actually wondering why you have one proc / ddoc? Any reason for > that? Apart for the rewriter? > > - beno=EEt