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).
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.
- 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
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
To get started with GoodiesDB, follow these steps:
-
Clone the repository:
git clone https://github.com/ottermq/goodiesdb.git cd GoodiesDB -
Install dependencies:
go mod tidy
-
Build the project:
make build
Run the GoodiesDb server:
make runControl log verbosity with LOG_LEVEL:
LOG_LEVEL=debug make runSupported 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 ./...For project context and contributor guidance, start with:
AGENTS.mdCONTRIBUTING.mddocs/ARCHITECTURE.mddocs/PROJECT_STATUS.mddocs/ROADMAP.mddocs/TESTING.mddocs/refactoring/COMMAND_REGISTRY_REFACTOR.md
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.
This project is licensed under the MIT License.