|
|
5 月之前 | |
|---|---|---|
| client | 5 月之前 | |
| packaging | 5 月之前 | |
| proto | 5 月之前 | |
| service | 5 月之前 | |
| CMakeLists.txt | 5 月之前 | |
| README.md | 5 月之前 | |
| VERSION | 5 月之前 |
A standalone key-value document database with gRPC API, designed for microservice architectures.
HealthCheck() RPC for service status verificationStorageReplication gRPC servicesmartbotic-database/
├── client/ # Client library (injectable into projects)
├── service/ # Database service (standalone deployable)
├── proto/ # gRPC protocol buffer definitions
└── packaging/ # Docker build and systemd files
cmake -B build -G Ninja
ninja -C build
When used as a submodule, configure build options:
set(SMARTBOTIC_DB_BUILD_CLIENT ON) # Always need client
set(SMARTBOTIC_DB_BUILD_SERVICE ON) # Optional: include service binary
add_subdirectory(external/smartbotic-database)
{
"database": {
"bind_address": "0.0.0.0",
"rpc_port": 9004,
"data_directory": "/var/lib/smartbotic/database",
"migrations": {
"enabled": true,
"directory": "/etc/smartbotic/migrations",
"auto_apply": true
},
"persistence": {
"wal_sync_interval_ms": 100,
"snapshot_interval_sec": 3600
},
"encryption": {
"enabled": true,
"auto_generate_key": true
},
"replication": {
"enabled": false,
"peers": []
}
}
}
Create JSON migration files in the migrations directory:
{
"version": "001",
"name": "create_users",
"description": "Create users collection",
"operations": [
{
"type": "create_collection",
"collection": "users",
"options": {"encrypted": true}
}
]
}
Supported operations:
create_collection - Create collection if not existsdrop_collection - Drop collection (requires confirm: true)insert - Insert document (fails if exists)insert_if_not_exists - Insert only if ID doesn't existupsert - Insert or update documentupdate - Update existing documentdelete - Delete document| Target | Description |
|---|---|
smartbotic_db_proto |
Generated protobuf/gRPC code |
smartbotic-db-client |
Client library |
smartbotic-database |
Service executable |
Proprietary - Smartbotics AI