Retention Periods
To allow Primary and Secondary producers to periodically purge 'old' tuples, and to give
a precise meaning to the 'current state' for a latest query, retention
period are used. A LatestRetentionPeriod (time interval) is
inserted into each tuple published by a Primary Producer, and remains there when a tuple is
re-published by a Secondary Producer. In addition, Primary and Secondary producers declare
(in the registry) a HistoryRetentionPeriod for each table to which
they are publishing tuples. Primary and Secondary producers therefore have two logical
tuple-stores, one supporting latest-queries and the other supporting continuous and history
queries.
Producers undertake to retain the most recent version of any
tuple which has not exceeded its LatestRetentionPeriod, and all
versions of any tuple which have not exceeded the HistoryRetentionPeriod. A latest-query
returns only the most recent versions of tuples, and only those tuples which have not
exceeded their LatestRetentionPeriod (this is the definition of current state). Conversely,
a history-query returns whatever is available, but that is guaranteed to include at least
all versions of tuples which have not exceeded the producer's HistoryRetentionPeriod for
the table.
|