Documentation ¶
Index ¶
- Variables
- func AddMax(rmmap map[ron.UUID]ron.UUID, event, target ron.UUID)
- func MakeCausalSetReducer() ron.Reducer
- func MakeLWW() ron.Reducer
- func MakeLogReducer() ron.Reducer
- func MakeRGAReducer() ron.Reducer
- func MakeSetReducer() ron.Reducer
- func MakeVVReducer() ron.Reducer
- func SetComparator(af, bf *ron.Frame) int64
- func VVComparator(a, b *ron.Frame) int64
- type CausalSet
- type LWW
- type Log
- type RGA
- type RefOrderedBatch
- type RevOrderedUUIDSlice
- type Set
- type TxtMapper
- type VV
Constants ¶
This section is empty.
Variables ¶
var CAUSAL_SET_UUID = ron.NewName("cas")
var DELTA_UUID = ron.NewName("d")
var LOG_UUID = ron.NewName("log")
var LWW_UUID = ron.NewName("lww")
var NO_ATOMS []ron.Atom
var RGA_UUID = ron.NewName("rga")
var RM_UUID = ron.NewName("rm")
var SET_UUID = ron.NewName("set")
var VV_UUID = ron.NewName("vv")
Functions ¶
func MakeCausalSetReducer ¶
func MakeLogReducer ¶
func MakeRGAReducer ¶
func MakeSetReducer ¶
func MakeVVReducer ¶
func SetComparator ¶
func VVComparator ¶
Types ¶
type CausalSet ¶
type CausalSet struct { AlwaysFull bool // contains filtered or unexported fields }
Causal set, assumes causally consistent op delivery. Hence, no tombstones. You can either add or remove an atom/tuple. Equal elements possible.
type LWW ¶
type LWW struct { }
LWW is a last-write-wins replicated data type that may host a variety of user-land data types, like:
- a dictionary,
- a struct or
- a simple 1D array (no splice, no index shifts),
- a simple 2D array.
This LWW employs client-side logical timestamps to decide which write wins, on a field-by-field basis. That is similar to e.g. Cassandra LWW.
type RGA ¶
type RGA struct {
// contains filtered or unexported fields
}
RGA is a Replicated Growable Array data type, an ordered collection of anything (numbers, strings, objects). This algorithm is actually closer to Causal Trees, albeit that name may turn confusing (RG Arrays are actually trees, Causal Trees are actually arrays, but nevermind).
Algorithmically, this differs from Operational Transforms by bruteforcing the problem: all the elements of an array have unique ids, so concurrent changes can't introduce confusion.
type RefOrderedBatch ¶
func (RefOrderedBatch) Len ¶
func (b RefOrderedBatch) Len() int
func (RefOrderedBatch) Less ¶
func (b RefOrderedBatch) Less(i, j int) bool
func (RefOrderedBatch) Swap ¶
func (b RefOrderedBatch) Swap(i, j int)
type RevOrderedUUIDSlice ¶
func (RevOrderedUUIDSlice) Len ¶
func (b RevOrderedUUIDSlice) Len() int
func (RevOrderedUUIDSlice) Less ¶
func (b RevOrderedUUIDSlice) Less(i, j int) bool
func (RevOrderedUUIDSlice) Swap ¶
func (b RevOrderedUUIDSlice) Swap(i, j int)
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set, fully commutative, with tombstones. You can either add or remove an atom/tuple. Equal elements possible.