In RON, an RDT is the data type that an object »>inherits from«<. Each object has an associated RDT specified at creation time (e.g. the root op might be
:rga). RON uses the rules associated with that RDT to correctly process individual operations and reduce them to a consistent object state.
Internally, RDTs works as pure functions:
f(state_frame, change_frame) → new_state_frame. Where frames are either empty frames or single ops, or products of past reductions by the same RDT. A
change_frame could be an op, a patch or a complete state.
All RDTs are:
f(f(state_frame, op1), op2) == f(state_frame, patch)where
patch == f(op1,op2),
f(f(state_frame, a), b) == f(f(state_frame, b), a), assuming
boriginated concurrently at different replicas,
f(state_frame, op1) == f(f(state_frame, op1), op1) == f(state, f(op1, op1)),
One of the central features of RDTs is the ability to “switch gears” from pure op-based CRDT mode, to patch-based CRDT, to state-based:
|"Gear"||Function Application||When Useful|
A mapper is a RON term akin to a “view” in a database. A mapper translates a replicated object’s state in RON format into other formats: