Architecture

Catalyst::Engine::Stomp after 0.16

We use Catalyst::Engine::Stomp for all our ActiveMQ consumers. It works rather well, and (especially with the addition of our Net::ActiveMQ) makes working with queues mostly painless.

But there is always room for improvement. There were two main missing pieces:

  1. generalisation of the subscriptions and inputs, from “a queue per
    controller” to “one subscription per controller”
  2. dispatching to an action based on the JMSType header, instead
    of the ad-hoc @type body attribute we have been employing

This is the story of how I implemented both.

Continue reading

Software Engineering

Agile Tetris

Tetris. Reading this should strike a nostalgic chord with most if not 100% of us born into the computer generation. If you’ve never heard of it then you’re either less than 3 years old or you’re asking what a computer is. Well for the benefit of those people I’ll try to summarise.

Its a puzzle game based around the idea of having different shapes made up of four blocks falling from the top to the bottom of the game area and settling at the bottom. The idea is to complete a row by filling in the gaps, at which point the row will disappear. The game space is a fixed number of rows so you need to be careful rows are removed regularly else the entire game area is filled up and the game is over. To the side of the game area usually it’ll show you the next piece – this is invaluable in planning where to drop your current block. As you remove more rows the speed of the falling blocks will increase and it becomes a challenge of how fast you can think and plan the blocks.

Continue reading