Skip to main content

Crate dynomite

Crate dynomite 

Source
Expand description

Dynomite is a distributed replication layer for Redis and Memcached datastores. This crate provides the engine as a library so it can be embedded in another Rust program, and is also driven by the dynomited binary as a standalone server.

§Embedding

The public embedding API lives in embed. Build a Server with ServerBuilder and drive it via the returned ServerHandle:

use dynomite::{Server, ServerBuilder};
use dynomite::conf::DataStore;
let server = ServerBuilder::new("dyn_o_mite")
    .listen("127.0.0.1:0".parse().unwrap())
    .dyn_listen("127.0.0.1:0".parse().unwrap())
    .data_store(DataStore::Redis)
    .servers(vec![dynomite::conf::ConfServer::parse("127.0.0.1:6379:1").unwrap()])
    .tokens_str("0")
    .build()
    .unwrap();
let handle = server.start().await.unwrap();
handle.shutdown().await.unwrap();

The full reference manual lives in docs/book/. See the embed module for the complete embedding cookbook.

Re-exports§

pub use crate::core::types::DynError;
pub use crate::core::types::Msec;
pub use crate::core::types::MsgId;
pub use crate::core::types::Sec;
pub use crate::core::types::SecureServerOption;
pub use crate::core::types::Status;
pub use crate::core::types::Usec;
pub use crate::embed::Server;
pub use crate::embed::ServerBuilder;
pub use crate::embed::ServerHandle;

Modules§

admin
Operator-facing diagnostic surfaces.
cluster
Cluster layer: pools, peers, datacenters, racks, gossip, snitch, vnode dispatch, and the cluster-aware Dispatcher implementation.
conf
YAML configuration: schema, parsing, defaulting, validation.
core
Core engine primitives: types, settings, logging, signals, queues, and the task scheduler used by the rest of the engine.
crypto
Cryptographic primitives used by the DNODE peer protocol.
embed
Public embedding API for the Dynomite engine.
entropy
Entropy reconciliation channel.
events
Cluster events: a structured fan-out channel for state transitions that test harnesses, admin tools, and OTLP appenders can consume programmatically.
hashkit
Hashing primitives, token arithmetic, and ring distributions.
io
I/O substrate: chunked buffer pool, fixed-size SPSC ring, and a transport abstraction layered on tokio.
msg
Message model: the in-memory shape every request and response takes inside the engine, plus the queues, indices, and per-DC response managers that thread them through the dispatcher.
net
Connection state machines and transport listeners.
proto
Wire-protocol codecs for Dynomite’s external surfaces.
runtime
Runtime primitives for bounded back-pressure.
seeds
Pluggable seeds providers.
stats
Pool, server, and peer metrics with histograms and a JSON snapshot.
util
Small utility helpers shared across the engine: byte-slice helpers, numeric parsing, time, address resolution, and the typed map abstractions that wrap third-party data structures.