FF-KV is a bitcask-based single-node key-value storage engine.
- Keys and values are arbitrary byte arrays.
- The basic kv operations are
Put(key,value)
,Get(key)
,Delete(key)
,ListKeys()
,Fold(function)
,Write Batch
. - The basic engine operations are
Open(options)
,Close()
,Sync()
,Merge(dir)
,Stat()
. - Multiple indexes are supported (B Tree/Adaptive Radix Tree/ B+ Tree)
- Forward and backward iteration is supported over the data.
- Checksum is supported.
- HTTP interface is supported.
- Backup and recovery strategy is simple.
- Users can convert I/O type to mmap when starting FF-KV.
- Handle datasets much larger than memory capacity.
- This is not a SQL database. It does not have a relational data model, it does not support SQL queries.
- Only a single process (possibly multi-threaded) can access a particular database at a time.
Case-1: Using HTTP Interface
Step-1: Start HTTP server.
Step-2: Send HTTP requests (open a new cmd window).
HandlePut
, HandleGet
, HandleDelete
, HandleListKeys
, HandleStat
are supported.
Case-2: Embedded in Other Programs
Please refer to /example/basic_operation.go
. // todo, not completed yet :(
-
Index lock granularity optimization
-
MVCC (batch commit)
-
WAL-like format (read by block)
-
...
bitcask-intro: https://riak.com/assets/bitcask-intro.pdf