Database Reference
In-Depth Information
Avro definitions are written as schemas, using JavaScript Object Notation (JSON). This is differ-
ent from in Thrift, however, because the schemas are always present along with the data when
it is read. This is an advantage because it means that less type information needs to be sent with
the data, so the serialization is compact and efficient. Avro stores data with its schema, which
means that any program can process it later, independently of the RPC mechanism.
Avro Summary
As of Cassandra version 0.7, Avro is the RPC and data serialization mechanism for Cassandra.
It generates code that remote clients can use to interact with the database. It's well-supported in
the community and has the strength of growing out of the larger and very well-known Hadoop
project. It should serve Cassandra well for the foreseeable future.
You can read more about Avro at its Apache project page: http://avro.apache.org .
A Bit of Git
Cassandra doesn't use Git directly, but understanding at least a bit about Git will help you use a
variety of client projects that do use Git. (If you're already familiar with Git, feel free to skip this
section.) Many open source projects have started moving to GitHub recently. Git is a relatively
new, free source code revision system, written by Linus Torvalds to help him develop the Linux
kernel. It includes social features. GitHub is a Git project hosting site, written in Ruby on Rails,
that offers free and commercial options.
The following client libraries, which we'll look at individually, all use Git: the Web Console,
Hector, Pelops, and other Cassandra-related satellite projects such as Twissandra (as discussed in
the example of Twitter implementation using Cassandra).
The simplest way to get the code for a Git project is to find the project's home page on GitHub
and click the Download Source button to get either a .taror .zipile of the project's trunk.
NOTE
If you're on a Linux distribution such as Ubuntu, it couldn't be easier to get Git. At a console, just type
>apt-get install git and it will be installed and ready for commands.
If you want to work with the source itself (i.e., to fork it), you'll need a Git client. If you're on
Windows, you'll first have to get the Cygwin POSIX emulator and then install Git. Next, go to
the GitHub page hosting the project you're interested in and find the project's Git URL. Open
a terminal in the directory you want to put the source code into and use the clone command.
This will produce output like this:
Search WWH ::




Custom Search