Giter VIP home page Giter VIP logo

beano's Introduction

Beano

Beano is a key value database

  • speaks memcached ascii protocol
  • persists to leveldb (native golang impl), boltdb, badger or memory
  • cache keys using bloomfilter (leveldb) or couting bloom filter (boltdb) to save I/O
  • can switch databases on the fly
  • can be set readonly
  • metrics ridden (expvar and go-metrics)
  • range queries by key prefix

Build

  • Build locally with make

    • requires dep
    • check src/Makefile.defs for specific settings on lib and include paths. Type make.
  • Use Vagrant + ansible (provided) to spin an Ubuntu server with mc-benchmark

    • vagrant up; vagrant ssh
  • Use ansible to build in your VPS

    • ansible-playbook -i hosts.ini golang.yml
  • mc-benchmark used more as concurrency benchmark than speed. Currently it gets near 2040k writes/sec

Running

$ beano [-s ip] [-p port] [-f /path/to/db/file -q -b leveldb|boltdb|inmem]")
	- default ip: 127.0.0.1
	- default port: 11211
	- default backend: leveldb
	- default db path+file: ./memcached.db
	- (-q enables profiling to /tmp/*.prof")

Memcached commands implemented

  • any regular memcached client will do

    • ascii quit [pass]
    • ascii version [pass]
    • ascii set [pass]
    • ascii set noreply [pass]
    • ascii get [pass]
    • ascii mget [pass]
    • ascii add [pass]
    • ascii replace [pass]
    • ascii delete [pass]
  • not in memcached specs:

    • statdb - stats from leveldb
    • switchdb - switch to new db file
    • range [limit] - range query of keys that begin w/ prefix, limited by [limit]. no limit or -1 means bring it all.
  • modified behaviour wrt memcached

    • gets - alias to range so all drivers can work.

API

Architecture

modules

Network servers, command parsing and backend db implementations are split to make it easy to add new backends. That was inspired by memcached and made working on Beano easy.

The HTTP listener provides expvars and a basic api to switch datastores

Separated db modules means that I could implement caching in front of Boltdb that were natively present on LevelDB without leaking through the backend interface abstraction.

TODO

  • It already pass the basics of memcapable -a for set/get/replace. Incr and Decr are wip.
  • Better log configure (for now stats are dumped each 60 secs to log handler, not properly formatted)

github analytics

Why beano ?

Naming things is hard, so I've named this project after a blues breaker album that was named after a comic.

beano

Licensing: MIT

beano's People

Contributors

gleicon avatar dvrkps avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.