Cloudy, with a chance of open source
In our quest to be completely buzzword-compliant, we’ve implemented Backboard and embedit.in as “cloud computing” applications; that is, the servers on which they run are virtual private server instances. It’s great: we can add as much capacity as we need without having to acquire and set up hardwarea and scale to traffic dynamically.
One piece of software without which this would be much less enjoyable is the RightScale libraries, released as open source by RightScale. They’re great, wrapping all of the Amazon Web Services APIs — and Amazon’s competitors’ APIs, too — in a straightforward, well-documented Ruby library. It’s interesting that RightScale is doing this open source play, since their bread and butter is creating deployment solutions and magic scaling sprinkles for cloud-hosted applications. But their libraries are solid and comprehensive, to boot.
Installing them is:
sudo gem install right_aws
after which you can use them from IRB or from Capistrano or from your application. No downloading one set of Java command-line tools for EC2 and a a Firefox extension for S3. No configuring environment variables and setting up a Java Runtime Environment. Easy!
One caveat to point out if you’re using JRuby: the jruby-openssl library doesn’t support SHA-256 for generating HMAC signatures, but it does support generating SHA-256 digests. This defeats the mechanism in right_aws for figuring out how to sign Amazon Web Services requests. To work around and force SHA-1 for request signatures, this monkey patch works:
# Icky, icky monkeypatch.
module RightAws
def AwsUtils.blow_away_sha256
class_variable_set '@@digest256', nil
end
end
# Called later:
RightAws::AwsUtils.blow_away_sha256
We love the RightScale libraries for their completeness, allowing us to avoid learning a new library for every place we might want to do something with cloud computing or web services.




