couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Wolff <>
Subject Re: Authentication and Authorisation for webmail project
Date Mon, 20 Apr 2009 20:27:50 GMT
Hi Saul,
The FM is pretty much the wiki:

1000 databases for a single couchdb instance should be no problem.

I may be mistaken, but I think there's currently no support for users
in couchdb. Here's the feature that's planned:

For now, I think you'll want to build an app in middleware and treat
couchdb as a replacement for an rdbms backend. You can use pretty much
any language/toolkit you want for this; Java would work well if you're
comfortable with it.


On Mon, Apr 20, 2009 at 5:53 AM, Saul Hazledine
<> wrote:
> Hello,
> I've been writing a simple webmail system as part of a hobby project. This
> is being done using Ext-JS talking JSON to a simple java servlet that runs
> relational database queries. I always felt that a relational database was
> overkill for what I wanted to do. I'm also aware that most of the logic on
> the server side is there to convert from JSON to JDBC and back.
> This weekend I discovered CouchDB. It does the same as the servlet I wrote
> -- only faster, more elegantly and with replication. Its such a good match
> it would be rude not to use it.
> However, I've got a few questions about how to go about moving from Java
> servlet relational database thinking to CouchDB . I'm happy to RTFM if given
> the location of FM.
> The first question concerns how to separate different email users. Would it
> be OK to have a database for each user? This would make querying fast but I
> was wondering about the overhead of having say, 1000 databases handled by 1
> CouchDB instance. If its too high I could go the more obvious way of using
> an index on a userid field and having a single database for all email.
> The second question is regarding authentication and authorisation. One user
> shouldn't be able to read, edit or delete another users email. I can't work
> out how to do this with CouchDB unless I use some sort of proxy that would
> check username and password against the view being accessed or the data
> being written. If this is the only route to go can anybody recommend a
> lightweight language/server to use for this? My first guess would be Java
> servlets although this would make each access go through the following
> components:
>  frontend webserver -> servlet engine -> couchdb
> when ideally I'd want:
>  frontend webserver -> couchdb
> or in a perfect world:
>  couchdb
> Thanks in advance for any advice you can give.
> Saul

View raw message