A command like in-memory database in rust
- ⚡ Command-like TCP Protocol: Utilizes a custom, command-oriented protocol over TCP for structured communication between clients and the in-memory database server.
- 💨 Efficient In-Memory Storage: Crafted in Rust, "iris" is your go-to for a fast and reliable in-memory database.
- 👤 User-Friendly Commands: Easily communicate with the database server using simple commands like SET, GET, DELETE, and more. It's designed to offer an intuitive experience for developers of any skill level.
Workspace | Description |
---|---|
iris | The iris cli that contains the server and the repl client |
iris_client | The rust client crate to interact with iris server |
Communication in "iris" follows a structured message format, allowing clients to send commands to the server for processing. The message format consists of the following components:
- Command Type: A three-byte identifier specifying the type of command being sent.
- ID: Variable-length identifier for the command, used for tracking and processing purposes.
- Data: Variable-length payload containing additional information required for the command.
SET foo bar
│ │ └─ Data
│ └───── ID
└───────── COMMAND
Upon receiving a command, the server parses the message according to the defined format and processes the request accordingly. The server responds with a message in the following format:
- Status: A two or three-byte identifier indicating the status of the command execution. It can be either "OK" for successful execution or "ERR" for error conditions.
- Response: A variable-length payload containing additional information or the result of the command execution. This could include data retrieved from the database or an error message.
ok foo
│ └─ Response
└──── Status
Contributions to iris are welcome! If you have ideas for improvements, new features, or bug fixes, feel free to open an issue or submit a pull request on iris