• Stars
    star
    8,173
  • Rank 4,542 (Top 0.09 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created almost 12 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SSDB - A fast NoSQL database, an alternative to Redis

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([email protected])

Thanks

More Repositories

1

icomet

A C1000K comet/push server built with C++, for web and mobile app
C++
1,522
star
2

Objective-C-RSA

Doing RSA encryption and decryption with Objective-C on iOS
Objective-C
1,151
star
3

c1000k

A tool to test if your OS supports 1 million connections(c1000k/c1m)
C
596
star
4

sim

Simple C++ network server framework
C++
351
star
5

cocoaui

Build adaptive UI for iOS Apps with flow-layout and CSS properties
Objective-C
325
star
6

ssdb-rocks

ssdb with rocksdb, rocksdb client-server support
C++
140
star
7

iphp

An everyone can understand PHP framework for web development
PHP
138
star
8

tftpx

TFTP server and client implementation in C
C
138
star
9

cocoaui-demos

Build Native iOS Apps with Simple HTML+CSS, Flow Layout
Objective-C
97
star
10

ssdb-docs

SSDB documentation source code
HTML
90
star
11

icomet-demos

Demos for icomet server
Java
85
star
12

ssdb-bin

SSDB pre-compiled binary
81
star
13

cpy

Cpy provides you a way to write Python codes in C syntax!
Python
62
star
14

webrtc-demo

WebRTC GIPS C/C++ API demos
C++
57
star
15

rtc

Real-Time Communication Infracture
C++
56
star
16

snappy-ios

The Snappy compression library for iOS
C++
37
star
17

CocoaUIDemo

moved to https://github.com/ideawu/cocoaui-demos
36
star
18

js-lottery

JS网页抽奖工具
HTML
14
star
19

libfast

Simple FIX and FAST protocol implementation
C++
13
star
20

tableview

JavaScript TableView, PagerView, SelectorView
HTML
12
star
21

phpvoip

SIP implement with PHP
PHP
10
star
22

ParallaxScroll

JavaScritp Parallax Scrolling, Swipe guesture
JavaScript
8
star
23

endlessssh

Tunneling SSH over HTTP
Python
8
star
24

pyhttp

Event driven HTTP library for Python
Python
6
star
25

ios_live_streaming

iOS/macOS 视频直播技术框架
Objective-C
6
star
26

manual

常用操作手册
6
star
27

iOSScrollPicker

iOS Scroll Picker
Objective-C
5
star
28

soc

Simpler Objective-C/Standard Objective-C Library
Objective-C
4
star
29

leetcode

C++
3
star
30

fifo_test

Shows how to properly read and write FIFO on Linux
C++
2
star
31

tovi-js

A JavaScript image gallery and HTML slider, with iPhone swipe effect.
CSS
1
star
32

libave

Audio Video Engine Library
C++
1
star