News for hackers. Stuff that matters.
Re:Resque Bus by est on Sunday September 29, 2013 @03:17AM (#6464408)
It's polling based approach.

https://github.com/resque/resque-scheduler/blob/master/lib/r...

https://github.com/resque/resque-scheduler/blob/master/lib/r...

Resque will scan for set value with key prefix like "timestamps:" or "delayed:", for every five seconds, if there's any task queued it will be fired.

There's many pros/cons with this approach, e.g. in Redis SADD, SMEMBERS are O(N) operations while in theory dedicated cron algorithm could make O(log(n)).

https://en.wikipedia.org/wiki/Cron#Multi-user_capability

This is is important if you have many short lived, timestamp based events need to handle. My use case is design item cool down for a mobile/web game using server side push, with millions of users. While resque could in theory solve this problem, but it's no different from a per 5 minute crontab command.

So anyway, what I hope is a native clock in Redis handling all this.

There are no comments on this comment yet.