Welcome to tinyRedis, a minimalistic Redis-compatible server implementation written in Go. This project is designed to be lightweight, efficient, and fully compatible with the Redis protocol, making it suitable for educational purposes, testing, and small-scale deployments. Please remember that tinyRedis is intended to be a learning tool, developed over a night, and as such, it may not encompass the full security features expected in a production-ready application.
- Redis Protocol Compatibility: Implements key features of the Redis protocol to ensure compatibility with existing Redis clients.
- Lightweight Design: Focused on core functionality with minimal overhead, making it fast and easy to deploy.
- Written in Go: Leverages Go's concurrency model for efficient handling of multiple connections and data safety.
Before you begin, ensure you have Go installed on your machine. You can download and install Go from https://golang.org/dl/.
To install tinyRedis, clone the repository and build the project:
git clone https://github.com/robitec97/tinyRedis.git
cd tinyRedis
go build .
To start the server, simply run:
./tinyRedis
tinyRedis will listen on port 6379, you can connect to it using any standard Redis client.
Here is a simple example of setting a key and retrieving it using a Redis client in Python:
import redis
# Connect to the server
client = redis.Redis(host='localhost', port=6379)
# Set a key
client.set('admin', 'robitec')
# Get the key
print(client.get('admin')) # Output: robitec
Contributions are welcome! Feel free to open an issue or submit a pull request.