Skip to content

qxb3/iris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iris

A command like in-memory database in rust


Features

  • 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.

Workspaces

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

TCP Protocol

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:

  1. Command Type: A three-byte identifier specifying the type of command being sent.
  2. ID: Variable-length identifier for the command, used for tracking and processing purposes.
  3. 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:

  1. 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.
  2. 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

Contribution

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

About

A command like in-memory database in rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages