Cave is a reaction to the technologies on the market in both COTS and OSS worlds. We identified a need to have a fast, reliable, cloud-native key-value database that doesn't require a lot of configuration or workarounds to make a master/worker model...work.
Cave is not ACID compliant and makes no write guarantees.
Cave is based on a DHT network. Cluster peers are discovered by sharing lists of peers with other peers, this means that a node only needs to "see" a single node of a cluster in order to fully join and connect with the rest of the cluster. All updates (writes and deletes) to the database are broadcast across the network, each peer listens for updates and applies them as they come in.
Cave can be built by running make build
Configuration happens one of three ways:
Command-line arguments take precedence over all other methods.
You can get a full list of configuration parameters by running cave --help
To start Cave in single-node development mode, simply run cave --mode=dev
. This will start a new single-node database on your local machine.
To start Cave in "production" mode, you must supply the --mode=prod
flag, otherwise it will default to single-node "development" mode. When running in "production" mode, the new database instance will attempt to discover peers and sync the cluster database state. If it is unable to find peers it will assume it is the first node to come up and generate a new cluster id, shared keys, and other items.
Cave comes with a ton of exported Prometheus metrics. They can be scraped at the /api/v1/perf/metrics
endpoint.
Cave can be used via the REST API. Full API spec will be provided below. In general, there are a few things to remember:
/api/v1/
prefix.secret=true
URL parameter in order to encrypt/decrypt the secretMethods: GET, POST, DELETE
GET - Getting a path and key name will read that path and key name from the db
POST - POSTing data to a path and key name will store data at that path and key name
DELETE - DELETE will delete a key and value at a given path name
Methods: GET
Endpoint to get node logs (if enabled)
Methods: GET
Prometheus endpoint
Methods: GET
Returns JSON configuration for a Cave-specific Grafana dashboard
Methods: GET
Returns system configuration as JSON
Returns system information as JSON
Cave has a very rudimentary web UI that allows you to browse the key-value store and see which nodes are active. The UI can be accessed by going to
https://cave_host:port/ui/
Cave is very much a work in progress. Please bear with us as we work to improve it. Our proposed development roadmap is as follows:
Contributors are welcome! Please be respectful of the source and the other contributors.