Skip to content
SandstromPLPublic

About

A small Redis-like server written in Go.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

Redis Clone

A small Redis-like server written in Go. It speaks RESP, listens on port 6379, supports basic string and hash commands, and persists SET operations to database.aof.

Run

  1. Make sure port 6379 is free.

  2. U can check from this command:

     sudo  systemctl status redis
  3. If it's still running then turn it off:

     sudo  systemctl stop redis
  4. Start the server:

    go run main.go
  5. Connect from another terminal:

    redis-cli

Implemented Commands

  • PING
  • SET key value
  • GET key
  • HSET hash field value
  • HGET hash field
  • HGETALL hash

Notes

  • PING returns PONG with no arguments, or echoes the provided argument.
  • HGETALL returns field-value pairs as a RESP array.
  • SET is appended to the AOF file for persistence.

Source

This project was built while following: https://www.build-redis-from-scratch.dev/en/implementing-commands

About

A small Redis-like server written in Go.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages