GithubHelp home page GithubHelp logo

redis-leveldb's Introduction

Redis-LevelDB

A redis-protocol compatible frontend to google's leveldb: Use leveldb as a Redis-Server.

Current Version: 1.6

Redis COMMAND Supported

  • key-value commands:

    • incr/incrby
    • get/set
    • mget/mset
  • set commands(New):

    • sadd
    • srem
    • scard
    • smembers
    • sismemeber
  • hash commands(New):

    • hget
    • hset
    • hsetnx
    • hdel
    • hexists
    • hgetall
    • hkeys
    • hvals
    • hlen
  • list commands(New):

    • lpush
    • lpop
    • rpush
    • rpop
    • llen
  • transaction commands:

    • multi
    • exec
    • discard
  • connection commands:

    • select: select db (when redis-leveldb run in multi-db mode, with argument -M <num>)
  • server commands:

    • shutdown: shutdown the server

    • keys: list all keys in current db, do NOT use it in production environment

    • info: Different to redis, this info command accepts a flag argument, eg info, info k, info t, info kt

      • default: show leveldb.stat info
      • k: show the count of all keys
      • t: show leveldb.sstables info

Dependencies

  1. libev(>=1.4):

    install with apt-get or port please.

  2. gmp(http://gmplib.org/):

    install with apt-get or other package manager please.

  3. leveldb:

  1. git clone https://github.com/KDr2/redis-leveldb.git
  2. cd redis-leveldb
  3. git submodule init
  4. git submodule update

Compile

[LIBEV=LIBEV_PREFIX GMP=GMP_PREFIX DEBUG=1] make

Run

./redis-leveldb -h

options:

  • -d: run redis-level as a daemon process
  • -r <db-path>: repair a leveldb database
  • -H <host-ip>: host addr to listen on(eg: 127.0.0.1)
  • -P <port>: port to listen on(default 8323)
  • -D <data-dir>: leveldb data dir(default "redis.db" under your work directory)
  • -M <number>: run in multi-db mode and set its db count to <number>, each db in the server is a separatly leveldb database and its data directory is a directory named db-<num> under the directory you specified with the option -D; you can use command select to switch db on the client side while redis-leveldb is running in this mode.

redis-leveldb's People

Contributors

evanphx avatar ldmiao avatar rahuahua avatar

Watchers

 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.