Code Monkey home page Code Monkey logo

iris's Introduction

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

iris's People

Contributors

qxb3 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.