Computerworld

Open source and SaaS offerings rethink the DB

Key-value repositories and other alternatives take aim at simplicity, scalability, and cloud services.

The world of low-rent key-value storage silos is exploding. Here's a list of some of the more prominent new projects:

Thrift, a tool that Facebook.com built and donated to the Apache software project, isn't really a database. In fact, it's more of a pre-compiler that converts a file describing the data structures into a pile of code in your choice of languages. This code may need some extra libraries (Java comes with some methods that serialize the data to an output stream), but it's ready to include with your own code. The project includes formatters for many of the major languages (including C, Perl, Java, PHP, and Python), and it aims to honor the various idioms used by the programmers familiar with a language. You give it the schema and it does the rest.

[ In this brave, new world of databases, find out whether Amazon SimpleDB, Apache CouchDB, Google App Engine, or Persevere come out on top in InfoWorld Test Center's review. ]

ThruDB is a layer of glue that joins together the Lucene text indexing library with Thrift and a good set of tools for storing the data in the cloud. One of the more sophisticated options will store the data locally on a disk for fast storage while sending out a duplicate set of transactions to Amazon S3 (Simple Storage Service). There's no official release yet, so you'll need to grab the code from the Subversion repository.

MongoDB accepts JSON (JavaScript Object Notation) pairs of keys and values for storage across several nodes and then builds a full text index of the values, making it possible to search deep inside of data structures. 10gen, the company that launched the MongoDB open source project, is also spinning off an app server, Babble, that sits on top of it. Auto-sharding -- that is, shared nothing partitioning across many distributed servers -- is said to be arriving in the second quarter of 2009.

There are some tools designed to add horizontal partitioning to traditional databases. Hibernate Shards and HiveDB can work together to direct queries to the right server in a cluster of databases. They work with any database with a Hibernate interface.

Page Break

Harry Potter readers may hate the name, but Project Voldemort is a "big, distributed, persistent, fault-tolerant hash table." You put in key-value pairs and they get serialized to disk somewhere in a cloud. There are no queries. You can't ask for fields within a certain range. You just ask for a key and get the result. When data is stored to two different nodes at once, as might happen in an ACID-free environment like this, Voldemort uses a vector clock to choose a winner. It's very, very lightweight. You might even try to make a joke about the real Voldemort's shadow-like presence.

HBase and Hypertable are two projects that aim to imitate Google's BigTable. HBase was built in Java on top of Hadoop and sports a C++ API. Hypertable is written in C++ and uses a C++ API.

A number of online services wrap a nice Web-based interface around a database. Some call themselves "shared spreadsheets," but they are just databases at their core. These SaaS offerings, including Caspio Bridge ( see my review), DabbleDB.com, and Zoho (Zoho Sheet and Zoho Creator), are mainly targeted at businesspeople, not programmers, but they can be useful.

And if you don't want to leave relational databases behind forever, there's always Drizzle, a fork built by some of the MySQL team. The new version built under the GNU Public License tosses out many of the fancy features that MySQL tried so hard to incorporate. "Stored Procedures, Views, Triggers, Query Cache, and Prepared Statements are gone for now," wrote Brian Aker last year. Now, there are dozens of branches in the MySQL tree. Oh well. Once it was trendy to have too many features. Now it's not.