The goal is to have a fairly simple database which is light and don't needs to fit in RAM. This part is done by Badger which use SSD capabilities to have low RAM consumption and good performances.
The indexing is done by Bleve.
It's pure Go language, so no issues with CGO.
Save deferent document type in different collection.
The database can have many collections, see prefix limitations. many collection can be used on the same database.
Index and query is done by Bleve
It's a fully featured indexing package. Indexing is done at the collection level and one collection can have many indexes. See prefix limitations.
In the same database you can save files of any size and many small documents.
Supports for big content with io.Reader and io.Writer interface. It split content into chunks of 5MB.
The all database content is encrypted and signed with XChaCha20-Poly1305.
go get -u github.com/alexandrestein/gotinydb
The package is supposed to be used inside your software and at this point it is not supposed to be a dedicated database service. Take a look at GoDoc and to the examples folder.
- Make a basic master/slaves replication system for data protection
Any contribution will be appreciate. Feedbacks and suggestions are welcome.
We moved to go module. In future Go release this will be the default vendoring behavior. So this will be transparent in the next release.
Version v1.0.0
is not ready.
It's under development and versions have the form of v0.x.x.
There is no compatibility promise for now.
Most of the methods can be run concurrently. But management actions can not:
- *DB.Backup
- *DB.Close
- *DB.DeleteCollection
- *DB.Load
- *Collection.DeleteIndex
- *Collection.SetBleveIndex
Those functions and methods should be run on idle database.
Prefixes to split different parts of the database: collection, files, indexes and documents. The prefixes are only 2 bytes (16bits). It gives 65536 possibilities which much more than enough. But the hash collision are possible so the real limit is much less.
If you are unlucky you will hit this ErrHashCollision
.
The database keys are not encrypted. But for indexing some of the content are used as keys. For iteration reason the keys can't be encrypted.
For the content which needs to be sealed don't index them. Bleve index mapping provides a very sine control of what are or not indexed.
- Alexandre Stein - GitHub
This project is licensed under the "Apache License, Version 2.0" see the LICENSE file for details or follow this link.