rdms icon indicating copy to clipboard operation
rdms copied to clipboard

Version control for values

Open prataprc opened this issue 6 years ago • 0 comments

Rdms, when configured with version control, won't destory older values for index entries. In other words, from the first mutation that CREATE a {key,value} entry in the index, to all subsequent DELETE and UPDATE mutations, can be preserved in the index.

There are two flavours to version control, centralised and distributed.

centralised version control assume a single instance of serialized writes into index. This implies that, for every version of value, its parent version is its previous version stored in the index, and shall remain so for rest of the index's life. Rdms's centralised version control has following properties:

  1. Value-type should provide an associated Delta-type D.
  2. If P in parent value, C is child value.
  3. Value-type shall provide a diff-algorithm to compute D = P - C.
  4. Value-type shall provide a merge-algorithm to compute P = C - D.

distributed version control assumes multiple instance of an index, replicated across different nodes, and atleast two or more instances can injest write operations. This has few additional requirements on the version control system:

  1. Every version must be identified with unique SHA.
  2. Every version must identify its parent version via its SHA.
  3. Value-types must support 3-way merge.

distributed version control won't be part of Milestone-1

prataprc avatar Sep 02 '19 12:09 prataprc