Skip to content

couchdb style versioning #14

@dominictarr

Description

@dominictarr

couchdb actually uses a pretty similar way to do revisions

http://guide.couchdb.org/draft/conflicts.html#deterministic

using an md5 hash plus a revision number. you can calculate what the value will be before you insert the document, but couchdb must insert it for you.

It's actually rather like how git commits work, except that all the data is stored within the commit message and there is no tree or blobs.

This is a very simple approach suitable for when you want to track changes within a single "document" independently from other "documents".

I'd do it more like git though, with _prev: [previous_hash] so that it's possible to represent merges if there are two independent updates to a document.

Also, dynamo has a similar system, except using vector clocks. Also, when you request a document, you get all the un-resolved versions. I like this system because it forces you to resolve conflicts, instead of making it easy to ignore they can happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions