3 ms·
This article is from 2021. They indeed use an SQL database and SQL queries to implement a key-value store. The data is stored in a regular table (CREATE TABLE
by Rochus 3y ago
This article is from 2021.
They indeed use an SQL database and SQL queries to implement a key-value store. The data is stored in a regular table (CREATE TABLE example (key BLOB PRIMARY KEY, value BLOB NOT NULL). It's very unlikely that this really achieves high-performance, given that the SQLite backend is actually a key-value store and the SQL interpreter runs on top of it as an intermediate layer. To avoid some performance-drawbacks caused by this architecture they added caching.
They have even considered RocksDB and LMDB, but have rejected them with reasons that I can not relate.
I have implemented a transactional key-value store myself for my project and information management tools fifteen years ago (before the other mentioned stores became available) based on the aforementioned SQLite backend (see https://github.com/rochus-keller/Udb https://github.com/rochus-keller/Udb and https://github.com/rochus-keller/Sdb https://github.com/rochus-keller/Sdb) which supports both robust integrity and high performance. Doing the same with the full SQLite just adds complexity and lowers performance with no added value.