incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <zachary.zol...@gmail.com>
Subject Re: Using views in Validation functions
Date Tue, 11 May 2010 18:01:51 GMT
I'd suggest having a database per user. That makes both access control
and size/usage easy.

I'd consider limiting the user access to the database via a middle
tier program that can just check the database size before allowing any
write operations.

And don't worry, CouchDB is known to support tens of thousands of databases.

—Zach

On Sun, May 9, 2010 at 6:52 AM, Behrad Zari <behrad_zari@yahoo.com> wrote:
> Consider implementing a MailBox scenario on top of CouchDB, where we should manage user
box quota size.
> If we create a doc for each user, and represent a message with a doc that references
user doc NOW:
> For quota size control, I was thinking to use validation functions but it seems they
have only access to the to-be-created/updated doc, but we need access to all docs/msgs (to
collect attachment sizes) referenced to the user, and this can happen by a map/reduce function!
>
> Any helps/suggestions/workarounds would be thankful!
>
> --Behrad
>
>
>

Mime
View raw message