explaingit

nalgeon/redka

4,548GoAudience · developerComplexity · 3/5Setup · easy

TLDR

Redka gives you the Redis API but stores data in SQLite or PostgreSQL instead of RAM, so you get Redis-compatible commands without memory limits or a separate Redis server process.

Mindmap

mindmap
  root((Redka))
    What it is
      Redis API on SQL storage
      SQLite or PostgreSQL backend
      No memory limit
    Supported types
      Plain values
      Lists
      Sets and sorted sets
      Hash maps
    Run modes
      Standalone server
      Embedded Go library
    Best for
      Dev and test environments
      Low-traffic production
      SQLite-first projects
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Replace Redis in a development or test environment with an SQLite-backed Redka instance that needs no separate server

USE CASE 2

Embed Redka directly into a Go app so each test spins up its own isolated in-memory database without a real Redis install

USE CASE 3

Use Redis-style data structures in a project that already runs SQLite or PostgreSQL to avoid adding another infrastructure dependency

USE CASE 4

Run a lightweight standalone Redka server so any existing Redis client library can connect without code changes

Tech stack

GoSQLitePostgreSQL

Getting it running

Difficulty · easy Time to first run · 30min

Stable but in maintenance mode, new features are not being added, best for dev, testing, or lightweight production where a full Redis install is overkill.

Check the repository for specific license terms.

In plain English

Redka is a project that recreates the core features of Redis using a SQL database as its storage engine. Redis is a popular system for storing data in memory, often used for caching and quick lookups. Redka offers the same programming interface as Redis, so code written for Redis will largely work with Redka without changes, but the data lives in SQLite or PostgreSQL instead of RAM. The practical difference is that Redka data does not have to fit in memory. Because it uses a real database on disk, you can store more than your available RAM would normally allow. You also get database-style guarantees: changes are either fully saved or fully rolled back, which makes it safer for certain kinds of operations where partial updates would cause problems. Redka supports the five core data types that Redis users typically rely on: plain text values, ordered lists, unique sets, field-value maps, and scored sorted sets. It also handles key expiration and transactions, so the behavior matches what Redis users expect from those commands. You can run Redka in two ways. One option is as a standalone server that behaves just like a Redis server, so any Redis client library in any programming language can connect to it. The other option is to embed it directly inside a Go application as a library, which means no separate server process is needed at all. The embedded mode is particularly handy for testing, since each test can spin up its own isolated in-memory database without needing a real Redis installation. The project is described as stable but in maintenance mode, meaning the author is not adding new features. It is best suited for development environments, lightweight production use cases, or situations where a team already uses SQLite or PostgreSQL and wants Redis-like data structures without managing a separate Redis server.

Copy-paste prompts

Prompt 1
I have a Go app that uses Redis for caching. Show me how to swap it out for Redka embedded in the same process using SQLite, and what import changes I need to make.
Prompt 2
How do I run Redka as a standalone server so my Python app can connect to it using the standard redis-py library without any code changes?
Prompt 3
I want to use Redka in my Go test suite so each test gets a fresh in-memory database. Walk me through the setup and teardown pattern.
Prompt 4
What Redis commands does Redka support? I specifically need sorted sets and key expiration, show me the equivalent Redka calls.
Prompt 5
My app stores more data than fits in RAM. How does Redka handle persistence to PostgreSQL, and what transaction guarantees does it give compared to plain Redis?
Open on GitHub → Explain another repo

← nalgeon on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.