A simple key-value store written in Erlang.
Bounty DB is very fast and clean, it implements Bloom filter to reduce disk lookups for non-existent keys.
- Erlang
- Run
make
inside the directory that contains cloned repo - Open
main.config
, set the server port and path to db file - Start server with
config=main ./start
command. However, you can make your config file and specify its filename to theconfig
param. - You can check status of the server with
./status
command, and stop the server by./stop
Bounty DB provides simple HTTP REST API.
GET /store/{key}
You can append parameter default={defaultValue}
to the request. This default value will return if there's no stored value for specified key in the database
Response:
{
"status": "ok",
"value": {value}
}
When no value:
{
"status": "error"
}
PUT /store/{key}
Request body must be JSON string.
Example, set value:
{
"value": "myValue"
}
Example, set value with a one minute timeout on key (after this timeout has expired, the key will automatically deleted):
{
"value": "myValue",
"timeout": 60
}
Response:
{
"status": "ok"
}
DELETE /store/{key}
Response:
{
"status": "ok"
}