3 ms·
Redis is a k/v store, not a queue.
by moe 17y ago
Redis is a k/v store, not a queue.
- mahmud 17y agoKey == mailbox/slot, and value == message. All you need are concurrency primitives, and broadcasting (in the case of a distributed queue) People have modeled message queues with far more primitive solutions: http://www.freeopenbook.com/php-hacks/phphks-CHP-5-SECT-18.html http://www.freeopenbook.com/php-hacks/phphks-CHP-5-SECT-18.h... A Redis based solution might not be as elaborate as RabbitMQ, but it will be very clean and straightforward, not to mention blindingly fast, and will get the job done.
- moe 17y agoWell, I'm quite skeptical about the "blindingly fast" part (network overhead?) but agree that in the light of the current mq-options that's indeed one of the more appealing ideas. That said, I'm not really in the mood to reinvent that particular wheel myself here, but would probably give someone else's shot a try.
- mattrepl 17y agoActually Redis is a bit more than a k/v store these days. It provides implementations of a variety of basic data structures, including lists that support queue operations. There's BLPOP[1] and BRPOP for blocking job/message requests and LPUSH and RPUSH for placing a job/message on the queue. That said, I'd still like to see benchmarks showing Redis beating Beanstalkd. Of the two, I've only used Beanstalkd, but it's a great example of keeping things simple while still providing advanced functionality. _ 1 http://code.google.com/p/redis/wiki/BlpopCommand http://code.google.com/p/redis/wiki/BlpopCommand