diff --git a/README.md b/README.md index 86c2d82..94762d8 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,73 @@ cargo run ```shell cargo test ``` +### Architecture + + +--------------------------------------+ + | Redis Client | + +-------------------+------------------+ + | + | Request (e.g., SET key value) + v + +-------------------+------------------+ + | Server | + | (module: server, function: run) | + +-------------------+------------------+ + | + | Accept Connection + v + +-------------------+------------------+ + | Connection | + | (module: connection, manages TCP | + | connections and streams) | + +-------------------+------------------+ + | + | Read Data from TCP Stream + v + +-------------------+------------------+ + | Codec | + | (module: codec, function: decode) | + +-------------------+------------------+ + | + | Decode Request + v + +-------------------+------------------+ + | Frame | + | (module: frame, function: parse) | + +-------------------+------------------+ + | + | Parse Command and Data + v + +-------------------+------------------+ + | Store | + | (module: store, manages key-value | + | data storage) | + +-------------------+------------------+ + | + | Execute Command (e.g., set, get, incr_by) + v + +-------------------+------------------+ + | Frame | + | (module: frame, function: serialize)| + +-------------------+------------------+ + | + | Encode Response + v + +-------------------+------------------+ + | Codec | + | (module: codec, function: encode) | + +-------------------+------------------+ + | + | Write Data to TCP Stream + v + +-------------------+------------------+ + | Connection | + | (module: connection, manages TCP | + | connections and streams) | + +-------------------+------------------+ + | + | Send Response + v + +-------------------+------------------+ + | Redis Client | + +--------------------------------------+