Hi everyone, I've built BLite because I am using LiteDB for years in my professional works, but lately the maintainer seems disappeared and I was stuck with a dependency that doesn't work with the NativeAOT.
So I decided to rewrite a database from scratch. It is a BSON document store but with zero reflection because I used the Source Generators for the serialization. This makes the binaries very small and fast. I also want to be honest and say that I used the AI for helping me in some parts of the library development and for the implementation.
I also implemented the "C-BSON" (Compressed BSON) to save some space by mapping the field names to a global dictionary, so the documents are smaller but still standard BSON. In my benchmarks on .NET 10, it is around 8x faster than SQLite on the single inserts.
It supports B-Tree, Hash, and R-Tree indexes, plus ACID transactions and an experimental vector search. I tried to keep the API very simple, similar to EF Core, for not having a big learning curve.
I am very happy of the result and I'd love to hear what the HN community thinks about the C-BSON idea or the Source Generator implementation.
lucafabbri•1h ago
So I decided to rewrite a database from scratch. It is a BSON document store but with zero reflection because I used the Source Generators for the serialization. This makes the binaries very small and fast. I also want to be honest and say that I used the AI for helping me in some parts of the library development and for the implementation.
I also implemented the "C-BSON" (Compressed BSON) to save some space by mapping the field names to a global dictionary, so the documents are smaller but still standard BSON. In my benchmarks on .NET 10, it is around 8x faster than SQLite on the single inserts.
It supports B-Tree, Hash, and R-Tree indexes, plus ACID transactions and an experimental vector search. I tried to keep the API very simple, similar to EF Core, for not having a big learning curve.
I am very happy of the result and I'd love to hear what the HN community thinks about the C-BSON idea or the Source Generator implementation.
Happy to answer to any technical questions!