ALL COVERED TOPICS

NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter

NAVIGATE MAIN CATEGORIES

Close

Using Redis to Control Recurring Sets of Tasks

Alex Rockwell:

Problem: Create an application to check the availability of a large number of URLs. This list is constantly changing and every url must be checked at a specific interval (e.g., every minute). The actual checking of the URL needs to be distributable over several servers.

Redis had two key features that made writing this code very straightforward:

  • RPOPLPUSH: Pop the element on the right side of the list, return it, push onto left side of the list. This simulates a circular list.
  • BLPOP: Block until a new element is available at the list.

Lately I’m reading more and more examples of using Redis as a queuing and pub/sub tool than as an in-memory key-value store.

Original title and link: Using Redis to Control Recurring Sets of Tasks (NoSQL databases © myNoSQL)

via: http://alexrockwell.org/using-redis-to-control-a-recurring-task-queue