scylla-proxy

Crates.ioscylla-proxy
lib.rsscylla-proxy
version0.0.4
sourcesrc
created_at2022-12-15 16:39:07.203182
updated_at2024-07-11 17:09:03.973353
descriptionProxy layer between Scylla driver and cluster that enables testing Scylla drivers' behaviour in unfavourable conditions
homepage
repositoryhttps://github.com/scylladb/scylla-rust-driver
max_upload_size
id738085
size171,721
Dmitry Kropachev (dkropachev)

documentation

README

ScyllaDB Rust Driver

Crates.io docs.rs minimum rustc version

This is a client-side driver for ScyllaDB written in pure Rust with a fully async API using Tokio. Although optimized for ScyllaDB, the driver is also compatible with Apache Cassandra®.

Note: this driver is officially supported but currently available in beta. Bug reports and pull requests are welcome!

Getting Started

The documentation book is a good place to get started. Another useful resource is the Rust and Scylla lesson on Scylla University.

Examples

let uri = "127.0.0.1:9042";

let session: Session = SessionBuilder::new().known_node(uri).build().await?;

let result = session.query("SELECT a, b, c FROM ks.t", &[]).await?;
let mut iter = result.rows_typed::<(i32, i32, String)>()?;
while let Some((a, b, c)) = iter.next().transpose()? {
    println!("a, b, c: {}, {}, {}", a, b, c);
}

Please see the full example program for more information. You can also run the example as follows if you have a Scylla server running:

SCYLLA_URI="127.0.0.1:9042" cargo run --example basic

All examples are available in the examples directory

Features and Roadmap

The driver supports the following:

  • Asynchronous API
  • Token-aware routing
  • Shard-aware routing (specific to ScyllaDB)
  • Prepared statements
  • Query paging
  • Compression (LZ4 and Snappy algorithms)
  • CQL binary protocol version 4
  • Batch statements
  • Configurable load balancing policies
  • Driver-side metrics
  • TLS support - install openssl if you want to use it https://docs.rs/openssl/0.10.32/openssl/#automatic
  • Configurable retry policies
  • Authentication support
  • CQL tracing

Ongoing efforts:

  • CQL Events
  • More tests
  • More benchmarks

Getting Help

Please join the #rust-driver channel on ScyllaDB Slack to discuss any issues or questions you might have.

Supported Rust Versions

Our driver's minimum supported Rust version (MSRV) is 1.66.0. Any changes will be explicitly published and will only happen during major releases.

Reference Documentation

Other Drivers

License

This project is licensed under either of

at your option.

Commit count: 2093

cargo fmt