Formal definition of temporal consistency in realtime database, Explain temporal consistency with examples, when would we say that data items are relatively consistent?
Formal definition of temporal consistency
Temporal consistency has two
components, namely, Absolute consistency, and Relative consistency.
Let us denote the data item in
realtime database by,
d:
(value, avi, timestamp)
where,
d_{value}

the current state (current value) of d at the time d_{timestamp}

This shows the value of the data item as
observed by the controlling system.
d_{timestamp} –
the time at which the d_{value} observed

This shows the time at which the value is
read by the controlling system.
d_{avi}
–
absolute validity interval of d_{value}.

This shows the length of the time interval the
d_{value} is considered to have absolute validity. That is, d_{value}
is absolutely valid between d_{timestamp} and d_{timestamp} + d_{avi}.
The set of data items that are
relatively consistent with each other, form a relative consistency set R. Each
such set R is associated with a relative validity interval denoted
by R_{rvi}.
Assume that d Є R, then we can define the
conditions for absolute and relative consistency as follows;
Absolute consistency: a data item d is
absolutely valid if and only if,
Current time – d_{timestamp}
≤ d_{avi}.
Relative consistency: a set R of data
items is relatively consistent if and only if,
∀d, ∀d’ Є
R, d_{timestamp} – d’_{timestamp} ≤ R_{rvi}.
Example:
Assume that the current altitude of a
takingoff aircraft is 100 metres. If you have observed this value at time 2000
msec, and if that aircraft can maintain this altitude for at most 20 msec more,
then this data item is temporally specified as,
d_{altitude}:
(100 metres, 20 msec, 2000 msec)
or
altitude = (100,
20, 2000)
The given value (100 metres) can be
absolutely valid for 20 msec since the time it was observed. That means, at the
time 2021 msec (at time > 2000 + 20) the validity will be lost.
Let us assume the relative consistency
set R as {altitude, cabinpressure}. And the relative validity interval R_{rvi}
= 5, then set R is relatively consistent if the difference between the observation
times of altitude and cabinpressure is less than or equal to R_{rvi},
ie. 5.
Altitude = (100, 20, 2000) and Cabinpressure
= (50, 25, 2002) are temporally consistent (both absolutely and relatively
consistent) at time 2020.
Altitude = (100, 20, 2000) and Cabinpressure
= (50, 25, 2006) are absolutely consistent but not relatively consistent at
time 2020. Because, Altitude_{timestamp} – Cabin_pressure_{timestamp}
= 6, which is greater than the given R_{rvi} 5.
****************
Go to Temporal Consistency page to view explanation.
Go to REAL TIME DATABASE Home page
No comments:
Post a Comment