Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a stable Cassandra library for Erlang?

Is there a stable Cassandra library for Erlang? I can't seem to find one

like image 717
yazz.com Avatar asked Apr 23 '10 08:04

yazz.com


3 Answers

I faced the same issue. After benchmarking most of all Cassandra drivers available I've decided to start a new driver Erlcass based on datastax cpp driver.

The datastax cpp driver has incredible performances and it's fully async.

From my tests on a cluster where other erlang drivers couldn't reach more than 10k reads/second with datastax one I was able to get over 60k/s.

There is a slightly difference between the Datastax driver and Erlcass but still I was able to reach over 50k reads/s in the same scenarios.

Most of overhead is coming from converting the data into erlang terms and the other way around.

It's work in progress to improve the interface and performances. Currently non prepared statements needs some changes.

like image 163
silviu Avatar answered Sep 30 '22 18:09

silviu


Apache Cassandra uses Thrift. So all you need to do is to generate the thrift binding for Erlang (thrift --gen erl interface/cassandra.thrift)

From the Apache Thrift wiki:

Thrift has generators for C++, C#, Erlang, Haskell, Java, Objective C/Cocoa, OCaml, Perl, PHP, Python, Ruby, and Squeak

(If you are looking for a more "high level client" library then I dont know.)

like image 43
Schildmeijer Avatar answered Sep 30 '22 20:09

Schildmeijer


I've written a simple Cassandra erlang client. Check it out! https://github.com/lpgauth/cassanderl

like image 42
LPG Avatar answered Sep 30 '22 19:09

LPG