<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Official Rackspace Blog &#187; Gary Dusbabek</title>
	<atom:link href="http://www.rackspace.com/blog/author/gdusbabek/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rackspace.com/blog</link>
	<description>The Official Rackspace Blog</description>
	<lastBuildDate>Fri, 24 May 2013 18:09:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Rackspace Contributes Cassandra CQL Driver For Node.js</title>
		<link>http://www.rackspace.com/blog/rackspace-contributes-cassandra-cql-driver-for-node-js/</link>
		<comments>http://www.rackspace.com/blog/rackspace-contributes-cassandra-cql-driver-for-node-js/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 14:00:57 +0000</pubDate>
		<dc:creator>Gary Dusbabek</dc:creator>
				<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[Cloud Monitoring]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/blog/?p=17693</guid>
		<description><![CDATA[Rackspace has made an open source solution for you to easily query Cassandra databases using CQL from your Node.js applications.]]></description>
				<content:encoded><![CDATA[<p>One of the great technology enablers of the last decade has been open-source software. It encourages commercial software developers to create better products by fostering processes that cut across companies, utilizing the best talent from each. Additionally, competition from open-source projects creates an ecosystem that gives consumers more choice in the software they use to power their enterprises.</p>
<p>Rackspace supports open-source software development in several ways, the most obvious being <a href="http://www.openstack.org/">OpenStack</a>. Rackspace believes that software should be developed in the open when it makes sense. This post describes some of the work we have been doing within the <a href="http://nodejs.org/">Node.js</a> and <a href="http://cassandra.apache.org/">Cassandra</a> communities.</p>
<p>Rackspace has a long history of working within the Cassandra community. Rackspace engineers participated in crucial stages of its development by moving to get Cassandra into the Apache Incubator and were instrumental in further developing it into a top-level Apache project. Cassandra is used today by dozens of companies and is one of the leaders in the “NoSQL” space.</p>
<p>The release of Cassandra Query Language (CQL), initially developed by a Rackspace engineer, coincided with the release of Cassandra 0.8. Rackspace subsequently supported substantial development for the Java, Python and Node.js CQL drivers.</p>
<p>CQL aims to be an easier way to read and write to Cassandra databases. CQL was designed to closely resemble SQL, easing the burden of developers being exposed to Cassandra for the first time.</p>
<p>When Rackspace started developing <a href="../../cloud/cloud_hosting_products/monitoring/">Cloud Monitoring</a>, we decided to use Node.js for our API service endpoints. These services would need to communicate with a Cassandra storage cluster. We made the decision to use CQL even though it was still under active development and no Node.js driver existed for it at the time. We figured it would be easier to implement the driver than to use the existing Cassandra Thrift client. Also, we knew that we would be able to contribute the driver back to the project so that other Node.js users would benefit.</p>
<p>The main driver repository is on <a href="https://github.com/racker/node-cassandra-client">Github</a>. A mirror is also maintained at <a href="http://code.google.com/a/apache-extras.org/p/cassandra-node/">Apache Extras</a>. Currently CQL 2 is supported, but we plan to support CQL 3 in the future.</p>
<p><strong>node-cassandra-client Examples</strong></p>
<p>The rest of this post is intended as a node-cassandra-client primer of sorts. It contains examples of how to connect, update and select results from your Cassandra database in Javascript using node-cassandra-client.<strong></strong></p>
<p>First we need to create a keyspace. I’m going to use cqlsh, which ships with Cassandra, to do that. I’ve got Cassandra set up to listen to port 19170.</p>
<pre>$ cqlsh localhost 19170
cqlsh&gt;</pre>
<p>After that, you can paste the following CQL into cqlsh to set up keyspaces and column families.</p>
<pre>CREATE KEYSPACE EXAMPLE_KS WITH strategy_class = SimpleStrategy AND \
strategy_options:replication_factor=1;
USE EXAMPLE_KS;</pre>
<p>This column family is a simple column family where keys and column names are strings, but column values are expected to be integers:</p>
<pre>CREATE COLUMNFAMILY simple_cf (
    KEY ascii PRIMARY KEY
) WITH comparator=text AND default_validation=varint;</pre>
<p>Cassandra supports more complex types too. This column family has string keys, UUID column names and binary column values:</p>
<pre>CREATE COLUMNFAMILY complex_cf (
   KEY ascii PRIMARY KEY
) WITH comparator=uuid AND default_validation=blob;</pre>
<p>Of course, you are free to specify every column as well. This column family specifies string keys with three columns that are obviously typed.</p>
<pre>CREATE COLUMNFAMILY very_complex_cf (
    KEY ascii PRIMARY KEY,
    string_col text,
    uuid_col uuid,
    int_col varint
);</pre>
<p>The remaining examples all use the <code>very_complex_cf</code> column family.</p>
<p>It is easy to connect to a Cassandra cluster using node-cassandra-client. You simply create an options hash, pass it to the <code>Connection</code> constructor and call <code>connect()</code>.<strong></strong></p>
<pre><strong>var</strong> Connection <strong>=</strong> require('cassandra-client').Connection;<strong> </strong>
<strong>function</strong> doSimpleConnect(callback) {
 <em>// these are the connection parameters you need to connect to Cassandra.</em>
 <strong>var</strong> connectionOptions <strong>=</strong> {
   host<strong>:</strong> '127.0.0.1',
   port<strong>:</strong> 19170,
   keyspace<strong>:</strong> 'EXAMPLE_KS',
   use_bigints<strong>:</strong> <strong>false</strong>
 };

 <strong>var</strong> con <strong>=</strong> <strong>new</strong> Connection(connectionOptions);
 con.connect(<strong>function</strong>(err) {
   <em>// if err != null, something bad happened. </em>
   <em>// else, assume all is good.  your connection is ready to use.</em>
   <strong>if</strong> (<strong>!</strong>err) {
     <em>// close the connection and return to caller.</em>
     con.close(callback);
   } <strong>else</strong> {
     <em>// no need to close, just return to caller.</em>
     callback(err);
   }
 });
}</pre>
<p>NOTE: <code>use_bigints</code> is a flag that tells the driver to wrap numerical results in wrapper objects. This enables you to get around <a href="http://www.jwz.org/blog/2010/10/every-day-i-learn-something-new-and-stupid/">numerical limitations in Javascript</a>.</p>
<p>node-cassandra-client also supports connection pools. After establishing a connection pool, the query API is identical to regular connections, so you will not have to worry about whether you are using one or the other.  <strong></strong></p>
<pre><strong>var</strong> PooledConnection <strong>=</strong> require('cassandra-client').PooledConnection;<strong> </strong>
<strong>function</strong> doPoolConnect(callback) {
 <strong>var</strong> conOptions <strong>=</strong> { hosts<strong>:</strong> ['127.0.0.1:19170'],
                    keyspace<strong>:</strong> 'EXAMPLE_KS',
                    use_bigints<strong>:</strong> <strong>false</strong> };
 <strong>var</strong> con <strong>=</strong> <strong>new</strong> PooledConnection(conOptions);
 con.shutdown(<strong>function</strong>() {
   <em>// no error object by design.</em>
   callback();
 });
}</pre>
<p>While the query API between <code>Connection</code> and <code>PooledConnection</code> is identical, there are a few differences in construction and tear-down that should be noted:</p>
<p style="padding-left: 30px;">1) The constructor hash for <code>Connection</code> accepts a single string for <code>host</code>, while in <code>PooledConnection</code> it expects a list of <code>host:port</code> strings.<br />
2) Terminating a <code>Connection</code> is done via <code>Connection.close()</code>, while terminating a <code>PooledConnection</code> is done via <code>PooledConnection.shutdown()</code>. Each method accepts a callback.<br />
3) <code>PooledConnections</code> have no <code>connect()</code> method. You are free to start executing queries as soon as it is constructed.</p>
<p>Everything else is done using the <code>execute()</code> method of either a <code>Connection</code> or a <code>PooledConnection</code> instance. It takes three parameters:</p>
<p style="padding-left: 30px;">1) a parameterized CQL statement,<br />
2) an array of the parameters that are appropriately typed,<br />
3) a callback accepting <code>(err)</code> for UPDATEs, or <code>(err, rows)</code> for SELECTs.</p>
<p>Let&#8217;s insert some data into <code>very_complex_cf</code>. Some of these examples use the <a href="https://github.com/caolan/async">node-async</a> library to avoide deeply nested callbacks.</p>
<pre><strong>function</strong> doComplexInsert(callback) {
 <strong>var</strong> conOptions <strong>=</strong> { hosts<strong>:</strong> ['127.0.0.1:19170'],
                    keyspace<strong>:</strong> 'EXAMPLE_KS',
                    use_bigints<strong>:</strong> <strong>false</strong> };
 <strong>var</strong> con <strong>=</strong> <strong>new</strong> PooledConnection(conOptions);
 <strong>var</strong> cql <strong>=</strong> 'UPDATE very_complex_cf SET ?=?, ?=?, ?=? where KEY=?';
 <strong>var</strong> params <strong>=</strong> ['string_col', 'string_value',
               'uuid_col', '6f8483b0-65e0-11e0-0000-fe8ebeead9fe',
               'int_col', 42,
               'complex_insert_row'];
 con.execute(cql, params, <strong>function</strong>(err) {
   <em>// demonstrates use of a callback.  A simplification would have been:</em>
   <em>// con.execute(cql, params, callback);</em>
   <strong>if</strong> (err) {
     console.log(err);
   }
   con.shutdown(callback);
 });
}</pre>
<p>You can even batch multiple updates in a single statement:<strong></strong></p>
<pre><strong>function</strong> doComplexBatchInsert(callback) {<strong> </strong>

<strong> var</strong> conOptions <strong>=</strong> { hosts<strong>:</strong> ['127.0.0.1:19170'],
                    keyspace<strong>:</strong> 'EXAMPLE_KS',
                    use_bigints<strong>:</strong> <strong>false</strong> };<strong> </strong>
<strong> var</strong> con <strong>=</strong> <strong>new</strong> PooledConnection(conOptions);
 con.execute('BEGIN BATCH USING CONSISTENCY ONE \
              UPDATE very_complex_cf SET ?=?, ?=?, ?=? where KEY=?; \
              UPDATE very_complex_cf SET ?=?, ?=?, ?=? where KEY=?; \
              UPDATE very_complex_cf SET ?=?, ?=?, ?=? where KEY=?; \
              APPLY BATCH;',
              [<em> // first row</em>
                'string_col', 'value for string col in row_1',
                'uuid_col', '6f8483b0-65e0-11e0-0000-fe8ebeead9ff',
                'int_col', 25,
                'complex_batch_row_1',<em>      </em>
                <em> // second row</em>
                'string_col', 'value for string col in row_1',
                'uuid_col', '6f8483b0-65e0-11e0-0000-fe8ebeeada00',
                'int_col', 26,
                'complex_batch_row_4',

                <em>// third row</em>
                'string_col', 'value for string col in row_1',
                'uuid_col', '6f8483b0-65e0-11e0-0000-fe8ebeeada02',
                'int_col', 27,
                'complex_batch_row_3'
              ],
              <strong>function</strong>(err) {
                <strong>if</strong> (err) {
                  console.log(err);
                }
                con.shutdown(callback);
             }
  );
}</pre>
<p>A simple SELECT statement works like this:<strong></strong></p>
<pre><strong>function</strong> doSelectAll(callback) {
 <strong>var</strong> conOptions <strong>=</strong> { hosts<strong>:</strong> ['127.0.0.1:19170'],
                    keyspace<strong>:</strong> 'EXAMPLE_KS',
                    use_bigints<strong>:</strong> <strong>false</strong> };
 <strong>var</strong> con <strong>=</strong> <strong>new</strong> PooledConnection(conOptions);
 con.execute('SELECT * from very_complex_cf', [], <strong>function</strong>(err, rows) {
   <strong>if</strong> (<strong>!</strong>err) {
     console.log(rows.length); <em>// should be 4 at this point.</em>
     rows.forEach(<strong>function</strong>(row) {
       console.log(row.key);

       <em>// access column names and values by index.</em>
       <strong>for</strong> (<strong>var</strong> i <strong>=</strong> 0; i <strong>&lt;</strong> row.colCount(); i<strong>++</strong>) {
         console.log(row.cols[i].name);
         console.log(row.cols[i].value);
       }

       <em>// access column values by hash.</em>
       console.log(row.colHash['string_col']); <em>// it's a string</em><em>        </em>
       <em>// an instance of require('cassandra-client').UUID</em>
       console.log(row.colHash['uuid_col']);
       console.log(row.colHash['int_col']); <em>// it's a number.</em>
     });
   }
   con.shutdown(callback);
 });
}</pre>
<p>The CQL could have been altered to return a single row or individual columns:<strong></strong></p>
<pre><strong>function</strong> doSelectiveSelect(callback) {
 <strong>var</strong> conOptions <strong>=</strong> { hosts<strong>:</strong> ['127.0.0.1:19170'],
                    keyspace<strong>:</strong> 'EXAMPLE_KS',
                    use_bigints<strong>:</strong> <strong>false</strong> };
 <strong>var</strong> con <strong>=</strong> <strong>new</strong> PooledConnection(conOptions);
 con.execute(
   'SELECT uuid_col FROM very_complex_cf WHERE KEY=?',
   ['complex_batch_row_1'],
   <strong>function</strong>(err, rows) {
     <strong>if</strong> (<strong>!</strong>err) {
       <em>// rows.length should == 1.</em>
       <strong>var</strong> row <strong>=</strong> rows[0];
       console.log(row.key);
       console.log(row.colCount()); <em>// should be 1 also.</em>
       <em>// getting the values out is an exercise for the reader.</em>
     }
     con.shutdown(callback);
 });
}</pre>
<p>node-cassandra-client also has support for UUID and binary column types. Using the <code>complex_cf</code> columnfamily:<strong></strong></p>
<pre><strong>function</strong> doComplexColumnNames(callback) {
 <strong>var</strong> conOptions <strong>=</strong> { hosts<strong>:</strong> ['127.0.0.1:19170'],
                          keyspace<strong>:</strong> 'EXAMPLE_KS',
                          use_bigints<strong>:</strong> <strong>false</strong> };
 <strong>var</strong> con <strong>=</strong> <strong>new</strong> PooledConnection(conOptions);
 <strong>var</strong> updateArgs <strong>=</strong> ['6f8483b0-65e0-11e0-0000-fe8ebeead9ff',
<strong> new</strong> Buffer([1,2,3,4,5]),
                   'uuid_row_1' ];
 async.series([
   <strong>function</strong> insert(callback) {
     con.execute('UPDATE complex_cf set ?=? where KEY=?', updateArgs, callback);
   },
   <strong>function</strong> select(callback) {
     con.execute('SELECT * from complex_cf WHERE KEY=?', ['uuid_row_1'], 
     <strong>function</strong>(err, rows) {
       <strong>if</strong> (<strong>!</strong>err) {
         <em>// rows.length should == 1.</em>

         <em>// first access the col by index (when you know it).</em>
         <em>// col name should be an instance of UUID.</em>
         console.log(rows[0].cols[0].name);
         <em>// col value should be &lt;Buffer 01 02 03 04 05&gt;</em>
         console.log(rows[0].cols[0].value);

         <em>// if you don't know the col index, you need to use the col hash.</em>
         <em>// of course, this assumes you know the column name.</em>
         <em>// in this case, it should point to the same buffer already referenced.</em>
         console.log(rows[0].colHash['6f8483b0-65e0-11e0-0000-fe8ebeead9ff']);
       }
       callback(err);
     });
   }
 ],
<strong> function</strong>(err) {
   <strong>if</strong> (err) {
     console.log(err);
   }
   con.shutdown(callback);
 });
}</pre>
<p>As demonstrated, when working with results from a SELECT query, you can access columns by index or by column name. If you access columns by name, you need to use the string version of the column name.</p>
<p>NOTE: All the code used in these examples can be found in <a href="https://gist.github.com/2369391">this gist</a>.</p>
<p><strong>Conclusion</strong></p>
<p>Rackspace understands open-source development. Development on node-cassandra-client is ongoing and patches are always welcome. In fact, we regularly push new releases to the <a href="http://search.npmjs.org/#/cassandra-client">npm registry</a>.</p>
<p>If you think this kind of work would be challenging and fun, and enjoy contributing to open-source projects, we are always looking for <a href="http://jobs.rackspace.com/search?q=developer">talented engineers</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/rackspace-contributes-cassandra-cql-driver-for-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Features in Cassandra 0.7</title>
		<link>http://www.rackspace.com/blog/new-features-in-cassandra-0-7/</link>
		<comments>http://www.rackspace.com/blog/new-features-in-cassandra-0-7/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 17:04:41 +0000</pubDate>
		<dc:creator>Gary Dusbabek</dc:creator>
				<category><![CDATA[Open Source Technologies]]></category>
		<category><![CDATA[Tips for Devs and Sys Admins]]></category>

		<guid isPermaLink="false">http://www.rackspacecloud.com/blog/?p=6731</guid>
		<description><![CDATA[Rackspace continues to be dedicated to open source software, including contributing resources to the Apache Cassandra project and founding OpenStack, the open-source cloud platform. The Apache Cassandra team is in the process of rolling up a release candidate for Cassandra 0.7.  That makes this a good time to highlight some of the new features and [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://cassandra.apache.org/" target="_blank"><img class="alignnone" title="cassandra" src="http://c0179631.cdn.cloudfiles.rackspacecloud.com/cassandra.png" alt="" width="240" height="55" /></a>Rackspace continues to be dedicated to open source software, including contributing resources to the <a href="http://www.rackspacecloud.com/blog/2009/09/23/the-cassandra-project/" target="_blank">Apache Cassandra project</a> and founding <a href="http://www.rackspacecloud.com/blog/2010/07/19/open-stack/" target="_blank">OpenStack</a>, the open-source cloud platform.</p>
<p>The Apache Cassandra team is in the process of rolling up a release candidate for Cassandra 0.7.  That makes this a good time to highlight some of the new features and changes that will be in this version.<strong> </strong></p>
<h3><span style="color: #000080;"><strong>Big Changes</strong></span></h3>
<p><strong>Memory Efficient Compactions (CASSANDRA-16)</strong></p>
<p><a href="http://wiki.apache.org/cassandra/MemtableSSTable#Compaction" target="_blank">Compaction</a> is the process by which Cassandra iterates over its data, removing deleted data forever and combining multiple data files into a single data file.  This results in faster read operations.  One limitation of the implementation was that if a row of data couldn’t fit in memory, then the data file it belonged to could never be compacted.</p>
<p>Since one of the main features of Cassandra is its use of sparse columns, users expect to be able to add columns without penalty until disk runs out.  Cassandra 0.7 solves this by making compactions happen incrementally.<strong> </strong></p>
<p><strong>Online Schema Changes (CASSANDRA-44)</strong></p>
<p>Prior to Cassandra 0.7 adding and removing column families and keyspaces required you to first distribute an updated configuration file to each of your nodes and then execute a rolling restart of your cluster.  That was not too bad, but it was manual and required human intervention, so it was possible to make mistakes.</p>
<p>Cassandra 0.7 solves this problem by exposing the ability to create and drop column families and keyspaces from its client API.  Using the same methods there is limited support for updating existing column families and keyspaces (e.g., increasing the replication factor for a particular keyspace).</p>
<p>Additionally, we’ve made it easy to migrate your keyspace definitions from your 0.6 storage-conf.xml configuration file using bin/<a href="http://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7/bin/schematool" target="_blank">schematool</a>.  In the future we plan to add the ability to rename column families and keyspaces.  A <a href="http://wiki.apache.org/cassandra/LiveSchemaUpdates" target="_blank">wiki article</a> contains more detailed information.<strong> </strong></p>
<p><strong>Secondary Indexes (CASSANDRA-749)</strong></p>
<p>Cassandra has always been an excellent platform for storing data.  However, it has lacked an expressive, efficient way to query data by any property other than the primary key (you need the answer to “what keys match these particular columns and values?”).  To cope with this, many application developers ended up creating their own secondary indexes that were basically <a href="http://en.wikipedia.org/wiki/Inverted_index" target="_blank">inverted indexes </a>of already existing column families.  This solution worked well, but was tedious to maintain and involved a lot of duplicated effort.</p>
<p>The need for this feature has weighed heavily on our minds for a while.  Work even began on it prior to the release of Cassandra 0.6.  One design decision that required some wrangling over was whether secondary indexes should use node-local or distributed storage.  Each approach had distinct advantages and disadvantages and served different use-cases.  We ended up using node-local storage (the secondary indexes are wholly contained on the same node whose key they index). Distributed secondary indexes may eventually make their way into Cassandra, but not in 0.7.</p>
<p>Using the API for online schema changes, secondary indexes can be added to existing or brand new column families.  An index can be queried on the client side using the <code>get_indexed_slices()</code> API method.<br />
<strong> </strong></p>
<h3><span style="color: #000080;"><strong>Time to Upgrade?</strong></span></h3>
<p>For these reasons, Cassandra 0.7 is a compelling upgrade from earlier versions.  But wait!  The Cassandra team has been busy fixing bugs and adding more features.  You can get the full details from the <a href="http://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7/CHANGES.txt" target="_blank">changelog</a>, but I’ll highlight a few of them here.<strong> </strong></p>
<p><strong>Streaming fixes</strong></p>
<p>The streaming code has been simplified to offer better tracking when files get streamed.  Additionally, the requirement for anti-compaction, the time-consuming process of splitting a data file into multiple parts, has been removed.   Streaming is faster and more predictable now.<strong> </strong></p>
<p><strong>Read Performance</strong></p>
<p>Several things have happened to make reads faster overall.  First, the read path has been optimized to take further advantage of the row cache introduced in 0.6 (CASSANDRA-1267 and 1302).  Second, row keys have been switched from strings to byte arrays, picking up some speed by eliminating the overhead required for java string construction.   Third, usage of <code>byte[]</code> has been replaced with <a href="http://download.oracle.com/javase/6/docs/api/java/nio/ByteBuffer.html" target="_blank"><code>java.nio.ByteBuffer</code>.</a> This allowed us to reduce the amount of byte array copying on the read path and eliminated a significant amount of garbage generation (bonus!), easing the pain still felt by stop-the-world garbage collection.<strong> </strong></p>
<p><strong>Thrift</strong></p>
<p>We’ve upgraded our <a href="http://incubator.apache.org/thrift/" target="_blank">Thrift</a> version from 0.2 to 0.5.  This comes with significant performance improvements.  Thrift framed transport is now the default, in contrast to non-framed which was default in 0.6 and earlier.<strong> </strong></p>
<p><strong>API</strong></p>
<p>As with every release of Cassandra so far, our client API has fluctuated quite a bit—something we are not necessarily proud of.  A mind-shift is occurring though.  Most Cassandra experts, including myself, have begun recommending that users access Cassandra through one of the available third party libraries (e.g.: <a href="http://github.com/rantav/hector" target="_blank">Hector</a>, <a href="http://github.com/s7/scale7-pelops" target="_blank">Pelops</a>, <a href="http://github.com/pycassa/pycassa" target="_blank">Pycassa</a>) instead of directly via Thrift.  The main benefit of this approach is that users will be immune from the sort of API changes that happen from version to version so long as client developers keep up.</p>
<p>There are several things worth noting about the updated API.</p>
<ol>
<li> The keyspace argument has been dropped from nearly every method and has been replaced by a <code>set_keyspace()</code> method that sets the keyspace for the current connection session.</li>
<li> Expiring (TTL) columns have been introduced.  This gives you the ability to set the time-to-live for columns so that they will automatically be removed by compaction without any intervention on your behalf.</li>
<li> <code>ConsistencyLevel.ZERO</code> is removed.</li>
</ol>
<p><strong>Configuration</strong><br />
<code>storage-conf.xml </code>has been replaced with <code>cassandra.yaml</code>. The intent is to provide a format that is more human-readable.  We have provided a converter that will allow you to convert your XML configuration into YAML prior to upgrading.  Also, more settings are configurable than ever before.</p>
<p><strong>Other Changes</strong></p>
<ol>
<li>We have continued the trend of exposing more operations and metrics via JMX, including compactions, sstable accesses, endpoint states (gossiper) and TCP messages.</li>
<li>The authentication framework and built-in Hadoop support have both received a lot of attention.</li>
<li>Introduction of native code (<span class="removed_link" title="https://jna.dev.java.net/">JNA</span>) for snapshots and help with memory swapping.</li>
<li>Enhanced CLI experience</li>
</ol>
<h3><span style="color: #000080;"><strong>Conclusion</strong></span></h3>
<p>Cassandra 0.7 offers significant advantages in terms of features and speed than in earlier releases.  We’ve done our best to make the upgrade process simple: old data files are still compatible, but your cluster must be brought down entirely.</p>
<p>As always, if you would like to learn more about Cassandra, good places to start are the <a href="http://cassandra.apache.org/" target="_blank">website</a>, <a href="http://wiki.apache.org/cassandra/" target="_blank">wiki</a> and #cassandra on IRC (freenode).  Apache also hosts several <a href="http://www.mail-archive.com/user@cassandra.apache.org/" target="_blank">mailing lists</a> that are excellent resources.  Additionally, <a href="http://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7/NEWS.txt" target="_blank">NEWS.txt</a> is a good place to go to find out more about some of the high-level changes in Cassandra.</p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/new-features-in-cassandra-0-7/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Content Delivery Network via Rackspace Cloud Files: c3414940.r40.cf0.rackcdn.com

 Served from: www.rackspace.com @ 2013-05-24 19:16:32 by W3 Total Cache -->