<?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>bluefeet &#187; databases</title>
	<atom:link href="http://blog.bluefeet.net/tag/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bluefeet.net</link>
	<description>Yet another Perl Hacker weblog</description>
	<lastBuildDate>Thu, 10 Jun 2010 15:22:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cassandra Presentation</title>
		<link>http://blog.bluefeet.net/2010/04/cassandra-presentation/</link>
		<comments>http://blog.bluefeet.net/2010/04/cassandra-presentation/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 02:06:19 +0000</pubDate>
		<dc:creator>bluefeet</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[Thrift]]></category>

		<guid isPermaLink="false">http://blog.bluefeet.net/?p=232</guid>
		<description><![CDATA[I wrote this for the TO.pm meeting on April 14th, 2010:
Introduction to Apache Cassandra
View more presentations from bluefeet.

]]></description>
			<content:encoded><![CDATA[<p>I wrote this for the <a href="http://thousand-oaks-perl.org">TO.pm</a> meeting on April 14th, 2010:</p>
<div style="width:425px" id="__ss_3739718"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/bluefeet/introduction-to-apache-cassandra" title="Introduction to Apache Cassandra">Introduction to Apache Cassandra</a></strong><object width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cassandra-100415164815-phpapp02&#038;stripped_title=introduction-to-apache-cassandra" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cassandra-100415164815-phpapp02&#038;stripped_title=introduction-to-apache-cassandra" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/bluefeet">bluefeet</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bluefeet.net/2010/04/cassandra-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Cassandra and the Thrift API on CPAN</title>
		<link>http://blog.bluefeet.net/2010/04/apache-cassandra-and-the-thrift-api-on-cpan/</link>
		<comments>http://blog.bluefeet.net/2010/04/apache-cassandra-and-the-thrift-api-on-cpan/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 00:25:13 +0000</pubDate>
		<dc:creator>bluefeet</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[CPAN]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Perl 5]]></category>
		<category><![CDATA[Thrift]]></category>

		<guid isPermaLink="false">http://blog.bluefeet.net/?p=224</guid>
		<description><![CDATA[I&#8217;m currently playing around with a project that uses Apache Cassandra.  The Cassandra website states:
&#8220;The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together  Dynamo&#8217;s fully distributed design and Bigtable&#8217;s ColumnFamily-based data model.&#8221;
So, from what I&#8217;ve experienced so far this is either a distributed Berkely DB, or a persistent Memcached, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently playing around with a project that uses <a href="http://cassandra.apache.org/">Apache Cassandra</a>.  The Cassandra website states:</p>
<p><em>&#8220;The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together  Dynamo&#8217;s fully distributed design and Bigtable&#8217;s ColumnFamily-based data model.&#8221;</em></p>
<p>So, from what I&#8217;ve experienced so far this is either a distributed Berkely DB, or a persistent Memcached, depending on which concept you are more familiar with (I know, that&#8217;s incredibly over simplified).</p>
<p>Cassandra was developed by Facebook and was made open source several years ago.  It uses the <a href="http://incubator.apache.org/thrift/">Thrift API</a> to communicate, which was also developed by Facebook.  Supposedly there are some steps being taken to move Cassandra on to a different API, but Thrift is the defacto for now.</p>
<p>There are two modules on CPAN that deal with Cassandra.  <a href="http://search.cpan.org/perldoc?Net::Cassandra">Net::Cassandra</a> is the original, and in my opinion, the superior/simpler/easier module.  <a href="http://search.cpan.org/perldoc?Net::Cassandra::Easy">Net::Cassandra::Easy</a> is a later implementation that really isn&#8217;t any simpler from what I can tell and neither seems any more or less tied to the intricacies of the Thrift API despite Net::Cassandra::Easy&#8217;s accusations of Net::Cassandra.  Both implement the Thrift API under the scenes in their own way, and both are lacking in features.</p>
<p>Now, the Thrift API itself is distributed with a perl library called simply &#8220;Thrift&#8221;.  This library is very new and it shows.  It needs a lot of work, a lot of automated tests, and IMO should be on CPAN.  I consider it a fail when a project decides to distribute Perl libraries independently from CPAN.  This leads to very little exposure &#8211; I was lucky I found the perl library in the Thrift tarball, I doubt others have been as lucky.</p>
<p>So, I&#8217;d like to make a Thrift driver library and put it on CPAN.  Then, a truly Thrift independent Cassandra client library can be written that uses the Thrift library behind the scenes, but is not directly tied in with it.  Later, when Cassandra decides to change their API library, the Cassandra library can be changed to use a new driver.</p>
<p>An additional benefit to this is if any Cassandra features are not yet available via the Cassandra module, then the perl developer can easily drop down to the Thrift driver and directly write Thrift queries.</p>
<p>Has anyone thought of this, or perhaps begun working on something like this?  If not, I&#8217;d like to do it and I&#8217;d love to hear any suggestions and thoughts people have.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bluefeet.net/2010/04/apache-cassandra-and-the-thrift-api-on-cpan/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Robust DBI Transaction and Connection Handling</title>
		<link>http://blog.bluefeet.net/2010/01/robust-dbi-transaction-and-connection-handling/</link>
		<comments>http://blog.bluefeet.net/2010/01/robust-dbi-transaction-and-connection-handling/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 05:27:25 +0000</pubDate>
		<dc:creator>bluefeet</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[DBIC]]></category>
		<category><![CDATA[dbix-class]]></category>
		<category><![CDATA[DBIx::Class]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Perl 5]]></category>

		<guid isPermaLink="false">http://blog.bluefeet.net/?p=210</guid>
		<description><![CDATA[Edit: It turns out there is already a module on CPAN that does exactly what I talked about here.  Its called DBIx::Connector.  I haven&#8217;t tried it yet, but it looks like the guy that wrote it designed it with input from the DBIC guys.
I&#8217;m a big fan of DBIx::Class.  Among DBIC&#8217;s many [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><b>Edit:</b> It turns out there is already a module on CPAN that does exactly what I talked about here.  Its called <a href="http://search.cpan.org/perldoc?DBIx::Connector">DBIx::Connector</a>.  I haven&#8217;t tried it yet, but it looks like the guy that wrote it designed it with input from the DBIC guys.</p></blockquote>
<p>I&#8217;m a big fan of <a href="http://search.cpan.org/perldoc?DBIx::Class">DBIx::Class</a>.  Among DBIC&#8217;s many great features is its superb transaction and connection handling via <a href="http://search.cpan.org/perldoc?DBIx::Class::Storage::DBI">DBIx::Class::Storage::DBI</a>.  When I&#8217;m using raw DBI I feel like I&#8217;m missing these core components.  I should always be able to expect robust transaction and connection handling.</p>
<p>I started playing around with creating a new CPAN module (something like DBIx::Robust, DBIx::Transaction, etc&#8230;) but each time I dove in to it I kept coming to the conclusion that DBIC&#8217;s DBI storage drivers provide everything I need and I would just be shooting myself in the foot by either porting DBIx::Class::Storage::DBI to a DBIC independent API or by writing it from scratch.</p>
<p>Before I go any further, let me show you how attractive and awesome DBIC&#8217;s storage layer is:</p>
<ul>
<li>Transactions may be nested, even without savepoints.</li>
<li>Transaction savepoints can automatically be tracked allowing for reliable and incremental rollbacks.</li>
<li>The appropriate DateTime::Format class is automatically determined based on the type of database.</li>
<li>All database calls efficiently pass through a layer that detects stale connections that will attempt to re-connect to a database.</li>
</ul>
<p><a href="http://images.google.com/images?gbv=2&#038;q=kung+fu+panda+opening&#038;btnG=Search&#038;start=0"><i>&#8220;There is no charge for awesomeness, or attractiveness.&#8221;</i></a></p>
<p>The DBIx::Class::Storage::DBI pod illustrates all this in a round-about way: <i>&#8220;If you set AutoCommit => 0 in your connect info, then you are always in an assumed transaction between commits, and you&#8217;re telling us you&#8217;d like to manage that manually. A lot of the magic protections offered by this module will go away. We can&#8217;t protect you from exceptions due to database disconnects because we don&#8217;t know anything about how to restart your transactions. You&#8217;re on your own for handling all sorts of exceptional cases if you choose the AutoCommit => 0 path, just as you would be with raw DBI.&#8221;</i></p>
<p>This stuff is really powerful, and we should never have to work with databases in Perl without it.  But, currently, it is only meant to work under DBIC, which is a shame.  I&#8217;m betting that DBIx::Class::Storage::DBI could be used directly, bypassing DBIC completely.  There is some DBIC stuff layered in there, but that should be ignorable.</p>
<p>What do the rest of you think?  Has anyone considered moving this logic out in to a generic distribution that isn&#8217;t DBIC specific?  Is there merit in what I&#8217;m talking about?  Does anyone use DBIx::Class::Storage::DBI directly, bypassing DBIC?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bluefeet.net/2010/01/robust-dbi-transaction-and-connection-handling/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
