Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I was reading this transcript of an interview with a GitHub developer and he was describing how they use Redis:

Q: You mentioned using Redis. How do you use that?
A: We use Redis for exception handling and for our queue. We tried a lot of Ruby-based queuing mechanisms. Chris wrote an abstraction to the queuing mechanism. We used to use BJ and DJ and in the super early days we tried out Amazon SQS and a lot of queuing mechanisms and they all fell over at one point or another with the amount of traffic that we were doing on them and the types of queries that we were trying to get from them. Eventually we moved to a Redis space that Chris also wrote, called Resque.

Can anyone guess to what that means to use Redis for exception handling? Does it mean the logging of exceptions or something else?

You can see the video of him saying it here.

share|improve this question
    
what that means to use Redis for exception handling Logging probably. –  Yannis Rizos Feb 8 '12 at 9:09

1 Answer 1

Yes, he meant logging. Redis is actually classical for logging - it's volatile data; writes should be extremely fast in order to not create an unnecessary load on the system/database; you are usually interested in only the last logs so you can easily run:

LPUSH log error_message
LTRIM log 0 1000

and always keep only the latest logs. Of course, this example is highly simplified, but this is the main idea.

See:

  1. http://redis.io/commands/ltrim
  2. http://simonwillison.net/static/2010/redis-tutorial/ - the slide that begins with Capped Collections
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.