Table Sink allows you to store the sample data in memory and keep it queriable. In fact it forms some sort of timeseries database, the time is the key, the value is the sample-entity value. All tables are named.
API may look like this
val stream = someSampleStream()
stream.toTable("mySamples")
To avoid excessive memory usage need to support retain by time strategy.
val stream = someSampleStream()
stream.toTable("mySamples", 120.sec)
No other or custom strategies at the moment. However need to keep that in mind.
Query language
Query language is kept simple, and allows to query the data by time range, for example the following API may work:
Table.byName<Sample>("mySamples")
.last(60.sec)
.byTime { it >"2020/01/01 12:00" && it < "2020/01/01 13:00" }
Query forms a stream which might be processed as a regular BeanStream<T>.
Table Sink allows you to store the sample data in memory and keep it queriable. In fact it forms some sort of timeseries database, the time is the key, the value is the sample-entity value. All tables are named.
API may look like this
To avoid excessive memory usage need to support retain by time strategy.
No other or custom strategies at the moment. However need to keep that in mind.
Query language
Query language is kept simple, and allows to query the data by time range, for example the following API may work:
Query forms a stream which might be processed as a regular
BeanStream<T>
.