Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A75457CF0 for ; Wed, 17 Aug 2011 15:40:02 +0000 (UTC) Received: (qmail 70973 invoked by uid 500); 17 Aug 2011 15:40:02 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 70878 invoked by uid 500); 17 Aug 2011 15:40:01 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 70860 invoked by uid 99); 17 Aug 2011 15:40:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2011 15:40:01 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 209.85.215.52 as permitted sender) Received: from [209.85.215.52] (HELO mail-ew0-f52.google.com) (209.85.215.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2011 15:39:54 +0000 Received: by ewy28 with SMTP id 28so583515ewy.11 for ; Wed, 17 Aug 2011 08:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=9hmK7KAzdWgxqHT8/rm2Px0FqfwjrOyyU5/PraS3MmA=; b=DsG0q7iZBKKPybJICtcCYD8u3rTSDADLyfo4bfAT9do5zqjnM4Ogdzejq5sijqGD66 roUppI8O3D9ELLNhBUEBn7iMhOFcidpDKxD/MrQczHFyIh3iIbsNwxFtO2Ow7LFGfSc2 3EgpJ4bvHEHvD7fyk3qAGhMwVF+497ZGov5GU= MIME-Version: 1.0 Received: by 10.213.13.134 with SMTP id c6mr1313608eba.119.1313595572720; Wed, 17 Aug 2011 08:39:32 -0700 (PDT) Received: by 10.213.14.196 with HTTP; Wed, 17 Aug 2011 08:39:32 -0700 (PDT) In-Reply-To: <111A4F0F-6055-435B-8FF9-8D48CC058E4D@apache.org> References: <111A4F0F-6055-435B-8FF9-8D48CC058E4D@apache.org> Date: Wed, 17 Aug 2011 17:39:32 +0200 Message-ID: Subject: Re: The _security object should be versioned From: Benoit Chesneau To: "dev@couchdb.apache.org" Content-Type: multipart/alternative; boundary=0015174beaca7d927804aab54d29 --0015174beaca7d927804aab54d29 Content-Type: text/plain; charset=ISO-8859-1 On Wednesday, August 17, 2011, Adam Kocoloski wrote: > I believe the _security object should be versioned in order to ease synchronization of the object between databases. This proposal is motivated (unsurprisingly) by BigCouch, which typically stores multiple copies of each database in a multi-master configuration. When the _security object is written in BigCouch the update is issued to all available shards. We run into problems if an update is issued while some shards are unavailable, because we don't know how to synchronize the divergent copies once all the shards are back online. > > In my head I see us representing the _security object using a #full_doc_info, just as we would a document. Unlike documents the _security object (or a pointer to it) would still be written in the header of the database for fast access during request processing. > > I haven't quite decided what I think the API should look like, e.g. whether the full document API (including attachments?) should be supported. Regards, > > Adam I was about to open an issue in bigcouch about that :) +1 for the change then. btw how is handle the security object during the replication? i would be for a #full_doc_info object. Also it could be renamed as _meta. I would really like to see a way to add meta data. so we could eventually annotate a db or add any oyther metadata. As i read the code it is directly added to the db header. how would it work herecwould having one revision in the header be enough? or do you expect to keep one pointer to the latest revision in the header? benoit --0015174beaca7d927804aab54d29--