Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 3.42 KB

leveldb.md

File metadata and controls

56 lines (38 loc) · 3.42 KB

LevelDB

LevelDB is a key-value store, written by Jeff Dean and Sanjay Ghemawat at Google. What makes it interesting to Node developers is the LevelUp npm pacakage, which allows LevelDB to be included within a Node application.

A number of contributors have created npm modules that allow LevelDB to be used as the basis for a graph, a relational or a document database. In addition, LevelUp can be used not just with LevelDB, but with other databases, such as RocksDB.

This approach allows us to create a database for an application that meets our needs, while not forcing us to re-write all the database abstraction layer that an external database usually gives us. It means that we can use a single and very fast data store for a number of different use cases. It also allows us to swap out the data store, if we need to.

From a learning perspective, we can concentrate on thinking about (and implementing) different data abstractions, rather than spending time on understanding and installing a specific database, such as MongoDB or PostgreSQL. By making the database less of a black box, we are likely to get a better understanding of what we want a database to do for us and how.

One key feature that is hard to implement in LevelDB, but is available in forks such as HyperLevelDB and RocksDB, is live backup. Both HyperLevelDB and RocksDB are available as npm modules.

Tutorial

References

Also:

Rocks (Facebook)

Riak

HyperLevelDB

SSDB

  • SSDB ("an alternative to Redis")

On backing up: