Zedis Zedis is a Redis-compatible in-memory data store implemented in Zig. It is designed primarily for learning and experimentation, aiming to offer simplicity, performance, and thread safety while implementing core Redis protocols and data structures. --- Features Redis Protocol Compatibility: Supports the Redis Serialization Protocol (RESP). Multiple Data Types: Stores string and integer values with automatic type conversion. Core Redis Commands: Implements essential commands like GET, SET, INCR, DECR, DEL, EXISTS, and TYPE. High Performance: Written in Zig, optimizing performance and providing memory safety. Connection Management: Handles multiple concurrent client connections. Disk Persistence: Supports RDB snapshots for point-in-time dataset saves. Pub/Sub: Implements publish/subscribe functionality for decoupled service communication (recently added). --- Roadmap [x] Add RDB snapshots (using RDB file format) [x] Implement pub/sub functionality [ ] Implement Append Only File (AOF) logging [ ] Implement more Redis commands [ ] Support lists and sets data types [ ] Add configuration file support [ ] Implement key expiration [ ] Add clustering support [ ] Develop performance benchmarking suite --- Quick Start Prerequisites Zig (minimum version 0.15.1) — Download here Building and Running The server starts by default on 127.0.0.1:6379. Testing with Redis CLI You can interact with Zedis using the standard Redis CLI or any Redis-compatible client: --- Development Project Structure Uses Zig language conventions emphasizing: Compile-time type safety Explicit error handling Memory safety following RAII principles Comprehensive logging for debugging and tracing Building for Development Adding New Commands Implement the command handler in the appropriate file under src/commands/. Register the new command in the command registry. Add tests to validate the new functionality. Example command handler: Code Style Use Zig's standard formatter (zig fmt). Ensure thorough error handling. Document public APIs. Write tests for new features. --- Contact GitHub profile: @barddoo Project repository: https://github.com/barddoo/zedis --- Zedis - An educational Redis implementation in Zig, aiming to deepen understanding of Redis internals with the benefits of Zig’s performance and safety features.