On 16/02/2009, at 2:55 PM, Chris Anderson wrote:

Maybe someone could tell the story of
what happens if you just use CouchDB, with it's weak consistency

'weak consistency' is a class of guarantees, not a guarantee per se, so CouchDB doesn't 'have' weak consistency. In a replicated (as opposed to local) context, I think it provides virtually no consistency guarantees.

, and
don't bother even thinking about these issues. Is the naive approach
doomed? Does it suffice to tell the developers who have more relaxed
demands, "keep your documents independent - eg don't use multi-doc
transactions" or can consistency issues bite back in the single-doc
case as well?

It would suffice to say "don't presume that just because you update A before you update B your code will see A if it can see B". This is the essence of not having Monotonic Writes. It's not about transactions at all. Isolated write groups are something that would a) optimise replication; and b) be useful to application developers (especially with a fail-on-commit option), but they aren't transactions in the traditional sense.

The current replication system is fragile for single-doc cases, because it depends on replication succeeding i.e. AFAICT there's no guarantee that a given document will ever replicate, unless replication completes. With Monotonic Writes, the anti-entropy nature of replication will guarantees that document updates will be seen as replication makes incremental progress. But I've still not analysed the replication code, so I don't know whether document replication is FIFO or not.

I think a Monotonic Writes guarantee makes applications easier to write, and given that it can be provided, why not do it? By adopting a formal model, it means we can draw on existing research, and by adopting a formal conceptual framework, we can mnore fruitfully discuss these issues.

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

One should respect public opinion insofar as is necessary to avoid starvation and keep out of prison, but anything that goes beyond this is voluntary submission to an unnecessary tyranny.
  -- Bertrand Russell


Reply via email to