MixRadio's journey to a common code base and the Windows Azure cloud

Published by at

Two blog posts on Nokia MixRadio's engineering blog offer an insiders view of some of the engineering processes and best practises that go into creating the cross platform music discovery and streaming service. The first explains how MixRadio has moved towards having a common codebase across its app portfolio, while the second explains the process of moving the backend of the service to Microsoft's Windows Azure cloud platform.

MixRadio's common app architecture

Nokia's MixRadio app and service is available on a range of devices and platforms. It may have originated on Windows Phone, but it has since spread to Windows 8, the web, Asha, Nokia X, and even HERE's car head unit concept. It was clear such an expansion would result in code duplication, so plans to define and build a common platform and app architecture for the service have been in place for some time.

As MixRadio's Nathan Randle explains a target architecture based on the MVVM design pattern was defined in order to "share as much code as possible between our various client applications":

MVVM facilitates separation of the UI from the business logic, and generally the UI is app specific whereas the business logic is common across our apps. Each application should contain the minimum amount of code, ideally only views and anything else that is specific to the platform of that particular client. The rest of the code – all business logic, ViewModels, and models should be shared code used by all apps.

MixRadio

Randle goes on to detail the MixRadio's team journey with each platform, from Windows Phone to the Nokia X. The first contains more legacy code, but the Nokia X client has been built with the common app architecture in mind from the outset.

Aside from being interesting from a technical point of view, the approach taken by the MixRadio engineering team has real benefits for consumers too because it leads to a common MixRadio experience between different (and new) platforms and means new and updated features arrive faster because the underlying code is easier to maintain.

More generally, this is also the latest chapter in the impressive MixRadio development story. Given Nokia's early track record with creating services under the Ovi brand, the evolution of Nokia Music into Nokia MixRadio is something that deserves to be more widely appreciated and celebrated. 
   

Moving to the Windows Azure cloud platform

A second post on the MixRadio engineering blog details the way the development team transitioned the service to Microsoft's Windows Azure cloud platform from the previous on premise storage platform, media management and delivery services, which allowed them to "concentrate on providing end consumers with a slick and performing media delivery service".

The majority of this transfer took place more than a year ago (i.e. 2012), and while the planning and technical details may only be of passing interest to most people, there's a few stats worth highlighting. The transfer process involved migrating more than 147 million files, in 274 days, with a total size of 943.17TB (equivalent to more than 700 million floppy disks), resulting in an estimated saving of €2.9 million.

The initial home for MixRadio's data was split between Azure data-centres in Dublin and Amsterdam. Here's how MixRadio's Deon Fourie describes the visit to the Dublin location:

It is a purpose built facility costing in excess of a €500 million and no words can describe the impressiveness of their operation. Thousands of miles of dark fibre, 2 terabits redundant connectivity, Caterpillar engines that would make any petrol head drool, a floor full of batteries providing UPS to the data centre for the few seconds it takes to fire up the engines in the event of a power outage, natural cooling, hundreds of thousands of servers with flashing lights, cable management that is best described as artwork, hardware renewal logistics, … there’s even a moat around the facility to stop armoured vehicles from driving in, simply amazing!

MixRadio

The Windows Azure cloud continues to power the MixRadio service to this day and continues to take advantage of new Azure features. For example, Azure Points of Presence mean streaming media is located (geographically) closer to the consumer, improving performance.

Today it is a very different story, we are leveraging Azure Points of Presence (PoPs) to have our streaming media located closer to the consumer. We have five PoPs deployed running compute and three of them include media, geo-replicated from origin in Dublin to the various regions. We have seen significant improvements in our response times across territories in APAC, the US, and of course Europe by directing requests to their nearest PoP. If we need to encode our catalogue to a new media type, today we can do that in 24 – 48 hours, something that used to take us months before.

So there we go - some fascinating insight on what goes into powering Nokia's ground breaking music streaming service. Raise a glass to the engineering teams next time you're rocking away to your favourite mix.