4 ms·
A Journey to center of Redis
Redis is great but it was missing a feature; I always wanted this post covers and provides you with a Redis fork that give you a new feature of PUBLISH event on key expiry.
- aaronblohowiak 15y agoThe first version (with a hard-coded destination channel) is a 5 line diff: https://github.com/maxpert/redis/commit/07dd0613aceffa18bcddcb33c491bd19636cefe4 https://github.com/maxpert/redis/commit/07dd0613aceffa18bcdd...
- maxpert 15y agoYes I believe minimal changes means lesser bugs. And yes! It's freaking cool they way Redis guys have coded this thing :)
- LeafStorm 15y agoAntirez is considering adding a special SUBSCRIBE command for internal Redis events. Right now it's planned to mostly handle warnings and replication stuff, but keys expiring would be a good usecase for it too.
- maxpert 15y agoI've seen that discussion of new subscribe things; I believe it will be a good feature to introduce. I love this approach because its really simple and there is no new instruction in system (like backward compatible x86 machines) :)
- seppo0010 15y agoI wonder if using a zset with the expiration timestamps as score and user id wouldn't work for this scenario?
- rgbrgb 15y agoMaybe a dumb question but what's a zset?
- jeromeparadis 15y agoThat's awesome. For a project I'm going to work on using node.js and Redis, this is exactly the functionality I need for a component. Would be quite useful for scheduling one-time events through Redis.