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

Database Entry

LedisDB


LedisDB is a NoSQL database written in Go. It is similar to Redis and uses redis protocol. It can be used as a replacement of Redis. However, it uses RocksDB, LevelDB or goleveldb as storage engine. Therefore, unlike Redis, the storage is not limited by memory. The name LedisDB comes from Level-Redis-DB.[04][05]

Source Code
https://github.com/ledisdb/ledisdb[02]
Developer
Country of Origin
CN
Start Year
2014 [19]
Project Type
Open Source
Written in
Go
Supported Languages
C, Go, JavaScript, Lua, Python
Derived From
LevelDB, RocksDB
Inspired By
SSDB
Compatible With
Redis
Operating Systems
Linux, macOS
License
MIT License

Database Entry

LedisDB


LedisDB is a NoSQL database written in Go. It is similar to Redis and uses redis protocol. It can be used as a replacement of Redis. However, it uses RocksDB, LevelDB or goleveldb as storage engine. Therefore, unlike Redis, the storage is not limited by memory. The name LedisDB comes from Level-Redis-DB.[04][05]

History[06]


In 2014, Chinese programmer Siddon Tang noticed that as the number of users increases, the memory size is not enough for Redis. He found that SSDB could solve the problem. However, because of the three reasons below, he wanted to develop a database similar to SSDB using Go:

  1. Go development is quite rapid. Although the performance of Go is not as good as C++, it is great for rapid software development.
  2. He wanted to use LevelDB in his project and get some experience about LevelDB usage.
  3. He wanted to be more familiar with Redis.

Now, Siddon Tang is the Chief Engineer of PingCAP. He works on TiDB and TiKV. But LedisDB is still under his maintenance.

Checkpoints[07]


LedisDB uses RocksDB, LevelDB or goleveldb as storage engine and thus inherits their checkpoint mechanisms.

Compression[08][09]


LedisDB uses RocksDB, LevelDB or goleveldb as storage engine. You can enable their compression feature via configuration. Data and index blocks are compressed individually. User can choose from a list of supported compression algorithms, like LZ4 and Snappy. User can choose to use Dictionary Compression, too. Data are decompressed when LedisDB retrieves them from the underlying storage engine.

Concurrency Control[10]


There is no concurrency control protocol in LedisDB because it does not support transactions. Like Redis, LedisDB processes requests as commands. Each command is treated as a single atomic operation. However, LedisDB does not provide any mechanism to combine commands into transactions.

Data Model[11]


LedisDB is a key/value store, but has rich data structures. In addition to simple key/value pair, it provides Hash, List, Set, ZSet.

Indexes[07]


LedisDB uses RocksDB, LevelDB or goleveldb as storage engine and inherits their index data structure, which is the Log-Structured Merge Tree. They also use Skip List in the MemTable part.

Joins[10]


As a key/value store, no join feature is provided in LedisDB.

Logging[07]


LedisDB uses RocksDB, LevelDB or goleveldb as storage engine and thus inherits their logging mechanisms. They log all Put operations.

Query Compilation[12]


Query Execution[13]


LedisDB uses iterators in query processing.

Query Interface[11][10]


LedisDB can be embedded in Go programs and programs can use its API to perform queries. LedisDB also provides a query interface in redis protocol called RESP(REdis Serialization Protocol), and can be queried via redis-cli. LedisDB has HTTP API support, too.

Storage Architecture[07]


LedisDB uses RocksDB, LevelDB or goleveldb as storage engine and thus inherits their storage architecture. It also provides an option to use memory-backed storage (via goleveldb).

Storage Model[07]


LedisDB uses RocksDB, LevelDB or goleveldb as storage engine and thus inherits their storage model. Data are stored in the form of ordered key-value pairs.

Storage Organization[07]


LedisDB uses RocksDB, LevelDB or goleveldb as storage engine. Therefore, it inherits their Log-structured storage organization.

Stored Procedures[14]


LedisDB does not support stored procedures, but like Redis, it provides the capability to evaluate scripts using the bulit-in Lua interpreter. Scripts will be cached by LedisDB and can be invoked from the cache later. However, they are just cached rather than stored.

System Architecture[15][16][17][18]


LedisDB can be embedded in Go programs. You can also run LedisDB as an independent server. Multiple LedisDB nodes and coordinator nodes can form a cluster with partition and Master-Replica replication. Each server does not share anything with others and only communicates with each other through network connection.

Architecture

Views[10]


Embeddings
IceFireDB IceFireDB

Citations

19 sources
  1. http://ledisdb.com ledisdb.com Dead — Check Archive
  2. GitHub - ledisdb/ledisdb: A high performance NoSQL Database Server powered by Go · GitHub github.com
  3. Home · ledisdb/ledisdb Wiki · GitHub github.com
  4. GitHub - ledisdb/ledisdb: A high performance NoSQL Database Server powered by Go · GitHub github.com
  5. 高性能nosql ledisdb设计与实现(1)_siddontang-CSDN博客 csdn.net
  6. 发布一个参考ssdb,用go实现的类似redis的高性能nosql:ledisdb_golang 类似redis-CSDN博客 csdn.net
  7. GitHub - ledisdb/ledisdb: A high performance NoSQL Database Server powered by Go · GitHub github.com
  8. ledisdb/etc/ledis.conf at master · ledisdb/ledisdb · GitHub github.com
  9. Compression · facebook/rocksdb Wiki · GitHub github.com
  10. Commands · ledisdb/ledisdb Wiki · GitHub github.com
  11. GitHub - ledisdb/ledisdb: A high performance NoSQL Database Server powered by Go · GitHub github.com
  12. ledisdb/ledis at master · ledisdb/ledisdb · GitHub github.com
  13. ledisdb/store/iterator.go at master · ledisdb/ledisdb · GitHub github.com
  14. Commands · ledisdb/ledisdb Wiki · GitHub github.com
  15. GitHub - ledisdb/ledisdb: A high performance NoSQL Database Server powered by Go · GitHub github.com
  16. GitHub - ledisdb/ledisdb: A high performance NoSQL Database Server powered by Go · GitHub github.com
  17. Replication · ledisdb/ledisdb Wiki · GitHub github.com
  18. https://medium.com/@siddontang/build-up-a-high-availability-distributed-key-value-store-b4e02bc46e9e medium.com Dead — Check Archive
  19. Initial commit github.com
Revision #12