Log in

No account? Create an account
Games Magazine Contest Part 2: Amazon EC2 - Blather, Rinse, Repeat
January 10th, 2009
08:02 pm


Previous Entry Share Next Entry
Games Magazine Contest Part 2: Amazon EC2

So, I mentioned using Amazon's Simple Queue Service (SQS) in a previous post. That service was set up to make it easy to ramp up machines in a server cloud and have them be able to talk to each other in a scalable fashion.

My current plans don't require all of this fanciness, but I used it as an excuse to set up and run an Elastic Compute Cloud (EC2) instance. I walked through the Amazon documentation, which started with me setting up some tools on a local machine (well, "local" meaning that I was sitting at a Windows machine, using SSH to use a Linux box down the hall). I then configured environment variables and pointed some tools at my certificates, and almost before I knew it, I had issued a request to create and install a disk image on a machine (somewhere on the East coast of the US?).

My disk image didn't include a web server, so one of the steps to verify that the machine was up and running was to enter the external name of the instance into my browser's window, which failed. Nevertheless, I could SSH (from the Linux box down the hall, which if you recall I was SSHing into from the Windows box) to the new machine.

I proceeded to install emacs, httpd, and python-devel (no good reason on the first two, just habit, I guess), and I uploaded (er? downloaded?) my word search program to the machine.

In the above screenshot, you'll see two windows. On the left, in black on white, you see my word search program running on the EC2 machine. On the right, in white on black, you can see my collation process getting results from a variety of machines, including the EC2 machine.

Some random things to note:

  • you can see a "solution" to the puzzle on the left. As I mentioned before, the goal of the contest is to put words into a provided pattern. The pictured solution is a valid candidate, but the contest is about putting as many words as possible into the provided template. Suffice it to say, I have done better than 7 words. What I'm saying is that I'm not worried about you taking that solution and winning the contest.
  • on the right, you can see several hostnames with scores. There's a variety of machines represented, including a PowerMac G5, a Windows 2000 box, two Fedora 10 machines, and the new EC2 machine (running Fedora 8). If you look closely, you may notice that the scores for an individual machine jump around. Almost all of that effect comes from the behavior of SQS, which does not guarantee in-order delivery of messages.
  • a little more inspection shows that yes, I was up on a Saturday night working on a word search project over the network. I won't say "up late at night" because the time displayed on the left hand screen is a GMT+5 clock, and I'm GMT+8. Still.
  • last I checked, I owe Amazon $0.05 for the use of SQS. Message passing is relatively cheap compared to CPU cycles. I'm going to shut down the EC2 instance pretty soon here, as I've achieved what I intended to from the exercise.

(Leave a comment)

My Website Powered by LiveJournal.com