As others have mentioned you have lots of options: LMDB, LevelDB/RocksDB, BerkeleyDB. For what it's worth, I spent a long time looking for an embedded key-value store for my current native project since I didn't need the full complexity of SQL. In the end I chose... SQLite.<p>All of these embedded NoSQL databases seem to be missing critical features. One such feature for my use case is database compaction. Last I checked, an LMDB database file can never shrink. Full compaction of LevelDB is slow and complicated (as I understand it essentially breaks the levels optimization which is the whole point of the thing.) SQLite meanwhile supports fast incremental vacuum, and it can be triggered manually or automatically.<p>SQLite just has everything. Plus the reliability is unmatched. Even if you just need a single table that maps blob keys to blob values, I would still recommend SQLite over any NoSQL database today.
The SQLite of NoSQL is still SQLite: <a href="https://www.sqlite.org/json1.html" rel="nofollow">https://www.sqlite.org/json1.html</a>
Filesystem.<p>Linux has VFS cache which is very robust and efficient.<p>Remember that it is typical for programs to read /etc/nsswitch.conf, /etc/resolve.conf and tons of others at startup time - the filesystem is <i>the</i> datasource in Unix tradition, so the machinery is very well optimized.
Isn't the main feature of nosql supposed to be easy horizontal scalability, the exact opposite of storing everything in a single file?<p>If you just need a r/w store for some jsons in a single file, why not sqlite? You can put arbitrary-length blobs into it. Some sql will be involved but you can hide it in a wrapper class tailored to your application with a few dozen lines of code or so.
SQLite has a backend which is well suited as a key-value store.<p>Here is a NoSql database based on the SQLite backend: <a href="https://github.com/rochus-keller/Udb" rel="nofollow">https://github.com/rochus-keller/Udb</a>.<p>I use it in many of my apps, e.g. <a href="https://github.com/rochus-keller/CrossLine" rel="nofollow">https://github.com/rochus-keller/CrossLine</a>. It's lean and fast, and supports objects, indices, hierarchical "globals" like ANSI-M and transactions.
NoSQL databases have many different different data models. Eg object, document, graph, and key/value DBs. In a lot of cases you should probably just use something on top of SQLite, but you should say more about your requirements.<p>An interesting one I ran into recently is Datalevin, a Datalog DB on top of LMDB for Clojure: <a href="https://github.com/juji-io/datalevin" rel="nofollow">https://github.com/juji-io/datalevin</a>
One of those I've tried is LiteDB - <a href="https://github.com/mbdavid/LiteDB" rel="nofollow">https://github.com/mbdavid/LiteDB</a>. I liked it.<p>It's small yet capable. If you are familiar with MongoDB, you will feel right at home.<p>It's great for .NET developers as it's written in C# but since it's Netstandard 1.3 compatible, you can presumably run it under Ubuntu or Mac OS or wherever else the new .NET 5 runtime works. I've got a C# app running on ARM64 the other day - just saying.<p>I wrote about my experience playing with LiteDB here - <a href="https://tomaskohl.com/code/2020-04-07/trying-out-litedb/" rel="nofollow">https://tomaskohl.com/code/2020-04-07/trying-out-litedb/</a>. It's not an in-depth look at all, just a few notes from the field, so to speak.
Probably something like LMDB [0] or Tkrzw [1], though nosql is a bit more diverse in a way SQL is not so it is hard to give a clear answer.<p>[0]: <a href="https://en.m.wikipedia.org/wiki/Lightning_Memory-Mapped_Database" rel="nofollow">https://en.m.wikipedia.org/wiki/Lightning_Memory-Mapped_Data...</a>
[1]: <a href="https://dbmx.net/tkrzw/" rel="nofollow">https://dbmx.net/tkrzw/</a>
I ended up writing a small wrapper on top of SQLite based on this: <a href="https://dgl.cx/2020/06/sqlite-json-support" rel="nofollow">https://dgl.cx/2020/06/sqlite-json-support</a><p>With proper concurrency control, it can work very well even for multi process applications.
I like sled that is a nice embedded key value store written in Rust: <a href="https://sled.rs/" rel="nofollow">https://sled.rs/</a><p>However, it is still in heavy development and a bit of a moving target even if the developers are currently heading toward stabilization of the file format.
Check LiteStore as bonus you have api included<p><a href="https://h3rald.com/litestore/" rel="nofollow">https://h3rald.com/litestore/</a><p><a href="https://github.com/h3rald/litestore" rel="nofollow">https://github.com/h3rald/litestore</a>
I think you want Mongita. It was featured on HN a while ago: "Mongita is to MongoDB as SQLite is to SQL (github.com/scottrogowski)"
<a href="https://news.ycombinator.com/item?id=26881915" rel="nofollow">https://news.ycombinator.com/item?id=26881915</a>
Its same as sqlite. You can get more info in this sqlite tutorial.<p><a href="https://www.tutlane.com/tutorial/sqlite" rel="nofollow">https://www.tutlane.com/tutorial/sqlite</a>