GithubHelp home page GithubHelp logo

athena's Introduction

Athena

This is a fully asynchronous and nonblocking Cassandra client built on top of the (Excellent) Akka-IO framework.

Currently, it can create a fault tolerant pool of load balanced connections to a Cassandra cluster, stream queries and marshal results.

What doesn't work yet -

  • Authentication
  • Connection compression
  • Intelligent (key aware) query routing
  • Documentation - sample code

Using Athena

Binary release artifacts for Scala 2.11.x and 2.10.x are published to Bintray. It is not currently synced with JCenter or Maven Central, but that's on the roadmap to accomplish soon.

SBT builds

libraryDependencies ++= Seq(
  "io.athena" %% "athena" % "0.4.0"
)

Maven builds

<properties>
    <scala.major.version>2.11</scala.major.version>
</properties>

<dependencies>
    <dependency>
        <groupId>io.athena</groupId>
        <artifactId>athena_${scala.major.version}</artifactId>
        <version>0.4.0</version>
    </dependency>
</dependencies>

Usage

TODO: More info here

Actors

The high level interface for Athena is through the ClusterConnector actor. This actor models a pool of connections to all the hosts in your cluster, and will load balance queries across them in an appropriate fashion.

Sessions

There is currently an experimental higher level Session abstraction that models interactions as a series of pipelines, where a pipeline is simply defined as

AthenaRequest => Future[AthenaResponse]

A Session wraps a pipeline and adds more useful methods on top of it, and also the ability to stream rows back using Play Enumerators. The entirety of this API, however, is really just a prototype and is subject to change across versions with little to no warning.

Building

Athena is built with SBT 0.13.x, and is designed to be essentially and out of the box build. You should be able to compile, package and (if needed) deploy locally by simply doing 'sbt publishLocal' from the command line. The test suite requires an active instance of cassandra to run against. Fortunately, the SBT harness is built in such a way that it automatically handles downloading the proper version of cassandra, configuring it, starting the server and setting up a test keyspace before the tests run. This instance is then torn down after tests complete. Most of this functionality is configured using SBT settings - look in project/CassandraUtils.scala for info on how to change it. For example, if you wish to disable the server auto-provisioning to use your own instance, just add

import CassandraUtils.Keys._

provisionServer := false

to your local.sbt file.

athena's People

Contributors

dpratt avatar dukejansen avatar tupshin avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.