DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

SSDB


SSDB is a NoSQL database implemented in C++. The goal of SSDB is to substitute, or work together with Redis. It is compatible with Redis APIs, and has a larger storage space than Redis. SSDB supports multiple data structures, including key-value pairs, hashmap, sorted set, and list. Its low-level storage engine is based on Google LevelDB. SSDB supports a wide range of programming languages.[02][04][05]

Source Code
https://github.com/ideawu/ssdb[02]
Developer
Country of Origin
CN
Start Year
2013 [24]
End Year
2021
Project Type
Open Source
Written in
C++
Supported Languages
C#, C++, Erlang, Go, Java, Lua, PHP, Python, Ruby, Swift
Embeds / Uses
LevelDB
Compatible With
Redis
Operating Systems
BSD, iOS, Linux, macOS, Windows
License
BSD License

Database Entry

SSDB


SSDB is a NoSQL database implemented in C++. The goal of SSDB is to substitute, or work together with Redis. It is compatible with Redis APIs, and has a larger storage space than Redis. SSDB supports multiple data structures, including key-value pairs, hashmap, sorted set, and list. Its low-level storage engine is based on Google LevelDB. SSDB supports a wide range of programming languages.[02][04][05]

History[06][04]


SSDB was originally an individual open-source project. It was started by Zuyang Wu in 2013, aiming to work as an alternative for Redis. Most of the features were implemented in 2013 and 2014. The last update to SSDB was one year ago.

Checkpoints[07]


SSDB provides the ssdb-dump tool for checkpointing and recovery. It also supports export and import commands to save and restore the database from the client side.

Compression[08]


SSDB supports data compression using Snappy. Snappy is an open-source data compression library developed by Google. It is used in both Google's internal tools and several famous open-source databases, including Cassandra, MongoDB, and LevelDB. SSDB naturally supports Snappy as it uses LevelDB for low-level storage. In LevelDB, developers should explicitly set parameters to use Snappy in the compile time. Since version 1.6.2, SSDB has changed this feature by directly integrating the source code of Snappy to the project. By default, SSDB will use Snappy, but users can explicitly 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 sets with counting and sorting based on the key value. Sorted set sorts all entries based on an integer of score. Unlike the key-value and hashmap data types, sorted set cannot be used to store large data. Besides, list data type stores data as a queue.

Foreign Keys[12]


Indexes[13][14]


SSDB uses LevelDB as its storage engine. SSDB explicitly calls LevelDB's interfaces to insert, update, and delete data. In LevelDB, a Log-Structured Merge Tree is used for indexes. Log-Structured Merge Tree provides a higher write throughput than the B+ tree. For each write operation, it first writes to a data structure called memtable, which will be flushed to disk later. In a memtable, LevelDB uses Skip List to find a position.

Joins[11]


Join operations are not supported based on the document.

Logging[15][16][17]


SSDB supports logical logging for its operations. It has multiple logging levels. The log file will change its name and create a new log file when exceeding the size limitation.

Query Compilation


No query compilation is found in SSDB.

Query Execution[18]


SSDB implements three separate iterator classes for key-value, hashmap, and sorted set.

Query Interface[19][12][20]


Firstly, SSDB supports a set of shell commands to execute queries. Secondly, SSDB provides custom APIs for a wide range of programming languages, including C#, C++, Erlang, Go, Java, Lua, PHP, Python, Ruby, and Swift. Besides, developers can use the Redis client to connect the server with Redis Serialization Protocol. The command set of SSDB is similar to that in 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 store 100 times the amount of data in each node of Redis.

Storage Model[02]


SSDB uses the storage model in LevelDB, where data is stored in sorted key-value pairs.

Storage Organization[21]


SSDB uses the LevelDB storage, whose key organization is the Log-Structured Merge Tree.

Stored Procedures


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 the Twemproxy to manage a number of SSDB servers. Besides, it is also workable to use a combination of Redis and SSDB.

Views[12]


Citations

24 sources
  1. http://ssdb.io ssdb.io Spam — Check Archive
  2. GitHub - ideawu/ssdb: SSDB - A fast NoSQL database, an alternative to Redis · GitHub github.com
  3. https://ssdb.io/docs ssdb.io Dead — Check Archive
  4. http://ssdb.io/docs/ ssdb.io Dead — Check Archive
  5. ideawu.net ideawu.net
  6. https://www.oschina.net/question/2306979_241362 oschina.net Dead — Check Archive
  7. https://ssdb.io/docs/backup.html ssdb.io Dead — Check Archive
  8. ideawu.net ideawu.net
  9. ideawu.net ideawu.net
  10. https://ssdb.io/ssdb-get-started.pdf ssdb.io Dead — Check Archive
  11. https://ssdb.io/docs/commands/index.html ssdb.io Dead — Check Archive
  12. https://ssdb.io/docs/commands ssdb.io Dead — Check Archive
  13. ssdb/src/ssdb at master · ideawu/ssdb · GitHub github.com
  14. Log-structured merge-tree - Wikipedia wikipedia.org
  15. SSDB:高性能数据库服务器 | 崔叔隐世记 github.io
  16. ssdb/src/ssdb/binlog.cpp at master · ideawu/ssdb · GitHub github.com
  17. https://ssdb.io/docs/logs.html ssdb.io Dead — Check Archive
  18. https://github.com/ideawu/ssdb/blob/5c3542ec1a8bcb1d7b3f600c5b4a4681ae450561/src/ssdb/iterator.cpp github.com Dead — Check Archive
  19. https://redis.io/docs/latest/develop/ redis.io
  20. https://ssdb.io/docs/redis-to-ssdb.html ssdb.io Dead — Check Archive
  21. https://dbdb.io/db/leveldb dbdb.io
  22. ideawu.net ideawu.net
  23. https://ssdb.io/docs/cluster.html ssdb.io Dead — Check Archive
  24. Initial commit github.com
Revision #27 Last Updated: