Skip to main content

Crate rhei_core

Crate rhei_core 

Source
Expand description

Core traits and types for the Rhei HTAP engine.

rhei-core is the foundation crate of the Rhei workspace. Every other crate depends on it for shared abstractions. It deliberately has no dependencies on concrete database drivers so that it can be compiled quickly and used as a pure trait/type boundary.

§Position in the HTAP pipeline

Client
  |
  v
HtapEngine  (crates/rhei)
  |-- QueryRouter  ──────────────────── routes SQL to OLTP or OLAP
  |-- OltpEngine   ──────────────────── transactional reads/writes
  |-- OlapEngine   ──────────────────── analytical queries
  |-- CdcConsumer  ──────────────────── polls change-data-capture events
  +-- SyncEngine   ──────────────────── applies CDC events to OLAP

§Key types

ItemDescription
OltpEngineAsync trait for transactional SQL execution
OlapEngineAsync trait for analytical SQL + Arrow bulk-load
CdcConsumerAsync trait for polling CDC events
SyncEngineAsync trait for the CDC→OLAP sync loop
QueryRouterSync trait that classifies SQL to QueryTarget
SchemaRegistryThread-safe registry of TableSchemas
CdcEventA single change-data-capture event
SyncModeDestructive mirror vs. SCD Type 2 temporal history
RecordBatchBoxStreamStreaming Arrow record-batch type

Re-exports§

pub use error::CoreError;
pub use schema::validate_identifier;
pub use schema::SchemaRegistry;
pub use schema::TableSchema;
pub use traits::cdc::CdcConsumer;
pub use traits::olap::vec_to_stream;
pub use traits::olap::OlapEngine;
pub use traits::olap::RecordBatchBoxStream;
pub use traits::oltp::OltpEngine;
pub use traits::router::QueryRouter;
pub use traits::sync::SyncEngine;
pub use types::*;

Modules§

error
Error types for the rhei-core crate.
schema
Table-schema registry and identifier-validation utilities.
traits
Async trait definitions for all major Rhei engine components.
types
Core domain types shared across all Rhei crates.