A pure node.js implementation of LSM(log structured merge tree) based storage engine(inspired by leveldb).
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
- TableBuilder
- TableReader
- TableCache
- LogWriter
- LogReader
- WriteBatch
- MemTable
- Database Recovery
- Version Manager
- Compaction
- Top-level API (put, get, del, batch, iterator, compactRange, ok)
- Repair
- Destroy
environment : GitHub Action
key : 16 bytes
value : 100 bytes
total : 10000
runners : 10
fillrandom : 823.87 ms total; 82.39 us/op