SSDB

SSDB is key-value(zset, hash, list) storage server, with Google LevelDB as storage engine, its goal is to replace Redis when encounter large sum of data that won’t fits the server’s memory.

https://github.com/ideawu/ssdb
SSDB Docs: http://ssdb.io/docs/

SSDB’s main features:

  • Uses Google LevelDB as storage engine
  • Master-slave replication, recover from break point after network failure
  • Online backup through network
  • Very suitable for storing collection data
  • Uses small RAM

PHP API

<?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

PHP API Docs: http://ssdb.io/docs/php/

SSDB vs Redis

SSDB vs Redis

Views: 70896

52 Responses to "SSDB"

  • Hi
    I want to use SSDB but I don’t speak read/write chinese. Most of the companies using it seem to be chinese? I am concerned that this will make it difficult to find answers because most of the discourse is in a language that I don’t understand.

    Is there a big english community around ssdb that I havent found yet? Reply
    @Joe: Hi, it is ok to discuss in English on GitHub issues https://github.com/ideawu/ssdb/issues Don’t worry, most programmers and ssdb users in China know English well. Reply
  • Hi,
    For KV engine, I am looking for an enhanced levelDB lib that supports set and hash, but I do not need those fancy stuff like socket / server / master-slave etc. A pure lib like levelDB is more than enough for my scenario. Is it possible for me to use SSDB in such manner? (or with affordable changes). please advise, thank you. Reply
    @James: Yes, ssdb project is separeated into modules(db, network, util, etc), download the project and check it out yourself. Reply
  • First – thanks! – amazing project!

    I was a little confused by http://ssdb.io/docs/redis-to-ssdb.html – does this mean that redis clients sending a zScore (for example) would not work since the SSDB command seems to be called zget? If not, why give it different names – does it do something different?

    Its confusing to have something that is so close to redis, claims to be a redis replacement, but then uses different function calls for the same thing (even if they are really aliased.)

    Can you explain more of why you gave the same redis commands different names? Reply
    @Yehosef: Hi, I think zget is better than zscore, because we have get/hget/qget, for the reason of consistency, it should be zget, not zscore. Reply
    @ideawu:
    Thanks for the explanation – I understand better now. I’m not sure if I agree because is it’s not the same thing. The relationship between a key and value with a key-value isn’t the same relationship as a member and score in a zset (at least in redis, maybe in ssdb it’s the same), though superficially they look the same. The data structures and use cases are different (eg, in zset the score can only be numbers)

    I guess what seems odd is that you’re trying to make a redis replacement and then renaming the functions. If it did something else, I can hear. But to change it because you think zget makes more sense, makes less sense and makes it more confusing. Is it at least aliased so that zScore will work?

    The same is true of the q* naming – read – http://stackoverflow.com/questions/3940839/list-vs-queue-vs-set-of-collections-in-java – for a reference – a queue is made to only access the ends – a list can access the ends or ranges in the middle. http://ssdb.io/docs/commands/qslice.html makes no sense if it’s a queue. Reply
  • Is there a way to determine the number of keys set in SSDB? Reply
    @Russ Jones: No easy way except scanning the whole db. If you have this demand, save all key-values in exactly one hashmap, then use hsize command to get the number of keys in it. Reply
  • 请问一下,ssdb支持分布式和跨机房同步吗? Reply
    @linbo: SSDB 支持跨机房同步, 只要网络是通的状况良好. SSDB 不提供现成的分布式方案, 需要使用者自己部署多个实例, 自己根据业务特点将数据分布到不同的实例上. Reply
  • Hi,

    Does SSDB persist data from memory to disk as well?

    I think it’s not quite clear how it’s working in common, generally the way I can think of: stores the data in memory, persists to disk as well as ability to use replica nodes?

    Thanks. Reply
    @Vadim: Yes, SSDB persist data to disk. It uses the famous storage engine LevelDB from Google. Reply
  • Hi

    Let me introduce you this module for SSDB and vert.
    https://github.com/jpv/ssdb-mod

    Thank you for the great job. Reply
    @jpv: Good job! Reply
  • 为什么不选用rocksdb 作为引擎 Reply

« [1][2][3][4] » 2/4

Leave a Comment