couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <>
Subject Re: Vhosting Requirements (was: Re: [jira] Commented: (COUCHDB-230) Add Support for Rewritable URL)
Date Thu, 19 Aug 2010 18:43:58 GMT
On Thu, Aug 19, 2010 at 10:59 AM, Jason Smith <> wrote:
> On Thu, Aug 19, 2010 at 21:27, Benoit Chesneau <> wrote:
>> Could you explain me how it's impossible compared to previous
>> behaviour ? It doesn't change anything technically. Please post all
>> your concern and a way to reproduce , I will have a look on it. Though
>> here hosting > 50 couch - trunk behingd couchdbproxy works. tested
>> yesterday.
> ## The top priority question:
> How can proxies managed by the sysadmin or network admin know what to do?
> Now, vhost is explicit. Anybody with permission can query /_config/vhosts
> for all couches.
> With wildcards, e.g. "*/blog", it is impossible to know all domains which
> the web server handles. When a query for  fooapp.foodb.mydomain.tld arrives,
> which couch should handle it?
> CouchDB adoption is growing. The network, system, and programming
> responsibilities are becoming different people. It needs to allow everybody
> to do their job.

Can you describe this in more detail? I don't think I understand your
concerns very well. I'm not familiar with hosting setups so maybe I'm
just missing something obvious. I just can't figure out  why a network
administrator would need to reverse engineer the vhost settings.

As to the bike shedding on syntax I can only say that the non-regexp
syntax looked fine to me. Though I understand the complaint about
inventing syntax, instead of jumping for regexp's I would probably
take a look at WebMachine's dispatcher mechanism as it reuses Erlang
which I always found quite nifty.

And a side point on the regexp syntax you posted:

    (.*).(.*).mydomain.tld -> /$2/_design/$1/_rewrite

This is a pretty good example of why regexps really aren't such a hot
idea. I'll give 10 internets to the first person that figures out how
that pattern matches this domain:


One hint is that it wouldn't rewrite to /davisp/_design/blog/_rewrite.

And because its always funny:

Some people, when confronted with a problem, think
“I know, I'll use regular expressions.”   Now they have two problems.
- Jamie Zawinski

Paul Davis

View raw message