A single-threaded, persistent key/value store server and client with synchronous networking over a custom protocol.
- log crate & slog crate
- kvs-client: lib + main : The
kvs-client
binary accepts the same command line arguments as in previous projects. - kvs-server: 重写参数解析器 :
kvs-server
has its own set of command line arguments to handle, as described previously in the spec.- kvsEngine tarit
- protocol: pending design - 命令传输
- part 3 Client-server networking
- part 4 Implement command across the network
- 日志打印
- 可扩展存储引擎
KvsEngine
,SledKvsEngine
- benchmark 性能测试
- KvsClient - implements the functionality required for kvs-client to speak to kvs-server
- KvsServer - implements the functionality to serve responses to kvs-client from kvs-server
KvsEngine
trait - defines the storage interface called by KvsServer- KvStore - implements by hand the `KvsEngine trait
- SledKvsEngine - implements
KvsEngine
for the sled storage engine.
pub trait KvsEngine {
KvsEngine::set(&mut self, key: String, value: String) -> Result<()>;
KvsEngine::get(&mut self, key: String) -> Result<Option<String>>;
KvsEngine::remove(&mut self, key: String) -> Result<()>;
}