Skip to main content

Crate laminar_core

Crate laminar_core 

Source
Expand description

§LaminarDB Core

The core streaming engine for LaminarDB, implementing the Ring 0 (hot path) components.

This crate provides:

  • Reactor: Single-threaded event loop with zero allocations
  • Operators: Streaming operators (map, filter, window, join)
  • State Store: Lock-free state management with sub-microsecond lookup
  • Time: Event time processing, watermarks, and timers

§Design Principles

  1. Zero allocations on hot path - Uses arena allocators
  2. No locks on hot path - SPSC queues, lock-free structures
  3. Predictable latency - < 1μs event processing
  4. CPU cache friendly - Data structures optimized for cache locality

§Example

use laminar_core::{Reactor, Config};

let config = Config::default();
let mut reactor = Reactor::new(config)?;

// Run the event loop
reactor.run()?;

Re-exports§

pub use reactor::Reactor;
pub use reactor::ReactorConfig;

Modules§

aggregation
Cross-partition aggregation.
alloc
Zero-allocation enforcement for Ring 0 hot path.
budget
Task Budget Enforcement
checkpoint
Distributed checkpoint barrier protocol.
compiler
Plan compiler infrastructure for Ring 0 event processing.
dag
DAG Pipeline Topology
detect
Automatic Hardware/Software Feature Detection
error_codes
Structured error code registry (LDB-NNNN) and Ring 0 hot path error type. LaminarDB structured error code registry.
io_uring
io_uring Advanced Optimization
lookup
Lookup table types and predicate pushdown.
mv
Cascading Materialized Views
numa
NUMA Topology Detection
operator
Operator Module
reactor
Reactor Module
serialization
Shared Arrow IPC serialization for RecordBatch ↔ bytes. Shared Arrow IPC serialization helpers.
state
State Store Module
storage_io
Platform-abstracted non-blocking storage I/O for Ring 0.
streaming
Streaming API
subscription
Reactive Subscription System
time
Time Module
tpc
Thread-Per-Core (TPC) Module

Macros§

hot_path
Macro to mark a function as hot path.

Enums§

Error
Error types for laminar-core

Type Aliases§

Result
Result type for laminar-core operations