scylla-rs

Crates.ioscylla-rs
lib.rsscylla-rs
version0.1.6
sourcesrc
created_at2021-04-26 14:20:26.283974
updated_at2021-09-23 18:39:10.180681
descriptionAn async ScyllaDB driver built on an actor-model framework
homepagehttps://www.iota.org
repositoryhttps://github.com/iotaledger/scylla.rs
max_upload_size
id389704
size514,496
chronicle (github:iotaledger:chronicle)

documentation

README


An async ScyllaDB driver built on an actor-model framework

Developer documentation portal

Discord StackExchange Apache 2.0 license

AboutPrerequisitesGetting StartedSupporting the projectJoining the discussionFuture workLICENSE


About

Scylla.rs provides fast and safe interoperability between rust applications and a distributed Scylla database. Scylla.rs is built on the IOTA actor framework backstage, but does not require dependent apps to use this framework.

Scylla.rs is divided into two parts:

  • Application: Contains traits that simplify database access as well as the actor implementation which manages the database connection. This functionality is feature gated with the app feature.
  • CQL: Contains CQL frame definitions as well as utilities for compression, hashing, and building frames.

Note: This is alpha software, so there may be performance and stability issues. Please report any issues in our issue tracker.

Prerequisites

Scylla.rs requires a connection to a running Scylla instance via the address and port. See here for instructions on creating a docker instance.

Getting Started

Start by adding scylla to your Cargo.toml file.

scylla-rs = "0.1"

Next, construct the Scylla actor. This should be done by adding the Scylla actor to the Backstage launcher! macro:

launcher!(builder: AppsBuilder {[] -> Scylla<Sender>: ScyllaBuilder<Sender>}, state: Apps {});

Start the launcher by calling:

// Create the `Apps` struct by invoking `AppsBuilder::build`
let apps = AppsBuilder::new().build();
// Start the launcher
apps.Scylla()
    .await
    // The following enables us to immediately add a node to
    // the ring using the listen address configured for the 
    // Scylla actor.
    .future(|apps| async {
        let ws = format!("ws://{}/", "127.0.0.1:8080");
        let nodes = vec![([172, 17, 0, 2], 19042).into()];
        add_nodes(&ws, nodes, 1).await.expect("unable to add nodes");
        apps
    })
    .await
    .start(None)
    .await;

Supporting the project

If you want to contribute to Scylla.rs, consider posting a bug report, feature request or a pull request.

Please read the following before contributing:

Joining the discussion

If you want to get involved in the community, need help with getting set up, have any issues related to Chronicle, or just want to discuss IOTA, Distributed Registry Technology (DRT) and IoT with other people, feel free to join our Discord.

Future work

  • Improve usability and documentation

LICENSE

(c) 2021 - IOTA Stiftung

IOTA Scylla.rs is distributed under the Apache License (Version 2.0).

Commit count: 277

cargo fmt