Robust Software

Tales of a code samurai

Heroku in Europe

I tweeted yesterday (25th Jan 2012) to ask if anyone knew of a solution as convenient as Heroku but based in the UK or Europe.

The reason I asked was at Zopa we are thinking of migrating our front-end over to a Ruby stack and Heroku was the obvious option for hosting such a solution. However, as 95% or more of our traffic comes from the UK it doesn’t make complete sense to host our website outside of the UK or Europe at worst.

I got a lot of interest from Twitter as to whether I found anything but no suggestions of similar services based this side of the pond. At the same time I sent an email to Heroku’s support asking if they had any plans to give an UK or European hosting option.

Heroku got back to me yesterday evening and said they have no immediate plans for server resources outside the US but they are working on Safe Harbor certification if your concerns are of a more legal nature. They also confirmed that they are hosted within the US East region of AWS which is better than West for Europeans.

Their suggested strategy is to use a CDN alongside Heroku so that the majority of your assets will come from a local source and only your dynamic content will come from the US.

This probably rules out Heroku for us at Zopa as a CDN adds needless complexity for us given our traffic volumes and the fact that almost all of our traffic is from the same location. However, I thought I should knock a blog post together to share what I found.

DDD North - Introduction to Backbone.js

Yesterday, I gave a presentation on Backbone.js at the inaugural DDD North. My thanks go out to Andrew Westgarth and his team for organising it, it was a great event.

I was a bit nervous as it was my first time speaking at a conference and I think it showed. I rattled through my presentation at break-neck speed, unfortunately finishing well under my allocated hour. Niall Merrigan gave me some tips for sorting that out so I’ll hopefully be more composed next time!

I’d like to thank everyone who showed up for my talk and look forward to receiving their feedback. The slides for my presentation are now up on Slideshare and the code I demonstrated is available on Github.


I came across Finagle a few weeks ago, it’s:

… a protocol-agnostic, asynchronous RPC system for the JVM that makes it easy to build robust clients and servers in Java, Scala, or any JVM-hosted language.

And they’ve now written a blog post announcing it to the world. I had a skim over it before but it looks like they’ve added to the documentation since then.

I’ve been looking for a framework for writing servers in Scala, the Play framework is on my radar for web applications, and this looks like a great contender.

The Most Important Code Isn’t Code

I cannot stress how much I agree with this. I’ve come to exactly the same conclusions as Zach in the last year myself. I wish I had written this post myself!

Here are my highlights:

Documentation is the best way to communicate your thoughts to yourself.

Forcing myself first to consider the API, the interface, and the end result led to a clarity that inspired less code and a more impactful project.

It improves the clarity of my code. I get more done in less lines.

But documenting your code is cool as hell. More importantly, it makes me feel more confident about my own code.

Go read the whole thing now!

How to Keep Your Software Awesome

There’s a whole school of thought that quantity of features is directly
proportional to what you can charge for software. While clearly this is true in
practice, that doesn’t mean that it’s not incredibly stupid. Every new feature
makes your software more complex to use.

Tags Are Magic!

The Guardian produced a interesting series of blog posts on how they use tags to categorise their content, display related articles and so forth:

Pragmatic Web Service Design

Web services are a crucial part of most solutions nowadays, I spend a significant portion of my time designing and writing them and I have read a lot about them to make them better, faster and more resilient each time. This is a summary of how I approach web service design and the things I bear in mind.

Cross-site XmlHttpRequest With CORS

I was working on a personal project over the Christmas period and wanted to make cross-site requests from an AJAX client to an API.

As the client and the API were hosted on different domains they violated the same origin policy implemented by almost all browsers. Modern browsers allow cross-site AJAX requests if the API allows cross-origin resource sharing (CORS).

The resources I found at the time on this were a little bare on details but I managed to piece it together and get something working. I was planning on writing a blog post about how to do it but now I know all the terminology I came across this complete article that explains CORS very well, linking to several useful resources.

Why Rack Should Matter to .NET Developers

There’s been a lot of talk in the .NET community about Sinatra clones, namely Nancy and Nina in recent times but there are several others as well. Unfortunately, all these frameworks are missing the underlying reason that Sinatra is awesome and that is Rack. Sinatra packs a hell of a lot of functionality yet weighs in at 1198 lines of code including documentation. The main reason for that is the fact it is building on top of Rack which has allowed the authors to concentrate on creating a framework without having to worry about the details of dealing with server requests. So what is Rack, why you should care and why does it matter to you as a .NET developer.