Skip to content

Releases: boldbug1/tiny-redis

v1.0.1 - Module Path Fix & Performance Improvements

Choose a tag to compare

@boldbug1 boldbug1 released this 14 Sep 05:02

Patch release addressing package installability, code formatting, and memory optimization.

Changes

  • Module Path: Updated go.mod path to github.com/boldbug1/tiny-redis to allow installation via go install.
  • Routing: Refactored command dispatch from nested if/else checks to an idiomatic Go switch.
  • Memory Optimization: Swapped fmt.Sprintf with fmt.Appendf across response handlers to eliminate intermediate heap allocations.
  • Code Standards: Applied canonical formatting via gofmt.

Full Changelog: v1.0.0...v1.0.1

v1.0.0 - Core Engine, AOF Persistence & Graceful Shutdown

Choose a tag to compare

@boldbug1 boldbug1 released this 13 Sep 14:37
df0fbee

Initial release of tiny-redis, a lightweight in-memory key-value database written in Go implementing core Redis internals and protocol serialization.

Features

  • Network & Concurrency: Multi-client TCP server utilizing a goroutine-per-connection model with thread-safe data access via sync.RWMutex.
  • Wire Protocol: Handcrafted Redis Serialization Protocol (RESP) deserializer reading binary-safe bulk string arrays directly from buffered network streams (bufio.Reader).
  • Storage & Operations: In-memory storage supporting PING, ECHO, SET, GET, DEL, EXPIRE, and TTL.
  • Two-Tier Eviction:
    • Passive: On-access validation during reads to evict stale entries immediately.
    • Active: Probabilistic background sweeper running on a 100ms ticker with an adaptive 25ms execution cap.
  • AOF Persistence: Mutating operations are logged to appendonly.aof using raw RESP format and deterministically replayed on server startup.
  • Graceful Shutdown: Traps SIGINT/SIGTERM via channels to cleanly exit the connection accept loop, flush unwritten kernel page buffers to disk via fsync, and close file descriptors.