• Stars
    star
    229
  • Rank 174,666 (Top 4 %)
  • Language
    C++
  • License
    MIT License
  • Created over 7 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pure C++ Node.js RocksDB binding. An abstract-leveldown compliant store.

rocksdb

A low-level Node.js RocksDB binding. An abstract-leveldown compliant store.

level badge npm Node version Test Coverage Standard Common Changelog Donate

Table of Contents

Click to expand

Introduction

This module closely follows leveldown and implements the same API. The difference is that leveldown is a binding for LevelDB while rocksdb is a binding for RocksDB, Facebook's fork of LevelDB.

It is strongly recommended that you use levelup in preference to rocksdb unless you have measurable performance reasons to do so. levelup is optimized for usability and safety. Although we are working to improve the safety of the rocksdb interface it is still easy to crash your Node process if you don't do things in just the right way.

If you are upgrading: please see UPGRADING.md.

Supported Platforms

We aim to support at least Active LTS and Current Node.js releases, Electron 5.0.0, as well as any future Node.js and Electron releases thanks to N-API. The minimum node version for rocksdb is 10.12.0.

The rocksdb npm package ships with prebuilt binaries for popular 64-bit platforms and is known to work on:

  • Linux (including ARM platforms such as Raspberry Pi and Kindle)
  • Mac OS
  • Solaris (SmartOS & Nodejitsu)
  • FreeBSD
  • Windows

When installing rocksdb, node-gyp-build will check if a compatible binary exists and fallback to a compile step if it doesn't. In that case you'll need a valid node-gyp installation.

If you don't want to use the prebuilt binary for the platform you are installing on, specify the --build-from-source flag when you install. If you are working on rocksdb itself and want to re-compile the C++ code it's enough to do npm install.

API

Please refer to leveldown for API documentation. The db.open(options, callback) method of rocksdb has a few additional options:

  • readOnly (boolean, default false): open database in read-only mode.
  • infoLogLevel (string, default null): verbosity of info log. One of 'debug', 'info', 'warn', 'error', 'fatal', 'header' or null (disable).

Contributing

Level/rocksdb is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the Contribution Guide for more details.

Git Submodules

This project uses Git Submodules. This means that you should clone it recursively if you're planning on working on it:

$ git clone --recurse-submodules https://github.com/Level/rocksdb.git

Alternatively, you can initialize submodules after cloning:

$ git submodule update --init --recursive

Publishing

  1. Increment the version: npm version ..
  2. Push to GitHub: git push --follow-tags
  3. Wait for CI to complete
  4. Download prebuilds into ./prebuilds: npm run download-prebuilds
  5. Optionally verify loading a prebuild: npm run test-prebuild
  6. Optionally verify which files npm will include: canadian-pub
  7. Finally: npm publish

Donate

Support us with a monthly donation on Open Collective and help us continue our work.

License

MIT

rocksdb builds on the excellent work of the LevelDB and Snappy teams from Google and additional contributors to the LevelDB fork by Facebook. LevelDB and Snappy are both issued under the New BSD License. A large portion of rocksdb Windows support comes from the Windows LevelDB port (archived) by Krzysztof Kowalczyk (@kjk). If you're using rocksdb on Windows, you should give him your thanks!

More Repositories

1

levelup

A wrapper for abstract-leveldown compliant stores, for Node.js and browsers.
JavaScript
4,079
star
2

level

Universal abstract-level database for Node.js and browsers.
JavaScript
1,544
star
3

leveldown

Pure C++ Node.js LevelDB binding. An abstract-leveldown compliant store.
C++
773
star
4

level-js

An abstract-leveldown compliant store on top of IndexedDB.
JavaScript
542
star
5

awesome

An open list of awesome Level modules and resources.
JavaScript
287
star
6

memdown

In-memory abstract-leveldown store for Node.js and browsers.
JavaScript
285
star
7

abstract-leveldown

An abstract prototype matching the leveldown API.
JavaScript
146
star
8

party

Open a leveldb handle multiple times.
JavaScript
146
star
9

level-rocksdb

A convenience package bundling levelup and rocksdb.
JavaScript
146
star
10

abstract-level

Abstract class for a lexicographically sorted key-value database.
JavaScript
120
star
11

subleveldown

Split a levelup database into sublevels with their own keyspace, encoding and events.
JavaScript
119
star
12

electron-demo

Demo app loading LevelDB into an Electron context.
JavaScript
79
star
13

level-ttl

Add a 'ttl' (time-to-live) option to levelup for put() and batch().
JavaScript
69
star
14

level-browserify

No longer maintained: superseded by level v5.0.0.
JavaScript
63
star
15

classic-level

An abstract-level database backed by LevelDB.
JavaScript
58
star
16

multileveldown

multilevel implemented using leveldowns with reconnect support.
JavaScript
58
star
17

browser-level

An abstract-level database for browsers, backed by IndexedDB.
JavaScript
45
star
18

leveljs.org

Source code of leveljs.org
Pug
43
star
19

community

Discussion, support and common information for projects in the community.
42
star
20

encoding-down

An abstract-leveldown implementation that wraps another store to encode keys and values.
JavaScript
41
star
21

level-hyper

A convenience package bundling levelup and leveldown-hyper.
JavaScript
30
star
22

leveldown-mobile

This project has been abandoned.
C++
27
star
23

codec

Encode keys, values and range options, with built-in or custom encodings.
JavaScript
27
star
24

memory-level

In-memory abstract-level database for Node.js and browsers.
JavaScript
25
star
25

mem

A convenience package bundling levelup and memdown.
JavaScript
24
star
26

level-ws

A basic writable stream for abstract-level databases.
JavaScript
22
star
27

packager

A levelup package helper for distributing with an abstract-leveldown compatible back-end.
JavaScript
20
star
28

level-test

Inject temporary and isolated level stores (leveldown, level-js, memdown or custom) into your tests.
JavaScript
20
star
29

deferred-leveldown

An abstract-leveldown implementation that queues operations while a real abstract-leveldown instance is being opened.
JavaScript
19
star
30

many-level

Share an abstract-level database over the network or other kind of stream.
JavaScript
17
star
31

leveldown-hyper

Pure C++ Node.js HyperLevelDB binding. An abstract-leveldown compliant store.
C++
15
star
32

errors

Error types for levelup.
JavaScript
13
star
33

web-stream

Read from an abstract-level database using Web Streams.
JavaScript
12
star
34

iterator-stream

Turn an abstract-leveldown iterator into a readable stream.
JavaScript
12
star
35

level-lmdb

This project has been abandoned.
JavaScript
11
star
36

bench

Benchmark abstract-level databases.
JavaScript
8
star
37

level-mobile

[Currently not actively maintained] Fast & simple storage - a Node.js-style LevelDB wrapper (a convenience package bundling levelup & leveldown-mobile) [requires JXcore 0.3.0.3+]
JavaScript
8
star
38

read-stream

Read from an abstract-level database using Node.js streams.
JavaScript
6
star
39

rave-level

Use a LevelDB database from multiple processes with seamless failover.
JavaScript
6
star
40

level-basho

This project has been abandoned.
JavaScript
5
star
41

webpack-starter

Demonstrates bundling level for browsers using webpack.
JavaScript
5
star
42

concat-iterator

Concatenate entries from an iterator into an array.
JavaScript
5
star
43

compose

Compose a database factory from abstract-leveldown and levelup layers.
JavaScript
4
star
44

transcoder

Encode data with built-in or custom encodings.
JavaScript
4
star
45

supports

Create a manifest describing the abilities of an abstract-level database.
JavaScript
4
star
46

level-fstream

This project has been abandoned.
JavaScript
3
star
47

lazy-open

This project has been abandoned.
JavaScript
3
star
48

typings

Experimental typing development for level repositories. Deprecated.
TypeScript
3
star
49

database

2
star
50

browserify-starter

Demonstrates bundling level for browsers using browserify.
JavaScript
2
star
51

.github

Default community health files.
1
star