Skip to main content

Crate dyniak

Crate dyniak 

Source
Expand description

Riak-compatible protocol layer for the Dynomite Rust port.

dyniak is an optional layer that operators can put in front of the Dynomite cluster substrate to expose a Riak client API. The crate is intentionally narrow: it owns only the Riak-specific pieces (wire codec, request dispatch, storage bridge) and reuses the substrate already shipped in crates/dynomite/ (hashing, gossip, vnodes, quorum, dispatch).

§Public surface

§Architecture

TCP listener (tokio::net::TcpListener)
        |
        v
serve_pbc()  -- accept loop, spawns one task per conn
        |
        v
handle_conn(stream, datastore)
  - decode 4-byte BE length
  - decode 1-byte msg code
  - decode protobuf body via prost
  - dispatch through dynomite::embed::Datastore
  - encode response via prost
  - write framed response

§Encoding

The PBC path is hard-coded to application/x-protobuf; the bytes travel through a dyn_encoding::ProtobufCodec wired up in proto::pb::codec_registry. The HTTP gateway (serve_http) negotiates JSON / CBOR / protobuf per-request through the same registry.

Re-exports§

pub use crate::error::RiakError;
pub use crate::proto::http::serve_http;
pub use crate::proto::http::serve_http_tls;
pub use crate::proto::http::serve_http_tls_with_routing;
pub use crate::proto::http::serve_http_with_routing;
pub use crate::server::handle_conn;
pub use crate::server::serve_pbc;
pub use crate::server::serve_pbc_tls;
pub use crate::server::handle_conn_with_admin;
pub use crate::server::serve_pbc_tls_with_admin;
pub use crate::server::serve_pbc_with_admin;
pub use crate::server::handle_conn_with_hooks;
pub use crate::server::serve_pbc_with_routing;
pub use crate::server::handle_conn_with_aae_status;
pub use crate::server::serve_pbc_with_aae_status;
pub use crate::bucket_props::BucketProps;
pub use crate::bucket_props::BucketPropsRegistry;
pub use crate::replica_apply::ReplicaApplier;
pub use crate::replication::plan_replicas;
pub use crate::replication::plan_replicas_with_liveness;
pub use crate::replication::ReplicaLiveness;
pub use crate::replication::ReplicationPlan;
pub use crate::replication::ReplicationStrategy;
pub use crate::replication::ReplicationStrategyError;
pub use crate::replication::RingPoint;
pub use crate::replication::RingView;
pub use crate::router::BucketRouter;
pub use crate::router::PeerOp;
pub use crate::router::PeerOutbound;
pub use crate::router::RouteDecision;
pub use crate::router::RoutingHooks;
pub use crate::txn::TransactionalStore;
pub use crate::txn::TxnBatch;
pub use crate::txn::TxnOp;
pub use crate::txn::TxnOutcome;
pub use crate::txn::TxnStoreError;
pub use crate::ramp::select;
pub use crate::ramp::RampClock;
pub use crate::ramp::RampItem;
pub use crate::ramp::Timestamp;

Modules§

aae
Tictac active anti-entropy (AAE).
bucket_props
Per-bucket-type, per-bucket property cache.
crdt_store
Convergent CRDT apply against the local datastore.
datastore
Storage bridges for the Riak protocol layer.
datatypes
Riak CRDT data types.
error
Top-level error type for the dyniak crate.
handoff
Explicit token-range handoff between peers.
mapreduce
MapReduce (“pipes”) for the Riak compatibility layer.
proto
Riak wire protocols.
quorum
Quorum resolution for Riak-style tunable consistency.
ramp
Read-Atomic Multi-Partition (RAMP) transactions.
reaper
TTL-driven sibling and tombstone garbage collection.
replica_apply
Local application of inbound cross-node object-replica ops.
replication
Walk-N-successors replication planning for Riak buckets.
router
Bucket-aware request router.
server
TCP accept loop and per-connection driver for the Riak PBC transport.
txn
Multi-key transaction surface for the Riak protocol layer.
vclock
Per-object causal context as a dotted version vector.