Skip to content

ottermq/goodiesdb

Repository files navigation

GoodiesDB

Go Docker Image CI

GoodiesDB is an in-memory data store written in Go that speaks the RESP2/RESP3 protocol, making it compatible with existing RESP clients. It implements a practical subset of commands across strings, lists, hashes, key management, pub/sub, and server operations — see Features for the full list. The project is educational at heart: a hands-on way to understand how in-memory stores, persistence, and wire protocols work.

Disclaimer: GoodiesDB is not intended for production use (yet).


Table of Contents

Introduction

GoodiesDB aims to mimic the basic functionalities of Redis to provide a learning platform for developers interested in understanding distributed systems, data structures, and high-performance computing.

Features

  • In-memory key-value store with 16 logical databases
  • Data persistence via AOF (RESP-encoded) and RDB snapshots
  • Registry-based command dispatch — no monolithic switch
  • Pub/Sub messaging with pattern matching and subscriber mode enforcement

Supported commands

Strings: SET GET SETNX INCR DECR STRLEN GETRANGE

Lists: LPUSH RPUSH LPOP RPOP LRANGE LTRIM

Hashes: HSET HGET HGETALL HDEL HEXISTS HLEN HMGET HKEYS HVALS

Key management: DEL EXISTS EXPIRE TTL TYPE KEYS RENAME SCAN

Pub/Sub: SUBSCRIBE UNSUBSCRIBE PSUBSCRIBE PUNSUBSCRIBE PUBLISH

Server: AUTH SELECT INFO PING ECHO QUIT FLUSHDB FLUSHALL

Installation

To get started with GoodiesDB, follow these steps:

  1. Clone the repository:

    git clone https://github.com/ottermq/goodiesdb.git
    cd GoodiesDB
  2. Install dependencies:

    go mod tidy
  3. Build the project:

    make build

Usage

Run the GoodiesDb server:

make run

Control log verbosity with LOG_LEVEL:

LOG_LEVEL=debug make run

Supported values are error, info, and debug. The default is info.

You can then connect with any Redis-compatible client on port 6379, or run the integration test suite:

go test ./...

Documentation

For project context and contributor guidance, start with:

  • AGENTS.md
  • CONTRIBUTING.md
  • docs/ARCHITECTURE.md
  • docs/PROJECT_STATUS.md
  • docs/ROADMAP.md
  • docs/TESTING.md
  • docs/refactoring/COMMAND_REGISTRY_REFACTOR.md

Persistence note

GoodiesDB now writes AOF files in RESP format rather than the older line-based space-split format.

Older appendonly.aof files from the legacy format are not replayed by current versions. If such a file is present, GoodiesDB starts with an empty store instead of attempting a best-effort import.

License

This project is licensed under the MIT License.

Acknowledgements

  • Redis for the inspiration and original implementation.
  • Golang for the programming language.

About

GoodiesDB - Redis Database implementation written in Go

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages