Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 1.78 KB

README.md

File metadata and controls

64 lines (48 loc) · 1.78 KB

rippledb

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

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('rippledb') // 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

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

Benchmark

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

License

MIT License