Meet LioranDB: A Document Database Built in Rust
I've been working on LioranDB, a document database built in Rust with a MongoDB-style developer experience.
And now there's a video about it on YouTube:
Watch: https://www.youtube.com/watch?v=tAAOfV-HyAs
LioranDB V2 is currently in pre-alpha, so this isn't a polished "we've finished everything" announcement.
It's an invitation to developers to experiment with the database, test it, benchmark it, find strange edge cases, and preferably break things before somebody else does.
What Is LioranDB?
LioranDB is a document-oriented database designed around a familiar developer experience while building the underlying database engine in Rust.
The V2 architecture includes components such as:
- B+Tree primary storage
- MVCC
- Write-Ahead Logging (WAL)
- Crash recovery
- Secondary indexes
- Full-text indexing
- Page caching
- A query and DBMS layer
- TypeScript/JavaScript driver
- Docker deployment
Conceptually, an application talks to LioranDB like this:
Application
↓
LioranDB Driver
↓
LioranDB Server
↓
Query / DBMS Layer
↓
MVCC + Transactions
↓
Storage Engine
↓
B+Tree / WAL / Cache
↓
Disk
Why Build Another Database?
That's a fair question.
There are already excellent databases available today.
LioranDB isn't being built because the world desperately needs another CRUD API.
The interesting part for me is the infrastructure underneath it.
How do you make writes durable without destroying throughput?
How should secondary indexes interact with document storage?
How do you recover correctly after a crash?
How do you execute limit(), sorting and indexed queries without accidentally scanning or hydrating millions of unnecessary documents?
How do you maintain correctness while optimizing performance?
Those questions are where building a database gets interesting very quickly.
Sometimes an optimization gives you a beautiful benchmark.
Sometimes a tiny change takes performance from nice to what have I done.
That's part of building infrastructure.
LioranDB V2 Is Still Pre-Alpha
This part is important.
LioranDB V2 is not currently presented as production-ready.
Pre-alpha is where we're testing the architecture, fixing correctness problems, improving performance and learning from real workloads.
That also makes this one of the best times for developers interested in databases to experiment with it.
Don't just test:
insertOne(...)
Try ugly workloads.
Create indexes.
Query large collections.
Restart the database unexpectedly.
Run concurrent reads and writes.
Try unusual filters.
Push pagination.
Try to make something behave incorrectly.
If you find something broken, that's useful information.
Current Performance Target
Our pre-alpha development target has been approximately:
10,000 writes/sec
+
35,000 reads/sec
------------------
≈ 45,000 operations/sec
These are development benchmark figures, not an SLA or guaranteed production performance.
Actual throughput depends on hardware, dataset size, document structure, indexes, query patterns, concurrency and many other factors.
Performance numbers without workload context are mostly decorative numbers wearing suits.
Watch the Video
If you'd rather see LioranDB than read another wall of database text, I've published a video on YouTube:
https://www.youtube.com/watch?v=tAAOfV-HyAs
I'll continue publishing more about the internals of LioranDB, including the storage engine, indexing, WAL, MVCC, query execution, performance work and some of the bugs we've encountered while building it.
Try LioranDB
Website: https://liorandb.com
Documentation: https://docs.liorandb.com
LioranDB V2 is still evolving, so feedback at this stage genuinely matters.
If you're a backend, Rust, database or infrastructure developer, try it.
Benchmark it.
Inspect how it behaves.
And if you can break it, please tell me how you did it.
Top comments (0)