couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Bisbee <>
Subject Re: version control for documents?
Date Thu, 22 Mar 2012 18:52:51 GMT
Hi Miles,

Here is a tool that I built that does just that:

The basic idea is that there is a _changes listener that grabs each
new revision of a document and stores it as its own document in a
different database with a deterministic _id.

I wrote it last year and haven't touched it since or run it in
production. It could use some TLC and I'm not sure whether PHP was the
best language of choice. If I had my druthers I'd likely rewrite it in
node, especially since Sag is now available in JS form.


Sam Bisbee

On Thu, Mar 22, 2012 at 2:36 PM, Miles Fidelman
<> wrote:
> Hi Folks,
> As part of a larger applicaiton, I'm looking at using CouchDB as a "file
> cabinet" to manage a collection of "documents" (surprise, surprise - it is a
> document database after all).  In this case, the documents really will be
> documents (e.g., a word document, or a file).  My simplistic model is that
> each Couch document will contain json-encoded metadata, and an attachment -
> the "real" document as a blob.
> I want to apply version and change control to the documents and their
> metadata.  In essence, I want to do git-like stuff for text, html, and word
> documents.
> I'm aware that CouchDB-style "version control" is not real version control a
> la git, cvs, or what have you - and I've seen some discussions on this list
> that suggest doing "real" version control has to be overlayed on Couch.
> So... my question is:  Are there any good libraries and/or examples for
> doing so?
> Thanks very much,
> Miles Fidelman
> --
> In theory, there is no difference between theory and practice.
> In practice, there is.   .... Yogi Berra

View raw message