RADAR Love: “RESTful Application, Dumb-Ass Recipient”

Image credited to Dave Thomas


Image credited to Dave Thomas
Ilya Grigorik has written a article demonstrating three different ways you can schedule tasks to run using Ruby, including a simple thread based scheduler, a OpwnWFEru based scheduler, and a BackgrounDRB based scheduler. A notable omission is RailsCron, which provides another alternative for Rails users.



I've stumbled across several great snippets of Ruby code on the Web in the past few weeks, and rather than bore you with a post on each one, here's a whole collection at once:



Evan Weaver had a basic problem to solve:


Benchmarking with httperf is a new screencast by Geoffrey Grosenbach in his Peepcode series of Ruby / Rails related videos. It costs $9, but for that you get a bundle of source code and a very high quality video of 53 minutes' length.
Following on from the bumper Ruby interpreter performance tests by Antonio Cangiano two weeks ago, Xue Yong Zhi decided to run the same performance suite on XRuby Ruby to JVM compiler and found that XRuby is faster than the Ruby interpreter in 26 out of 38 tests. It's interesting to note that the failing tests are the same as those for the official Ruby interpreter on Windows (stack exhaustion?) so in the scope of these performance tests XRuby appears to be more feature complete than interpreters such as Cardinal and Rubinius that fail many of the tests.


Heiko Webers writes:
A month ago, Pat Eyler (On Ruby), Apress, and I launched a Ruby blogging challenge with the question, "How Has Ruby Blown Your Mind?" .. There were 18 solid entries, and one late entry by Sean Hussey that I think would have won if it hadn't come late. The eventual winner was Ruby Blocks as Closures by Gabe de Silveira, and he wins three Apress books of his choosing. Well done Gabe!

Mike Clark has put together a stunningly simple tutorial covering how to create a complete file uploading and image resizing system in mere minutes using Rick Olson's attachment_fu plugin. What impresses me the most is that he shows how attachment_fu can automatically store uploaded files on Amazon's S3 service with only a few tweaks. This is a must read for Rails developers who haven't brushed up on their file upload techniques lately.


Jonathan Conway of New Bamboo (more on this at the end of this post) has put together a rather comprehensive walkthrough on using mocks with Rails and using them to define your interfaces. Not having cut my teeth with mocks yet, I took the rare step of asking for a personal summary of the article by the author himself, and Jonathan delivered!




(photo credit: mrpattersonsir)

This post just links to a few Ruby videos I've found on Google Video that I hadn't seen before.
Antonio Cangiano has put together a reasonably meaty list of 10 Ruby on Rails performance tips. On the surface, his advice seems pretty good, but Rails veterans Evan Weaver and Josh Susser have quickly stepped in to question the motivation of Antonio's suggestions. Step into the debate or just enjoy some reasonably effective, if sometimes misguided, tips.
