Ordered Key-Value Store has a small user interface that give us another good good reason to have a look at processing, memory, permanence, and pointer swizzling.
A useable database must offer the following actions:
set will store a piece a data;
query will fetch zero or more piece of data;
delete supposed to do what you think it will, but you will not use it, and even when you do, it will just acknowledge you made a wish;
The primary question that comes to mind is: what is a piece of data?
In the OKVS paradigm, “piece of data” has two parts: the key, similar to what LISP call
car, and the value, similar to what LISP call
set may be described with
set(car, cdr), in more parenthetical terms
(set object other)1. In an OKVS, key, and value, respectively
other, are sequences of ones and zeros2. The user interface of the OKVS paradigm use bit low level data representation.
Data that is binary sequences is a clue into why OKVS is fractal.
We know what is a piece of data: two bit sequences called
value. The database is a list of associations between a
key, and a
value. At any given point in time, given a bit sequence, it can only be associated once, and only once to another bit sequence.
Let’s consider a procedure that would be called
get. One must divine that
get is a shortcut to
(get key) that returns, if any, the value that was associated with
(set key value).
To be an interesting user interface action,
query must subsume
get3. The procedure
get will read, and return something, if any. The procedure
query will also read, and return nothing, return something , and opt-in to return strictly more than one thing. If there is at least two results, one should consider what comes first, what comes next, and if any what comes last... That is why there is an O in OKVS. We want to specify a sorting strategy. The procedure
query returns paired bit sequences in their natural order4. To cover all use cases, the sorted subspace returned by
query is described using two bit sequences called
That is why OKVS is fractal.
I tried to avoid a name collision, and by the way the verbatim associate an unexpected sense to the action handle’s surface↩
According to astute lispers, it could represent everything, and beyond, of what you take for granted↩
In product terms: “describe a feature that is strict superset of what is enabled by
get”, in algebraic terms it can be represented by a matrix with a bigger rank, see Scheme. The matrix can describe another space of features, a space where there is more features↩
A cyclical, cynical, but not clinical, or poisonous, definition of bit sequence’s natural order↩