Qool - a leveldb backed queue

Datetime:2016-08-23 00:44:48          Topic: Leveldb           Share

qool (WIP)

a leveldb backed Queue

Features

  • strict FIFO ordering of enqueue and dequeue operations
  • batching for level db mutating operations (del, put)

Example

const Qool = require('qool')
const level = require('level-bytewise')

const db = level('db')
const queue = Qool.create(db)

queue.enqueue('a')
queue.enqueue('b', (err) => {})

queue.dequeue()
queue.dequeue((err, value) => {})

Some ramblings on internal design arehere

license

TODO

  • enhance tests
  • implement length property
  • should we have a version of dequeue that "waits" if the queue is empty

MIT © yaniv kessler





About List