Comparethemarket.com shifts to Node.js from Microsoft .Net as it migrates to the cloud

Comparethemarket.com, the popular financial services price comparison website, is moving away from relying solely on the Microsoft .Net platform by delivering services using the open source Node.js platform as it continues its move towards migrating to the cloud.

The shift comes as the organisation trialled the Amazon Web Services (AWS) cloud for its travel-insurance comparison service in autumn last year, and was used to get the recently launched Meerkat Movies initiative up-and-running. It also coincides with a shift from Microsoft SQL Server to MongoDB as the organisation's main underlying database for delivering its services.

"We have historically been a Microsoft .Net shop. We had been through a trialling process and decided that Node.js is a viable alternative, and used it for a few, tentative services. Node.js now sits alongside .Net as a production platform option" says Matthew Collinge, associate director of technology and architecture at Comparethemarket.com.

With Node.js, the engineers at Comparethemarket.com found that they could get up and running more quickly, swapping the Microsoft .Net IDE for a text editor and Node.js instead.

"It's a little bit different, but our engineers are quite 'polyglot'. We do a lot of front-end Javascript, so it wasn't too much of a jump for them, provided that they had written in Javascript on the front-end before," Collinge told Computing.

"I guess that, as an engineer if you had only experienced .Net and had never touched any Javascript, there's probably something of a learning curve to overcome in terms of some of Javascript's idioms, but not too much of a jump," he added.

Where experienced Microsoft .Net engineers might struggle, he continued, was in terms of the asynchronous programming within Node.js, but these concepts had also been emphasised in Microsoft .Net with the release of version 4.5 and is something they need to get used to in order to write highly performing applications.

"For me, I think the biggest risk of going down the Node.js route was that it's dynamically typed instead of statically typed, so the importance of testing is that much higher. Fortunately, our principles of pair programming and of writing everything test-first has protected us from some of the pitfalls we could have fallen into," said Collinge.

Stuart Greenhall, senior software engineer, did admit to some nostalgia for the integrated Microsoft .Net development experience. "We have missed IDEs a little bit. Using Visual Studio with C#, if you are very good with the keyboard shortcuts you can build lots of code very quickly and get into a nice flow.

"Now, we basically all use a text editor. The engineers really like it, but sometimes you'll want to do a refactor and it would be really nice if you could do control-shift-R and move some stuff around with the wizard... It's just a different way of developing software," said Greenhall.

Collinge added that the move from .Net to Node.js also freed the organisation from being tied down to Microsoft and Windows in particular, especially as the prefered cloud-based instances they use in AWS are Linux-based.

"Start up times for Windows instances are an order of magnitude slower than Linux instances," said Collinge. "I think that will change when Microsoft finally releases Windows Server 10."