SSDB is a NoSQL database implemented with C++. The goal of SSDB is to substitute or work with Redis. It supports multiple data structures. Its low-level storage engine is based on Google LevelDB.[04][05][02]
- Website
- http://ssdb.io[01]
- Source Code
- https://github.com/ideawu/ssdb[02]
- Tech Docs
- https://ssdb.io/docs[03]
- Developer
- Country of Origin
- CN
- Start Year
- 2013 [24]
- Project Type
- Open Source
- Written in
- C++
- Embeds / Uses
- LevelDB
- Compatible With
- Redis
- License
- BSD License
History[06][04]
SSDB is originally an individual open-source project. It was started by Zuyang Wu in 2013, aiming to work as an alternative for Redis. Currently, SSDB is being used in many productive environments to replace Redis, including several well-known companies and startups.
Checkpoints[07]
SSDB provides the ssdb-dump tool for making checkpoint backup and recover. It also supports export and import command to save and restore the database from the client side.
Compression[08]
SSDB supports Snappy data compression library developed by Google since version 1.6.2. In LevelDB, developers should explicitly set parameters to use Snappy in the compile time. SSDB changes this feature by directly integrating the source code of Snappy to the project. By default, SSDB will use Snappy, but users can still choose to use a non-compression version. SSDB with Snappy compression is compatible with non-compression data.
Concurrency Control[09]
SSDB does not support concurrency control, because operations are executed individually and there is no transaction. However, unlike Redis, SSDB supports multi-threads to avoid write operations blocking read operations (since 1.5.2). All write operations are executed in a single thread while read operations are executed in other threads.
Data Model[10][11]
SSDB supports four main data types, which are key-value, hashmap, sorted set and list. The key-value data type is used to store data with no strong relations. The hashmap is used to store data in different set with counting and sorting based on key value. Sorted set sorts all entries based on a score integer, and unlike key-value and hashmap, it cannot be used to store large data. List stores data in the queue structure.
Indexes[13][14]
SSDB uses LevelDB as its storage engine. Operations on different data types are based on the implementation of LevelDB. LevelDB uses Log-Structured Merge Tree for data storage, and Skip List for memtable.
Logging[15][16][17]
SSDB supports logical logging for its operations. It has multiple logging levels, including fatal, error, warn, info, debug(recommended), trace. The log file will change its name and create a new log file when exceeding the size limitation.
Query Execution[18]
SSDB implements three separate iterator classes for key-value, hashmap and sorted set.
Query Interface[12][19][20]
Firstly, SSDB supports a set of shell commands to execute queries. Secondly, SSDB provides custom API for a wide range of programming languages, including C#, C++, Erlang, Go, Java, Lua, PHP, Python, Ruby, Swift. Besides, developers can use Redis client to connect the server with REdis Serialization Protocol. The command set of SSDB is similar to Redis.
Storage Architecture[01]
SSDB is a disk-oriented database. The key difference between Redis and SSDB is that Redis uses mainly in-memory storage while SSDB stores data in the disk. Therefore, SSDB can stores 100 times data in Redis for each node.
Storage Model[02]
SSDB uses the storage model in LevelDB, where data is saved in sorted key-value pairs.
Storage Organization[21]
SSDB uses the LevelDB storage, whose key organization is the log-structured merge tree.
System Architecture[22][23]
SSDB is a single-node database management system. Initially, the server does not share anything with other nodes. However, as SSDB supports Redis API, developers can directly use Twemproxy to manage a number of SSDB servers. Besides, it is also workable to use the combination of Redis and SSDB.
Citations
24 sources- http://ssdb.io ssdb.io
- GitHub - ideawu/ssdb: SSDB - A fast NoSQL database, an alternative to Redis · GitHub github.com
- https://ssdb.io/docs ssdb.io
- http://ssdb.io/docs/ ssdb.io
- ideawu.net ideawu.net
- https://www.oschina.net/question/2306979_241362 oschina.net
- https://ssdb.io/docs/backup.html ssdb.io
- ideawu.net ideawu.net
- ideawu.net ideawu.net
- https://ssdb.io/ssdb-get-started.pdf ssdb.io
- https://ssdb.io/docs/commands/index.html ssdb.io
- https://ssdb.io/docs/commands ssdb.io
- ssdb/src/ssdb at master · ideawu/ssdb · GitHub github.com
- Log-structured merge-tree - Wikipedia wikipedia.org
- SSDB:高性能数据库服务器 | 崔叔隐世记 github.io
- ssdb/src/ssdb/binlog.cpp at master · ideawu/ssdb · GitHub github.com
- https://ssdb.io/docs/logs.html ssdb.io
- https://github.com/ideawu/ssdb/blob/5c3542ec1a8bcb1d7b3f600c5b4a4681ae450561/src/ssdb/iterator.cpp github.com
- https://ssdb.io/docs/redis-to-ssdb.html ssdb.io
- https://redis.io/docs/latest/develop/ redis.io
- https://dbdb.io/db/leveldb dbdb.io
- ideawu.net ideawu.net
- https://ssdb.io/docs/cluster.html ssdb.io
- Initial commit github.com