couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Bonser <>
Subject Re: CouchDB in multi-tenant environment
Date Thu, 10 Jun 2010 00:08:34 GMT
On Wed, Jun 9, 2010 at 6:38 PM, Vlad Mangeym <> wrote:

> Chris,
> Thank you very much for your quick reply!
> This sound like a solution that may work. The concern that I have is
> replication will always do a complete synch.
> My hope was that we can have some standard views and rules and can
> allow clients to add customizations on the top of that.
> Example: object has standard_property1 and standard_property2 and
> rules:  standard_property1 is required integer,  standard_property2 is
> a lookup string with a choices (A or B or C)
> Client1 adds more properties (custom_property1, custom_property2 with
> some rules) and adds more rules for standard properties
> (standard_property2 is required).
> Client2 adds some other properties and/or rules...
> Thanks.

You can have more than one design document in the database, so for your
standard checks, you have a design document with a validate_doc_update
function, which checks for your standard properties. Since replication is
only one-way, you will only ever be pushing your master design document into
the other databases.

Then, if the client wants to add extra checks for custom properties, they an
add their own design document with their own validate_doc_update function.
The two validation functions will be called on every document insert/update.


Paul Bonser

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