Monday, August 08, 2011

New fast key-value storage library

leveldb.png

A fast and lightweight key/value database library that supports ordered data has been released by Google. LevelDB is being made available as open source under a BSD-style license.

According to a blog post from Google’s open source blogspot, LevelDB is a C++ library that is suitable for use in contexts such as by a web browser to store a cache of recently accessed web pages, or by an operating system to store the list of installed packages and package dependencies, or by an application to store user preference settings. LevelDB is also being used in forthcoming versions of the Chrome browser, which includes an implementation of the IndexedDB HTML5 API that is built on top of LevelDB. LevelDB has already been ported to a variety of Unix based systems, Mac OS X, Windows, and Android.

The Google team says that LevelDB differs from similar systems like SQLite and Kyoto Cabinet by being optimized for batch updates that modify many keys scattered across a large key space and point out that this is an important requirement for efficiently updating an inverted index that does not fit in memory.

The keys and values in LevelDB are arbitrary byte arrays, and data values are stored by key. The basic operations you can make use of are Put(key,value), Get(key), and Delete(key). You can make multiple changes in one atomic batch, and create a transient snapshot to get a consistent view of data. Forward and backward iteration is supported over the data, and data is automatically compressed using the Snappy compression library.

Read more: I Programmer
QR: 2837-leveldb.html

Posted via email from Jasper-Net