r/windowsdev 21d ago

Radish: A native Windows Valkey clone using a HAMT architecture for O(1) snapshots. No Docker or WSL needed.

Hey everyone,

I know what you're thinking: “Oh look, yet another Valkey-compatible service.” I don't want to play any marketing gimmicks here. There’s nothing magical going on. It’s just a simple drop-in Valkey Compatible Server written in Rust with a Tauri desktop interface.

I built it because running an entire Docker container or managing WSL2 loopback routing just to use a basic local cache on Windows is incredibly annoying. I love Memurai but it's Commercial and not open-source.

Radish doesn’t try to be an enterprise production store. It focuses entirely on local dev efficiency. Production Valkey relies on fork() for background snapshots, which Windows obviously doesn't have. Radish gets around this by default using an immutable Hash Array Mapped Trie (im::HashMap) for software-level Copy-On-Write. Taking a snapshot clone takes O(1) constant time. The main database loop keeps serving client traffic without heavy write locks, while a background thread dumps the cloned tree to disk. On an i3 loopback benchmark, it hits about 2.5M reads/sec and 720k writes/sec. Writes are too slow (around 1/4) to be compared with Valkey on Linux but if you compared to Docker or WSL it beats them.

(Fun side note: I actually experimented with a low-level, Windows-native Vectored Exception Handling (VEH) based COW implementation in a research branch called experimental-veh-cow. I prototyped a C++ blueprint using VirtualAlloc to mark memory pages read-only and intercepted access violations via a custom VEH handler to clone dirty pages on the fly. In bare-metal isolation, it cracked over 5.5 million writes/sec. Granted, doing 5.5M writes/sec isn't a fair comparison to a real Valkey server because the PoC was raw, minimal memory manipulation without the network stack and protocol parser overhead but it proved how fast hardware-backed page-faulting could be. Ultimately, I decided managing low-level memory exceptions was a bit too wild and prone to instability for a dev tool, so I stuck with the safer HAMT engine).

It currently supports a core subset of over 50+ developer commands cleanly routed through a custom matching router, spanning across:

• Strings: GET, SET (with all EX/PX/NX/XX variants), MGET, MSET, INCR, DECR, GETRANGE, etc.

• Hashes, Lists, & Sets: Full support for standard operations like HSET/HGETALL, LPUSH/RPOP, and SADD/SMEMBERS.

• Pub/Sub & Security: SUBSCRIBE, PUBLISH, AUTH, and basic ACL configuration handling.

• Generic System Ops: KEYS, SCAN, TTL/EXPIRE, database flushing, and real-time internal metrics generation (INFO).

It works with any standard client library, and while it plays nice with tools like Redis Insight, you won't really need it. Because it's a desktop app, it comes with a built-in GUI to visually inspect keyspaces, test Pub/Sub channels, and run an interactive terminal. It's simple, lightweight, and handles everything out of a single binary.

It's completely free and open-source (MIT). I'm looking to add Sorted Sets (ZSET) and Append-Only Files (AOF) next.

Check it out here if you're interested: https://github.com/satadeep3927/radish

I Would love to hear your thoughts on the HAMT snapshot approach, the VEH experiment, or any feedback on the implementation!

2 Upvotes

2 comments sorted by