node-level
Last updated 3 months ago by heineiuo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-level 
SYNC missed versions from official npm registry.

node-level

GitHub Actions status Coverage status npm version Join the chat at https://gitter.im/heineiuo/node-level

A pure node.js implementation of LSM(log structured merge tree) based storage engine(inspired by leveldb).

Get started

Use in JavaScript or TypeScript:

const path = require('path')
const { Database } = require('node-level') // install from npm

async function main(){
  const db = new Database(path.resolve(__dirname, './db'))
  await db.put('foo', 'bar')
  console.log(
    (await db.get('foo')).toString()
  ) // 'bar'
}

main()

For more details, see documention

Roadmap

  • [x] TableBuilder
  • [x] TableReader
  • [x] TableCache
  • [x] LogWriter
  • [x] LogReader
  • [x] WriteBatch
  • [x] MemTable
  • [x] Database Recovery
  • [x] Version Manager
  • [x] Compaction
  • [x] Top-level API (put, get, del, batch, iterator, compactRange, ok)

Benchmark

environment : GitHub Action
key         : 16 bytes
value       : 100 bytes
total       : 10000
runners     : 10 
fillrandom  : 1154.48 ms total; 115.45 us/op

License

MIT License

Current Tags

  • 0.2.4                                ...           latest (3 months ago)

13 Versions

  • 0.2.4                                ...           3 months ago
  • 0.2.3                                ...           3 months ago
  • 0.2.2                                ...           3 months ago
  • 0.2.1                                ...           3 months ago
  • 0.2.0                                ...           3 months ago
  • 0.1.3                                ...           3 months ago
  • 0.1.2                                ...           4 months ago
  • 0.1.1                                ...           4 months ago
  • 0.1.0                                ...           4 months ago
  • 0.0.4                                ...           4 months ago
  • 0.0.3                                ...           4 months ago
  • 0.0.2                                ...           4 months ago
  • 0.0.1                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 13
Last Day 0
Last Week 13
Last Month 1
Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |