•  


GitHub - ideawu/ssdb: SSDB - A fast NoSQL database, an alternative to Redis
Skip to content

ideawu/ssdb

Repository files navigation

SSDB - A Redis compatible NoSQL database stored on disk

Author Platform NoSQL License

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'), key-list storage
  • Redis clients are supported
  • Client API supports including C++, PHP, Python, Cpy, Java, nodejs, Ruby, Go( see all )
  • Persistent queue service
  • Replication(master-slave), load balance
  • GUI administration tool( phpssdbadmin )
  • Built-in CLI nagios self-checks

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

Who's using SSDB?

SSDB users...

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

$ ./ssdb-server ssdb.conf -s stop
 
#
 for older version

$ 
kill
 `
cat ./var/ssdb.pid
`

See Compile and Install wiki

Performance

Typical performance

Total 1000 requests.

writeseq  :    0.546 ms/op      178.7 MB/s
writerand :    0.519 ms/op      188.1 MB/s
readseq   :    0.304 ms/op      321.6 MB/s
readrand  :    0.310 ms/op      315.0 MB/s

SSDB vs Redis

Benchmark vs Redis

View full SSDB vs Redis benchmark charts...

Concurrency benchmark

========== set ==========
qps: 44251, time: 0.226 s
========== get ==========
qps: 55541, time: 0.180 s
========== del ==========
qps: 46080, time: 0.217 s
========== hset ==========
qps: 42338, time: 0.236 s
========== hget ==========
qps: 55601, time: 0.180 s
========== hdel ==========
qps: 46529, time: 0.215 s
========== zset ==========
qps: 37381, time: 0.268 s
========== zget ==========
qps: 41455, time: 0.241 s
========== zdel ==========
qps: 38792, time: 0.258 s

Run on a 2013 MacBook Pro 13 inch with Retina display.

Architecture

ssdb architecture

Windows executable

Download ssdb-server.exe from here: https://github.com/ideawu/ssdb-bin

SSDB library for iOS

make ios
# ls ios/
include/ libleveldb-ios.a libsnappy-ios.a libssdb-ios.a libutil-ios.a

Drag the static libraies files into your iOS project. Then add ios/include to your iOS project's Header Search Paths , which is set in Build Settings .

Links

Changes made to LevelDB

See Changes-Made-to-LevelDB wiki

LICENSE

SSDB is licensed under New BSD License , a very flexible license to use.

Authors

@ideawu( wuzuyang1@gmail.com )

Thanks

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본