Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 47011 invoked from network); 19 Nov 2009 06:42:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Nov 2009 06:42:41 -0000 Received: (qmail 95518 invoked by uid 500); 19 Nov 2009 06:42:39 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 95435 invoked by uid 500); 19 Nov 2009 06:42:39 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 95425 invoked by uid 99); 19 Nov 2009 06:42:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2009 06:42:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-yx0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2009 06:42:31 +0000 Received: by yxe6 with SMTP id 6so1845327yxe.13 for ; Wed, 18 Nov 2009 22:42:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=ET5wq68BOFpHLxBbPOrAwyPcjTdvJ6MKv+Z9w5ekjUQ=; b=C8NoDjI6FqSFQlEVzSrp9/JoKhYxkJyghUDDqPtILyK+h/a1GFIOSJ09iKVsh3hifh BVx3E0E9TnjWwbccSkqOYvNowVo9580URuD3UCfjXdDoDsiHQPK21RBn02EDi5lUbXu0 H0VubmMDzAi9Co7LUqwv4wDcyewBHBMD7yqfY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=T2iAhnHrbVEqCOWcPRuOLG65kayiqlYIyO179DJXPhkl/ocOuc/DUpi5Dijdp4sYeB h9oeM5fP3q32e1Dn1+ckV8AEMTX37Vxpgi/UGJxiK8A7aoLytTE2qrdKkSqpZLV8C8j5 zZsKSZ1DJoNBkArwP5bBnlJV4R+ob9IrUl0PI= MIME-Version: 1.0 Received: by 10.101.5.8 with SMTP id h8mr3608829ani.79.1258612928679; Wed, 18 Nov 2009 22:42:08 -0800 (PST) In-Reply-To: References: <1696307396.20091119121228@mail.ru> From: Paul Davis Date: Thu, 19 Nov 2009 01:41:48 -0500 Message-ID: Subject: Re: revisions and CouchDB as Temporal database To: user@couchdb.apache.org, sftf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Nov 19, 2009 at 1:37 AM, Paul Davis w= rote: > On Thu, Nov 19, 2009 at 1:12 AM, sftf wrote: >> Why we need to reinvent a revision mechanism at application level, >> instead of using existing built-in one? >> This built-in mechanism is very useful in applications that need >> to maintain revision history of documents (aka Temporal Database). >> >> But now compaction and replication treats older versions of each documen= t as garbage, >> but not as document's history useful at the application level. >> >> So questions is: >> It may be useful to make this revision mechanism as the temporal feature= (in sense of transaction-time) >> of CouchDB? >> >> And for this: >> a) invent option to compact without removing old revisions from the data= base and >> =A0 option to removing revisions older than the given timestamp >> b) invent replication option to replicate revisions too >> c) invent optional flexible timestamping of revisions >> Thanks. >> >> > > While CouchDB's MVCC tokens may appear to be a replacement for > revision systems, they are fundamentally not qualified for such a > task. They are only a specific implementation of optimistic > concurrency and are far removed from content tracking as would be > required. > > Attempting to attach a temporal meaning to the MVCC tokens is also a > fairly common reaction. This is generally born out of a misconception > of what these tokens are for. Specifically, MVCC tokens are explicitly > opaque. Applications are not allowed to depend on their format or > implementation defined meaning. Attempting to attach a time based > definition to these tokens violates many assumptions as to what they > represent. > > HTH, > Paul Davis > I should mention, if you're interested in a system that does include time into its revisions, you should investigate git's implementation. Its basically a merkle tree with conventions for what to hash. While appearing to be quite similar to our MVCC tokens at first, you have to remember that our tokens are meant to be reconcilable when we make identical edits on multiple nodes, where as git tries very hard to distinguish similar edits on different nodes. HTAH, Paul Davis