Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
Last write wins. Assuming timestamp is unique.
This type is both CmRDT
and CvRDT
.
Timestamps are assumed unique, totally ordered, and consistent with causal order; i.e., if assignment 1 happened-before assignment 2, the former’s timestamp is less than the latter’s.
LWW | |
|
CvRDT
initialize :: Clock m => a -> m (LWW a) Source #
Initialize state
assign :: Clock m => a -> LWW a -> m (LWW a) Source #
Change state as CvRDT operation. Current value is ignored, because new timestamp is always greater.
Implementation detail
advanceFromLWW :: Clock m => LWW a -> m () Source #