News for hackers. Stuff that matters.
Re:Generating Thousands of PDFs on EC2 with Ruby by MartinMond on Wednesday December 23, 2009 @12:12PM (#1012370)
I'm missing the one thing that's actually interesting (read hard) How did they collect the generated files? Did they take any precautions in case a worker died while creating a pdf? (Does AMPQ have some sort of transactional semantics? If so, how would one apply them)
Re:Generating Thousands of PDFs on EC2 with Ruby by almost on Wednesday December 23, 2009 @01:29PM (#1012516)
Amazons own SQS service has a simple solution to this problem. When you get an item from the queue it is temporarily hidden then once you've processed it successfully you explicitly delete the item from the queue. If the item is not deleted within the set timeout period then it goes back into the queue ready for another worker to have a go at. I assume RabbitMQ has something similar.

Actually I'm not sure why they used RanbitMQ rather than SQS for this task. SQS seems to me to be a perfect fit and there's no extra effort involved to set it up.

Re:Generating Thousands of PDFs on EC2 with Ruby by seancribbs on Wednesday December 23, 2009 @01:56PM (#1012575)
We uploaded the generated files to S3 at the end of each individual job. We could have used AMQP's 'ack' for each message, but it turned out not to be necessary.