umadb-server

Crates.ioumadb-server
lib.rsumadb-server
version0.3.3
created_at2025-11-14 22:57:16.551637+00
updated_at2026-01-17 15:32:05.180089+00
descriptiongRPC server implementation for UmaDB event store
homepagehttps://umadb.io
repositoryhttps://github.com/umadb-io/umadb
max_upload_size
id1933694
size92,636
John Bywater (johnbywater)

documentation

README

umadb-server

gRPC server implementation for UmaDB event store.

Overview

umadb-server provides the gRPC server implementation that exposes UmaDB's event store functionality over the network. It combines the storage engine (umadb-core), protocol definitions (umadb-proto), and DCB API (umadb-dcb) into a complete server library.

Features

  • gRPC service implementation for the UmaDB API
  • Request batching - concurrent append requests are automatically grouped for higher throughput
  • Streaming for real-time event subscriptions with catch-up
  • Health checks via gRPC health checking protocol
  • Async runtime built on Tokio for high-performance concurrent operations

Usage

This crate is typically used by the umadb binary to run the server, but can also be embedded in custom applications:

use tokio::signal;
use tokio::sync::oneshot;
use umadb_server::start_server;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let (tx, rx) = oneshot::channel::<()>();
    tokio::spawn(async move {
        let _ = signal::ctrl_c().await;
        let _ = tx.send(());
    });
    start_server("/path/to/db-file", "127.0.0.1:50051", rx).await?;
    Ok(())
}

Request Batching

The server automatically batches concurrent append requests to amortize disk I/O costs while maintaining per-request atomicity and isolation. This significantly improves throughput under concurrent load.

Streaming Subscriptions

The server supports real-time event subscriptions that:

  • Start from any position in the event store
  • Seamlessly catch up on historical events
  • Continuously deliver new events as they are appended
  • Handle backpressure gracefully

Part of UmaDB

This crate is part of UmaDB, a high-performance open-source event store built for Dynamic Consistency Boundaries.

License

Licensed under either of:

at your option.

Commit count: 978

cargo fmt