...

/

Decorating a LevelUP database

Decorating a LevelUP database

Get familiar with the basics of LevelUp and LevelDB and learn how to implement a LevelUP plugin.

Before we start coding the next example, let’s say a few words about LevelUP, the module that we’re now going to work with.

Introducing LevelUP and LevelDB

LevelUP is a Node.js wrapper around Google’s LevelDB, a key-value store originally built to implement IndexedDB in the Chrome browser, but it’s much more than that. LevelDB has been defined as the “Node.js of databases” because of its minimalism and extensibility. Like Node.js, LevelDB provides blazingly fast performance and only the most basic set of features, allowing developers to build any kind of database on top of it.

The Node.js community, and in this case Rod Vagg, didn’t miss the chance to bring the power of this database into the Node.js world by creating LevelUP. Born as a wrapper for LevelDB, it then evolved to support several kinds of backends, from in-memory stores to other NoSQL databases such as Riak and Redis, to web storage engines such as IndexedDB and localStorage, ...