All Projects → krojew → cdrs-tokio

krojew / cdrs-tokio

Licence: other
High-level async Cassandra client written in 100% Rust.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to cdrs-tokio

Nodejs Driver
DataStax Node.js Driver for Apache Cassandra
Stars: ✭ 1,074 (+1888.89%)
Mutual labels:  cassandra, driver
Cdrs
Cassandra DB native client written in Rust language. Find 1.x versions on https://github.com/AlexPikalov/cdrs/tree/v.1.x Looking for an async version? - Check WIP https://github.com/AlexPikalov/cdrs-async
Stars: ✭ 314 (+481.48%)
Mutual labels:  cassandra, driver
Csharp Driver
DataStax C# Driver for Apache Cassandra
Stars: ✭ 477 (+783.33%)
Mutual labels:  cassandra, driver
Erlcass
High-Performance Erlang Cassandra driver based on DataStax cpp-driver
Stars: ✭ 59 (+9.26%)
Mutual labels:  cassandra, driver
Cassandra Sharp
high performance .NET driver for Apache Cassandra
Stars: ✭ 114 (+111.11%)
Mutual labels:  cassandra, driver
Phpfastcache
A high-performance backend cache system. It is intended for use in speeding up dynamic web applications by alleviating database load. Well implemented, it can drops the database load to almost nothing, yielding faster page load times for users, better resource utilization. It is simple yet powerful.
Stars: ✭ 2,171 (+3920.37%)
Mutual labels:  cassandra, driver
Gocql
Package gocql implements a fast and robust Cassandra client for the Go programming language.
Stars: ✭ 2,182 (+3940.74%)
Mutual labels:  cassandra, driver
Cqerl
Native Erlang CQL client for Cassandra
Stars: ✭ 201 (+272.22%)
Mutual labels:  cassandra, driver
soxy-driver
A docker networking driver that transparently tunnels docker containers TCP traffic through a proxy
Stars: ✭ 25 (-53.7%)
Mutual labels:  driver
rust-radio-sx127x
Rust driver for the Semtech SX127x series of Sub-GHz LoRa/ISM radio transceivers
Stars: ✭ 21 (-61.11%)
Mutual labels:  driver
FsCassy
Functional F# API for Cassandra
Stars: ✭ 20 (-62.96%)
Mutual labels:  cassandra
embedded-ccs811-rs
Platform agnostic Rust driver for the CCS811 ultra-low power digital gas sensor for monitoring indoor air quality
Stars: ✭ 12 (-77.78%)
Mutual labels:  driver
verticegateway
REST API server with built in auth, interface to ScyllaDB/Cassandra
Stars: ✭ 25 (-53.7%)
Mutual labels:  cassandra
laravel-postal
This library integrates Postal with the standard Laravel mail framework.
Stars: ✭ 20 (-62.96%)
Mutual labels:  driver
hector
a high level client for cassandra
Stars: ✭ 51 (-5.56%)
Mutual labels:  cassandra
crystal-sqlite3
SQLite3 bindings for Crystal
Stars: ✭ 118 (+118.52%)
Mutual labels:  driver
hwidspoofer
HardwareID Spoofer using kernelmode
Stars: ✭ 68 (+25.93%)
Mutual labels:  driver
vboxpower
VirtualBox Power Driver for MAAS
Stars: ✭ 107 (+98.15%)
Mutual labels:  driver
amazon-keyspaces-toolkit
Docker Image /tools for working with Amazon Keyspaces.
Stars: ✭ 25 (-53.7%)
Mutual labels:  cassandra
KMAC
Some usefull info when reverse engineering Kernel Mode Anti-Cheat
Stars: ✭ 31 (-42.59%)
Mutual labels:  driver

CDRS tokio crates.io version build status

CDRS tokio - async Apache Cassandra driver using tokio

CDRS is production-ready Apache Cassandra driver written in pure Rust. Focuses on providing high level of configurability to suit most use cases at any scale, as its Java counterpart, while also leveraging the safety and performance of Rust.

Features

  • Asynchronous API;
  • TCP/TLS connection (rustls);
  • Topology-aware dynamic and configurable load balancing;
  • Configurable connection strategies and pools;
  • Configurable speculative execution;
  • LZ4, Snappy compression;
  • Cassandra-to-Rust data serialization/deserialization with custom type support;
  • Pluggable authentication strategies;
  • ScyllaDB support;
  • Server events listening;
  • Multiple CQL version support (3, 4), full spec implementation;
  • Query tracing information;
  • Prepared statements;
  • Query paging;
  • Batch statements;
  • Configurable retry and reconnection policy;
  • Support for interleaved queries;
  • Support for Yugabyte YCQL JSONB;

Performance

Due to high configurability of CDRS, the performance will vary depending on use case. The following benchmarks have been made against the latest (master as of 03-12-2012) versions of respective libraries (except cassandra-cpp: 2.16.0).

  • cdrs-tokio-large-pool - CDRS with node connection pool equal to double of physical CPU cores
  • cdrs-tokio-small-pool - CDRS with a single connection per node
  • scylladb-rust-large-pool - scylla crate with node connection pool equal to double of physical CPU cores
  • scylladb-rust-small-pool - scylla crate with a single connection per node
  • cassandra-cpp - Rust bindings for Datastax C++ Driver, running on multiple threads using Tokio
  • gocql - a driver written in Go

insert benchmark

select benchmark

mixed benchmark

Knowing given use case, CDRS can be optimized for peak performance.

Documentation and examples

Getting started

This example configures a cluster consisting of a single node without authentication, and uses round-robin load balancing. Other options are kept as default.

use cdrs_tokio::cluster::session::{TcpSessionBuilder, SessionBuilder};
use cdrs_tokio::cluster::NodeTcpConfigBuilder;
use cdrs_tokio::load_balancing::RoundRobinLoadBalancingStrategy;
use cdrs_tokio::query::*;

#[tokio::main]
async fn main() {
    let cluster_config = NodeTcpConfigBuilder::new()
        .with_contact_point("127.0.0.1:9042".into())
        .build()
        .await
        .unwrap();
    let session = TcpSessionBuilder::new(RoundRobinLoadBalancingStrategy::new(), cluster_config).build();

    let create_ks = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
                     'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
    session
        .query(create_ks)
        .await
        .expect("Keyspace create error");
}

License

This project is licensed under either of

at your option.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].