Airone

Airone is a library inspired from Aral Balkan's JSDB principles applied to a Rust library.

The name has nothing to do with "air" or "one", it simply comes from the Italian word "Airone", which means "Heron". Hence, it has to be read [aiˈrone].

This library persists a list of structs from memory to disk. Every change in the data in memory is saved to disk automatically in a fast way, avoiding the full dump of the whole list.

Usage scenario

Airone is developed to be used in situations where all of these prerequisites apply: - No big-data: the whole dataset should fit in memory - the dataset has to be persisted to disk - after some data is modified, the change needs to be written to disk in a fast way - we can slow down the program start time without any relevant consequence - no nested objects

Here are two examples of good usage scenarios: - small web server: data may change fast and can entirely fit into memory. The startup time of the server is not important, a long as it is performant while it's running. - an offline GUI/TUI program: you can store modifications of some data in a very fast way thanks to airone's append-only file architecture, so the interface freeze during the saving process is barely noticeable.

These limits can be a problem for some usage scenarios. Existing databases add all sort of optimizations, caching mechanisms and are very complex, in order to be able to deal with such big amount of data.
However, when the above-mentioned prerequisites apply, we can leverage these limits to simplify the source code, making it more maintanable and getting rid of all the bloatware. Moreover, limiting object nesting makes it compatible with CSV style files, ensuring you can manipulate data with standard UNIX tools such as grep and awk.

Context

Airone is aimed at helping small-tech to be produced, which is a way of building technology antithetical to the Silicon Valley model. Small-tech features close-to-zero data collection, a free and open source structure to achieve good transparency, no lust to scale exponentially, no desire in tracking people's behaviour while crunching tons of data and, overall, it has a goal to keep things simple and human.

Documentation

Head to the official Documentation for the full usage instructions and implementation details.

Copyright

This is NOT public domain, make sure to respect the license terms. You can find the license text in the COPYING file.

Copyright © 2022 Massimo Gismondi

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.