Total Pageviews

Monday, 17 March 2014

ssdb-一个快速的nosql数据库

SSDB - A fast NoSQL database for storing big list of data

SSDB is a high performace key-value(key-string, key-zset, key-hashmap) NoSQL database, an alternative to Redis.
SSDB is stable, production-ready and is widely used by many Internet companies including QIHU 360.

Features

  • LevelDB client-server support, written in C/C++
  • Designed to store collection data
  • Persistent key-value, key-zset, key-map('hashmap') storage
  • Redis clients are supported
  • Client API supports including C++, PHP, Python, Cpy, Java, nodejs, Ruby, Go
  • Persistent queue service
  • Replication(master-slave), load balance [see wiki Replication]
  • Future Features
    • Distributed

PHP client API example

<?php
require_once('SSDB.php');
$ssdb = new SimpleSSDB('127.0.0.1', 8888);
$resp = $ssdb->set('key', '123');
$resp = $ssdb->get('key');
echo $resp; // output: 123
More...

Documentation

Compile and Install

$ wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip
$ unzip master
$ cd ssdb-master
$ make
$ #optional, install ssdb in /usr/local/ssdb
$ sudo make install

# start master
$ ./ssdb-server ssdb.conf

# or start as daemon
$ ./ssdb-server -d ssdb.conf

# ssdb command line
$ ./tools/ssdb-cli -p 8888

# stop ssdb-server
$ kill `cat ./var/ssdb.pid`
See Compile and Install wiki

from https://github.com/ideawu/ssdb