redis

package module
v0.0.0-...-689788a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2023 License: MIT Imports: 8 Imported by: 0

README

Introduction

Redis implementation in Go.

The aim of this project is to implement Redis in idiomatic-ish Go. It will try to be as stupid and simple as possible. Optimizations will come later. It

Get involved!

This project is in work-in-progress, so share ideas, code and have fun.

The goal is to have all features and commands like the actual redis written in C have. I am always open to collaborate!

Test

Running Go tests

There are some tests written in Go. I aim to make this comprehensive in the future.

$ go run cmd/main.go <PORT>
$ PORT=<PORT> go test

Running Reference Redis' Tests Suite

To check agains the reference implementation, you can also run the test from redis and point it to this implementation.

Note that there are some tests that are irrevelant to us because it is an implementation details (most tests that uses OBJECT command) of the reference redis. I maintain a branch in my fork of redis that trims out some of these.

After cloning the redis repository,

./runtest --host 127.0.0.1 --port 6380 --tags -needs:repl --ignore-encoding

From this command, we are currently ignoring replication and encoding features. Or if you want to only execute a certain test, you can do,

./runtest --host 127.0.0.1 --port 6380 --tags -needs:repl --ignore-encoding --single unit/types/set

Link for explanations of some these options.

Test

Roadmap

  • Client connection / request / respond
  • RESP protocol
  • able to register commands
  • in-mem database
  • active key expirer
  • Implementing data structures
    • String
    • List
    • Set
    • Sorted Set
    • Hash
    • ...
  • Tests
    • unit/type/set
    • unit/type/string
    • unit/printver
TODO beside Roadmap
  • Persistence
  • Redis config
    • Default redis config format
    • YAML support
    • Json support
  • Pub/Sub
  • Redis modules
  • Benchmarks
  • master slaves
  • cluster
  • ...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(port int, shouldLog bool)

Types

This section is empty.

Directories

Path Synopsis
bin
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL