background preloader

Cassandra

Facebook Twitter

ThriftExamples. If you are new to Cassandra and just want to get started, take a look at the available clients ClientOptions (v0.6) instead. This page shows examples of using the low-level Thrift interface, primarily intended for client library developers. To generate the bindings for a particular language, first find out if Thrift supports that language. If it does, you can run "thrift --gen XYZ interface/cassandra.thrift" for whatever XYZ you fancy. These examples are for Cassandra 0.5 and 0.6. As of 0.7 and later, the default thrift transport is TFramedTransport so if you get an error such as "No more data to read", switch transports. Before working with Cassandra and PHP make sure that your PHP installation has APC enabled.

To create Cassandra.php and cassandra_types.php you must use thrift -gen php interface/cassandra.thrift of the cassandra package the rest of these files come from the main thrift package. Java Toggle line numbers Same example as above but working with cassandra version 0.6.0 beta. WTF is a SuperColumn? An Intro to the Cassandra Data Model — Arin Sarkissian. HBase vs Cassandra: why we moved « Bits and Bytes. My team is currently working on a brand new product – the forthcoming MMO www.FightMyMonster.com.

This has given us the luxury of building against a NOSQL database, which means we can put the horrors of MySQL sharding and expensive scalability behind us. Recently a few people have been asking why we seem to have changed our preference from HBase to Cassandra. I can confirm the change is true and that we have in fact almost completed porting our code to Cassandra, and here I will seek to provide an explanation. For those that are new to NOSQL, in a following post I will write about why I think we will see a seismic shift from SQL to NOSQL over the coming years, which will be just as important as the move to cloud computing.

That post will also seek to explain why I think NOSQL might be the right choice for your company. But for now I will simply relay the reasons why we have chosen Cassandra as our NOSQL solution. Did Cassandra’s bloodline foretell the future? Like this: Like Loading... Installing Cassandra and Thrift on Snow Leopard – A Quick Start Guide. Update March 25 2010: I will soon update this for Cassandra 0.6 (which is currently in beta). Until then, this process still works – just install Cassandra 0.5.1 I couldn’t find much in the way of an OS X install guide for Cassandra and (particularly) Thrift, so here’s a brief summary of the steps I took to get Cassandra up and running on Snow Leopard. Requirements: xcode (provides java, ant and g++, autotools etc for compiling thrift) & svn. I used macports to get “boost, “pkgconfig” and “libevent”, all used by for Thrift. Part 1: JAVA_HOME OSX does not set JAVA_HOME for you, instead it must be done manually.

A simple way is to add the following line to ~/.bashrc export JAVA_HOME=$(/usr/libexec/java_home) After setting JAVA_HOME, you will need to exit and reopen terminal before the change will take effect. Part 2: Installing Cassandra # I installed Cassandra into /opt and run it as me. mkdir -p /opt/cassandra chown -R {you} /opt/cassandra Part 3: Installing Thrift Next, we build it… So, Why is Twitter Really Not Using Cassandra to Store Tweets? A firestorm of accusations circled around recently saying that Cassandra, the elected-by-major-adopters emperor of the NoSQL movement, has no clothes. It was said Twitter was dumping Cassandra; Reddit outages were linked to Cassandra; and even Facebook, Cassandra's cradle of birth, was said to have abandoned Cassandra.

Shouts of NoSQL Fail! Were heard in the streets. Much gloating followed. Is the emperor really naked? (Note: after this point the article contains a flow chart that is NSFW. Is Twitter really abandoning Cassandra? Twitter is busy fighting other fires and they don't have the time to retrofit something that is (more or less) working, namely their MySQL based tweet storage, with a completely new technology based on Cassandra. This is the perfect opportunity to share a flow chart that I copied many years ago from a lone cubicle wall, deep in the heart of Dilbert-land.

Flow Chart for Project Decision Making I still get a laugh everytime I read it. Some of this is inevitable. Cassandra | Rich Atkinson. Cassandra @ Twitter: An Interview with Ryan King « myNoSQL. There have been confirmed rumors about Twitter planning to use Cassandra for a long time. But except the mentioned post, I couldn’t find any other references. Twitter is fun by itself and we all know that NoSQL projects love Twitter. So, imagine how excited I was when after posting about Cassandra 0.5.0 release, I received a short email from Ryan King, the lead of Cassandra efforts at Twitter simply saying that he would be glad to talk about these efforts.

So without further ado, here is the conversation I had with Ryan King (@rk) about Cassandra usage at Twitter: MyNoSQL: Can you please start by stating the problem that lead you to look into NoSQL? Ryan King: We have a lot of data, the growth factor in that data is huge and the rate of growth is accelerating. We have a system in place based on shared mysql + memcache but its quickly becoming prohibitively costly (in terms of manpower) to operate. Ryan King: MyNoSQL: What kind of tests have you run to evaluate these systems? The Apache Cassandra Project. ThriftExamples.