1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Generic code for implementing new sensors within the OpenSensor ecosystem
//!
//! The design goals of the sensor crate are similar to those of the
//! [embedded-hal](https://www.github.com/rust-embedded/embedded-hal):
//! - Erase sensor specific details
//! - Be generic within a sensor and across sensors
//! - Serve as a foundation for building an ecosystem of sensor-agnostic data engineering code
/// Trait for arrow serialization
/// Trait that sensors should implement to produce parquet archives
pub use Sensor;
/// Reexports
pub use Transducer;
/// A sink for sensor data stored in Redpanda into various downstream data systems
///
/// Use for implementing an S3 Parquet sink (also the Archiver trait), MyCelial (SQLite), and OLTP (Scylladb)
///
/// To make it possible to track how much of a given topic has been written to the particular sink, do manual
/// offset commits to the consumer group (and use dedicated consumer group ids for each type of sink per measurement)
/// See the archiver crate and trait for an example of how to do manual offset commits once a batch of measurements
/// have been confirmed to be written to a downstream sink.
///
/// It might make more sense to separate these out by the type of sink (have a separate Archiver, SQLite, and ScyllaDB trait)
/// that can also be implemented on AlgorithmResult/InferenceResults vs a single SensorSink trait (and have to also write a
/// ModelSink + other types of traits)