tephra-server 0.1.0

Synchronous, thread-per-connection TCP server exposing a tephra event store over the length-prefixed protobuf protocol
docs.rs failed to build tephra-server-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

A synchronous, thread-per-connection TCP server exposing a [tephra] event store over the length-prefixed protobuf protocol defined in [tephra_proto].

The model mirrors the database: tephra is single-writer and synchronous (WriteHandle::append blocks until durable, reads run on the caller's own thread over a lock-free snapshot), so each connection is served on its own OS thread that blocks on the socket and calls straight into the shared handles. No async runtime, no thread pool.

Usage

use std::net::TcpListener;
use tephra::log::set::{SegmentConfig, SegmentSet};
use tephra::writer::{WriteCoordinator, WriterConfig};
use tephra_server::{Server, ServerConfig};

let set = SegmentSet::open("data", SegmentConfig::new(16 * 1024 * 1024)).unwrap();
let (coordinator, handle) = WriteCoordinator::start(set, WriterConfig::default()).unwrap();
let server = Server::bind("127.0.0.1:9000", handle, ServerConfig::default()).unwrap();
let shutdown = server.shutdown_handle();
// ... install a signal handler that calls `shutdown.shutdown()` ...
server.run().unwrap();
coordinator.shutdown();