riak-0.3.1.0: A Haskell client for the Riak decentralized data store

Portabilityportable
Stabilityexperimental
MaintainerBryan O'Sullivan <bos@mailrank.com>

Network.Riak.Resolvable

Description

Storage and retrieval of data with automatic conflict resolution.

Synopsis

Documentation

class Resolvable a whereSource

A type that can automatically resolve a vector clock conflict between two or more versions of a value.

Instances must be symmetric in their behaviour, such that the following law is obeyed:

 resolve a b == resolve b a

Otherwise, there are no restrictions on the behaviour of resolve. The result may be a, b, a value derived from a and b, or something else.

If several conflicting siblings are found, resolve will be applied over all of them using a fold, to yield a single "winner".

Methods

resolve :: a -> a -> aSource

Resolve a conflict between two values.

newtype ResolvableMonoid a Source

A newtype wrapper that uses the mappend method of a type's Monoid instance to perform vector clock conflict resolution.

Constructors

RM 

Fields

unRM :: a