GoBolt is a lightweight, Redis-like in-memory key-value store built with Go. It supports RESP protocol parsing, in-memory storage, and Append-Only File (AOF) persistence to ensure durability.
GoBolt implements several core Redis features:
✅ In-Memory Storage - Stores key-value pairs in memory for fast access.
✅ RESP Protocol Support - Parses Redis Serialization Protocol (RESP) requests for communication.
✅ String Commands - Supports basic Redis commands like SET
, GET
, DEL
, etc.
✅ Append-Only File (AOF) - Persists commands to disk to ensure durability.
✅ TCP Server - Handles multiple client connections.
✅ Concurrency Handling - Uses Go's goroutines for efficient request processing.
- Go (1.18+)
# Clone the repository
git clone https://github.com/hossainsmshakib/gobolt.git
cd gobolt
You can interact with GoBolt using redis-cli
.
# Set a key-value pair
SET mykey "Hello GoBolt!"
# Get the value of a key
GET mykey
Below is a high-level overview of how GoBolt works:
Client -> TCP Server -> RESP Parser -> Command Execution -> Data Store -> AOF Persistence
graph TD;
A[Client] -->|Sends command| B[TCP Server];
B -->|Parses request| C[RESP Parser];
C -->|Processes command| D[Command Execution];
D -->|Modifies data| E[In-Memory Store];
D -->|Persists changes| F[AOF Logger];
MIT License