finds.dev← search

// the find

crossoverJie/distributed-redis-tool

★ 613 · Java · MIT · updated Dec 2022

🔒A simple distributed tools based on Redis.

A Spring-specific library wrapping Redis-backed distributed locks and rate limiters. Uses Lua scripts for atomicity — correct approach. Aimed at Spring 4.x+ applications that want to drop in annotation-driven limiting without writing the plumbing themselves.

Lua scripts for both lock acquisition and rate limiting are the right call — they make the operations atomic without MULTI/EXEC overhead. The builder pattern on RedisLock and RedisLimit is clean and makes configuration explicit. Supporting both cluster and single-node Redis without changing call sites is genuinely useful. The non-blocking tryLock/blocking lock distinction is properly exposed in the API rather than hidden.

Dead since 2022, last meaningful work appears to be 2018-era Spring 4/Jedis ecosystem — Spring Boot 3.x with spring-data-redis and Lettuce is the current standard and this library won't fit without shims. The rate limiter is a fixed-window counter, not sliding-window or token bucket, so it has the classic boundary-doubling problem where 2× the limit can hit in a short burst across a window edge. No lock expiry tuning exposed in the README — if your critical section takes longer than the TTL you get silent correctness violations. At 613 stars and abandoned, you'd be maintaining a fork the moment Jedis or Spring breaks compatibility.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →