LevelDB

LevelDB
Developer(s) Jeffrey Dean, Sanjay Ghemawat
Written in C++
Size 350 kB (binary size)
Type Database library
License New BSD License
Website github.com/google/leveldb

LevelDB is an open source on-disk key-value store written by Google fellows Jeffrey Dean and Sanjay Ghemawat.[1][2] Inspired by Bigtable,[3] LevelDB is hosted on GitHub under the New BSD License and has been ported to a variety of Unix-based systems, Mac OS X, Windows, and Android.[4]

Features

LevelDB stores keys and values in arbitrary byte arrays, and data is sorted by key. It supports batching writes, forward and backward iteration, and compression of the data via Google's Snappy compression library.

LevelDB is not a SQL database. Like other NoSQL and Dbm stores, it does not have a relational data model and it does not support SQL queries. Also, it has no support for indexes. Applications use LevelDB as a library, as it does not provide a server or command-line interface.

MariaDB 10.0 will come with a Storage Engine which will allow users to query LevelDB tables from MariaDB.[5]

History

LevelDB is based on concepts from Google's BigTable database system. The table implementation for the BigTable system was developed starting in about 2004, and is based on a different Google internal code base than the LevelDB code. That code base relies on a number of Google code libraries that are not themselves open sourced, so directly open sourcing that code would have been difficult. Jeff Dean and Sanjay Ghemawat wanted to create a system resembling the BigTable tablet stack that had minimal dependencies and would be suitable for open sourcing, and also would be suitable for use in Chrome for the IndexedDB implementation. They wrote LevelDB starting in early 2011, with the same general design as the BigTable tablet stack, but not sharing any of the code.[6]

Usage

LevelDB is used as the backend database for Google Chrome's IndexedDB and is one of the supported backends for Riak.[7] Additionally, Bitcoin Core stores the blockchain metadata using a LevelDB database.[8] Minecraft: Pocket Edition uses a modified version for chunk and entity data storage.[9] Autodesk AutoCAD 2016 also uses LevelDB.

Performance

Google has provided benchmarks comparing LevelDB's performance to SQLite and Kyoto Cabinet in different scenarios.[10] LevelDB outperforms both SQLite and Kyoto Cabinet in write operations and sequential-order read operations. LevelDB also excels at batch writes, but is slower than SQLite when dealing with large values. The currently published benchmarks were updated after SQLite configuration mistakes were noted in an earlier version of the results.[11] Updated benchmarks[12][13] show that LevelDB also outperforms Berkeley DB, but these tests also show that OpenLDAP LightningDB is much faster (~10 times in some scenarios) in read operations and some write types (e.g. batch and synchronous writes, see the link above), and is almost equal in the rest of the test.

Bugs and Reliability

LevelDB is widely noted for being unreliable and databases it manages are prone to corruption.[14][15][16] Detailed analyses of vulnerabilities in LevelDB's design have been performed by researchers from University of Wisconsin[17][18] confirming multiple causes for LevelDB's poor reliability. The analysis shows that LevelDB consistency depends on filesystem operations being atomic and order-preserving, but real-world filesystems do not provide guarantees for either of these.

References

External links

This article is issued from Wikipedia - version of the Wednesday, April 06, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.