In this project I'm trying to make a mini replication of redis using the Ruby programming language. This project is not perfect yet. Because it can only handle a few command requests, and it can't store the result data permanently yet.
Some of the command requests that can be processed are :
- PING
PING [message]
- ECHO
ECHO message
- SET
SET key value [NX | XX] [EX seconds | PX milliseconds]
- GET
GET key
- DEL
DEL key [key ...]
For more detailed information about command requests, you can visit in Here.
The requirement is that you must have installed Ruby 3.0.0 or higher.
Steps :
- Clone this repository
git clone https://github.com/alfajrimutawadhi/redis-replication.git redis-replication && cd redis-replication
- Run command
ruby server.rb
- You can operate your redis-client now