PoloDB: a lightweight NoSQL database
Today I am going to introduce a new database named PoloDB. It’s a lightweight database which can be loaded in everywhere. It has similar APIs with MongoDB, which means it’s easy to lean and use.
Github: https://github.com/vincentdchan/PoloDB
Lightweight. PoloDB doesn’t have separate processes such as MySQL. It’s just a library can be embedded in your application, just like SQLite. It cost less memory to initialize and run. So it’s suitable for personal devices. The performance of your clients’ devices isn’t usually as good as your powerful servers. It isn’t easy to embed a massive database in your applications. PoloDB is the right choice.
The database file is only a file. You can transfer it anywhere, don’t need to zip it or to dump data. Besides, it’s very easy to backup.
Portable. PoloDB is written in Rust. It can be compiled to run on various platforms. Currently, it supports macOS, Linux and Windows. Further, it will support iOS/Android, even Raspberry Pi(Actually, I am working on it).
It supports various programming languages bindings. Currently, it supports Rust, C/C++, Node.js, Python. Theoretically, every language can use PoloDB; it just needs time to adapt.
Flexible. PoloDB is NoSQL. It acts like MongoDB. It’s very flexible. JSON is the data format PoloDB used. You don’t need to create some schemas before using it. You open the database and insert data to it.
Nowadays, many applications update quickly, functions of applications changes very often. Flexible data structure helps you iterate quickly.
Powerful. Although it’s lightweight, it’s a full-featured database. It supports atomic commits(transactions). Data indexing is under development. In the future, more and more features will be added to PoloDB. For example, data encryption, data backup, JS runtime, etc.
You see, it’s better to store JSON in PoloDB than JSON text files. With PoloDB, you don’t need to read large JSON from disk into memory and parse data. PoloDB read data when you need it because the database has a particular structure; it knows how and when to store and read.
Open Source. PoloDB is a personal project currently. I use off work time to complete it. All the codes are published on Github under MIT licenses. You can copy and learn all the details of PoloDB. It’s an incredible project, but it has no secrets. Also, you can customize PoloDB for your circumstance; it benefits performance.
The development of PoloDB is at a very early stage. But it can work now; you can try it yourself by following instructions. PoloDB is easy to use, but it’s not simple to implement. It still has a lot of works to do, such as writing documents to explain it, writing strict tests, adapt it to more platforms. My time is limited; merge requests are welcome to submit.
Most importantly, I hope you can use it and give me feedback so that I can improve it. Hence, you can use better PoloDB.