Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://gitlab.com/ProfaneDB/ProfaneDB
A Protocol Buffers database
https://gitlab.com/ProfaneDB/ProfaneDB
cpp database grpc protobuf rocksdb
Last synced: 3 months ago
JSON representation
A Protocol Buffers database
- Host: gitlab.com
- URL: https://gitlab.com/ProfaneDB/ProfaneDB
- Owner: ProfaneDB
- License: gpl-3.0
- Created: 2017-04-29T07:50:02.118Z (over 7 years ago)
- Default Branch: master
- Last Synced: 2024-04-18T16:57:54.992Z (7 months ago)
- Topics: cpp, database, grpc, protobuf, rocksdb
- Stars: 33
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-grpc - ProfaneDB - A Protocol Buffers database with gRPC API, built in C++ on top of RocksDB (Tools / Other)
README
# ProfaneDB
ProfaneDB is a database for Protocol Buffer objects.
The key used for retrieval of objects is defined within `.proto` files, this is then used to store a single copy of each object, and allow references between objects without data duplication.## Configuration and usage
For a more detailed explanation, go to the [project's website](http://profanedb.gitlab.io/docs/quick-start/).
### Schema definition
Schema definition comes with every message definition, using [Protocol Buffer field options](https://developers.google.com/protocol-buffers/docs/proto#options):
*At the moment only one key per message can be set*
```protobuf
import "profanedb/protobuf/options.proto";message Test {
int32 field_one_int = 1 [ (profanedb.protobuf.options).key = true ];
string field_two_str = 2;
bool field_three_bool = 3;
bytes field_four_bytes = 4;
Nested field_five_nested = 5;
}message Nested {
string nested_field_one_str = 1 [ (profanedb.protobuf.options).key = true ];
int64 nested_field_two_int = 2;
double nested_field_three_double = 3;
}
```ProfaneDB can either be used as a gRPC server (service definition in profanedb/protobuf/db.proto) or as a library (interface in profanedb/db.hpp).
### CLI parameters
```
profanedb_server --rocksdb_path /tmp/profanedb -I /usr/include -S /your/schema/dir
```The most important parameters are the include path (`-I`) and schema path (`-S`).
- The **include path** is used to retrieve `google/protobuf/*.proto`,
`profanedb/protobuf/*.proto` and any other dependencies.
- The **schema path** has your definitions with the *key* option set.## Build
ProfaneDB uses [CMake](https://cmake.org/), and depends on Protobuf, gRPC, RocksDB, Boost.
### Options
| CMake Option | Default | Description |
|--------------|:-------:|-------------|
| `BUILD_SHARED_LIBS` | `ON` | Build libprofanedb.so, to embed __ProfaneDB__ |
| `BUILD_PROFANEDB_SERVER` | `OFF` | Build __ProfaneDB__ gRPC server |
| `BUILD_TESTS` | `OFF` | Build tests, run with `ctest` |