Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 83391 invoked from network); 19 Aug 2010 16:49:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Aug 2010 16:49:35 -0000 Received: (qmail 55410 invoked by uid 500); 19 Aug 2010 16:49:34 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 55319 invoked by uid 500); 19 Aug 2010 16:49:34 -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 55311 invoked by uid 99); 19 Aug 2010 16:49:34 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Aug 2010 16:49:34 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bchesneau@gmail.com designates 209.85.210.52 as permitted sender) Received: from [209.85.210.52] (HELO mail-pz0-f52.google.com) (209.85.210.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Aug 2010 16:49:12 +0000 Received: by pzk27 with SMTP id 27so1312446pzk.11 for ; Thu, 19 Aug 2010 09:48:51 -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 :content-transfer-encoding; bh=FaA1r4RCRl8IHjMZ3vEtBnv+eBRWvkmf1fk431xcmb8=; b=OwOFznBQyiZV4Bp5/gRc2kN1yFr9qXSBH5EJVtM1+A2M3vQhmaqCe9x+/1CpOyeVaF 3EkHiWuZzasoOVwYi+kGy4PlQYK9gq4lyd9W9NKQQJp1jVcRbnpBYSwTFpBQjOL2URD4 XmLWQgz5DfZmzxJm6rG/bTLKWhBvpqGTu/KCM= 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:content-transfer-encoding; b=QvkbCez2b6NuG2sRbDp+0WSxEv+v/ffrCOHe96ZsLzmxT6wgCzrFoQYZ6s1OpS3IAh BEUVOd5FAaoufQwMkCNuMHHtRR/0ue8Ez5z03eWpd0dHmutjtSC7aqpIqDxCXOQ0xX3T nit8JV11cNaX/Reg0Q44zDwg1vqtiiWcYTN/s= MIME-Version: 1.0 Received: by 10.114.73.9 with SMTP id v9mr133623waa.94.1282236518210; Thu, 19 Aug 2010 09:48:38 -0700 (PDT) Received: by 10.231.169.18 with HTTP; Thu, 19 Aug 2010 09:48:37 -0700 (PDT) In-Reply-To: References: <739B8B5B-842A-4CC4-871C-2DC5B0616266@apache.org> Date: Thu, 19 Aug 2010 18:48:37 +0200 Message-ID: Subject: Re: Vhosting Requirements (was: Re: [jira] Commented: (COUCHDB-230) Add Support for Rewritable URL) From: Benoit Chesneau 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 On Thu, Aug 19, 2010 at 6:30 PM, Jason Smith wrote: > On Thu, Aug 19, 2010 at 23:14, Benoit Chesneau wrot= e: > >> On Thu, Aug 19, 2010 at 5:56 PM, Noah Slater wrote: >> > >> > On 19 Aug 2010, at 16:49, Benoit Chesneau wrote: >> > >> >> Well asking without giving yourself some data make it irrelevant but >> > >> > Not really. >> > >> > I'm suggesting that if we're going to use performance as an argument, = we >> use data and not supposition. >> >> The way pattern matching works should explain by itself though ;) >> > > AFAIK Erlang ships with Perl-compatible regular expressions written in C. > > re:compile() > Yes. so ? > Anyway the whole performance argument is not relevant. Who cares? You are > about to do a b-tree lookup from the hard disk. How much will regex vs. > pattern match on a 20-byte string matter? b-tree ? Where ? > > My point was, why are we inventing syntax out of our asses for every > different situation? Regular expressions should be considered because: > > =A01. They match patterns yes. Pattern matching too but we only match terms, and they are common in Erlang. > =A02. They capture groups and can access them later yes. who care ? A lot of urls rewriters are not using regexp because it adds an extra layer of complexity: webmachine in erlang, werzeug in python, ... > =A03. Everybody knows them that's not true. http://xkcd.com/208/ To answer to this "reinventing" . We had long discussions on how to manage rewriting in couchapps. Some included "regexp", we fall in the current system. Ie pattern matching because it was a lot easier to understand and *simple*. SInce the system is already in place, I wanted to reuse it too, there is no need to have 2 dofferent ways to handle rewriting. I would like to keep it *simple*, that's the key. Anyway, can we go back to the topic ? I still don't understand how vhosts in 1.0.1 or in trunk are a problem ? About that I'm thinking we could propse a request_handler that isn't relying to vhost at all and make them an option, would it be ok ?