couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "History" by CurtArnold
Date Sat, 01 Aug 2009 00:56:46 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by CurtArnold:
http://wiki.apache.org/couchdb/History

------------------------------------------------------------------------------
  
  {{{{
    _id: <uuid>,
+   % Think you'd want the previous rev ID
+   previous: <previous revision id>
    doc: {
      <original document>
    }
@@ -18, +20 @@

   * If people need to add meta-data to the history, e.g. "last changed by", "last changed
date/time", then the recommended way would be to use a custom _update handler to add these
fields to the doc being saved, and these would propagate to the history database.
  
   * Make it easy to "roll back" all docs to a specific point in time.  Viewing how a single
doc looked at a certain point in time is easy, but to get all docs with doc.type == 'profile'
at some point in time, for example, is a bit harder.  Suggestions welcome!
+ 
+ 
+ I think the write to the history db would need to occur before the write to the main db
is completed and a failure would need to about finalizing the write to the main db.  That
much would give you a CVS-like history of each item in the main DB with a slight change of
branching off a single revision when there was failure between a history write and main db
write.
+ 
+ To get a horizontal view of the main db at an instance, the record of the current revs for
all documents would need to be written to the history db occasionally (upper limit would be
at the completion of every main db write).  After the initial write of that record, deltas
could be used until it seems wise to rewrite the full index.  It would not be necessary to
block the main db write until that is complete.
+ 
+ Background tasks could go around delta-ing older documents.  That would require some support
in the main db for a document to be represented as a delta to another document.
  
  == Potential Use Cases ==
  

Mime
View raw message