On 12/01/2009, at 10:26 PM, Noah Slater wrote:

On Mon, Jan 12, 2009 at 05:15:39PM +1030, Antony Blakey wrote:
--- Revised Proposal ---------

Each document, whether canonical or derived, has a globally unique
identity consisting of a UUID and the document ID.

In the case of a canonical document, the UUID is the UUID of the
database (or cluster), which is assigned when a database is created.

In the case of a (derived) view map result, it is the UUID of the map
function (not the design doc), which is assigned to each map function
(i.e. view) in a design doc when the design doc is created or updated.

Furthermore, there is a triple {UUID, document id, document rev} that
globally identifies a document at a given point in time. The key
characteristic being that a {UUID, id, rev} identifies an immutable
value.

For views it is slightly more complex. At a first blush you need to include the key because a given map function can emit multiple view rows per document. But from a theoretical standpoint it's worse than that, because the map function can emit multiple view rows with identical keys but different values. This is a pathological scenario however, and IMO a generic middleware that doesn't deal with that situation is still extraordinarily useful.

Antony Blakey
-------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

A reasonable man adapts himself to suit his environment. An unreasonable man persists in attempting to adapt his environment to suit himself. Therefore, all progress depends on the unreasonable man.
  -- George Bernard Shaw


Reply via email to