couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <N.Breun...@vpro.nl>
Subject RE: change notifications question
Date Sun, 10 Apr 2011 00:21:11 GMT
This blog post suggests storing versions as attachments:

Simple Document Versioning with CouchDB
http://blog.couchbase.com/simple-document-versioning-with-couchdb

Nils.
________________________________________
Van: Mark Hahn [mark@boutiquing.com]
Verzonden: zaterdag 9 april 2011 20:50
Aan: Thomas Vander Stichele
CC: user@couchdb.apache.org
Onderwerp: Re: change notifications question

>  I might as well build it on top of anything else than couchdb no ? :)

If the only feature you care about in your db is versioning then you are
correct, all non-versioning dbs are equal.  I personally love using couch
for the many reasons discussed.  I find it so much less painful than a
structured db.

If you are willing to build the versioning in your app then there is a
simple solution, IMHO.  Save new versions as new docs, not revisions.  Couch
doesn't utilize differencing of versions so there is no performance hit.
 Keep your own ID that is separate from the couch ID.  You can create a view
that links to the previous "version" and you can pull both docs in one
query.  Replication will work the same.  DB size growth will be the same.
 You will need to do your own deleting at your leisure but you will have
full control with your own algorithm.

The coding of this would be trivial compared to changing the erlang
implementation of couch and you wouldn't be risking losing support by
forking.  I think I could do it in a day or so.  It would be fun.
------------------------------------------------------------------------
 VPRO   www.vpro.nl
------------------------------------------------------------------------

Mime
View raw message