couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <...@couch.io>
Subject Re: Vhosting Requirements (was: Re: [jira] Commented: (COUCHDB-230) Add Support for Rewritable URL)
Date Thu, 19 Aug 2010 14:59:20 GMT
On Thu, Aug 19, 2010 at 21:27, Benoit Chesneau <bchesneau@gmail.com> 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.

## The medium priority question

I have not decided how I feel about "smart" vhosts.

Is it really wrong with 1,000 vhost entries? For sure, *something* must be
smart to allow managing 1,000 couchapps, however I am not sure if the vhost
is the best answer.

One possibility is CouchApp. Currently, CouchApp has no idea about rewrites
and vhosts, `rewrites.json` is plain old data. Maybe CouchApp is the best
place to set vhosts and rewrites. The .couchapprc is 3 nested JSON objects!
Is a good place to say, "when you push to this URL, please also configure
vhosts so fooapp.foodb.mydomain.tld will go to _rewrite"?

Another possibility is a dedicated tool to manage CouchDB, perhaps within
Futon, or perhaps standalone. Besides vhosts, there are many things that are
becoming difficult to manage.

 * Database _security object
 * _config
 * _users (mostly changing passwords but also role management is quite
basic)

When deploying a CouchApp, these must be synchronized between development
and production (_users could replicate). In other words, vhost is not the
only problem when you have 1,000 CouchApps. I think all these problems are
related: there is no "app management console" yet.

## The low priority question:

Finally, as a sysadmin, wonder about the $var -> $var syntax. I do not enjoy
learning another domain-specific language just to get my job done. What does
'$' mean? Maybe it is like shell variables? But shell variables do not use
'$ when assigning, only when expanding. What other differences are there?
What about underscore? Does $foo_bar match anything, or only
anything+"_bar"? Ultimately, I must look in the documentation to make sure.

There is already a syntax for this included in Erlang: regular expressions.

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

Finally, I am happy to get new changes, just trying to figure out what is
best for everybody.
-- 
Jason Smith
Couchio Hosting

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message