Friday Nov 21, 2008

A New Sun.com Homepage

You've probably noticed by now that Sun.com has a new homepage.  If not, go take a look!  It's quite radically different from the old one, design wise, and initial feedback seems to be mostly positive.  I'm going to ramble on a little bit about it... what's changed, technically, from old to new; how we ensure speed and efficiency; and how we run our testing and QA. 

From a technical implementation point of view, the new homepage is actually less complex, in some ways, than the old one.  This is mostly due to the removal of blog content - and a shift back towards mostly statically-defined data (when I say static, I mean authored in custom XML files for direct inclusion, as opposed to dynamically pulled in from other sites/data sources).  The old homepage pulled in blog entries from http://blogs.sun.com.   As with any external data service, measures needed to be taken to ensure good service even if http://blogs.sun.com  had an outage.  Fallback content was defined, so that if any problem occurred in trying to load blog content, static content was displayed.  This was then wrapped in our usual caching layers to ensure a good mix of freshness and speediness.

These measures were tested one day, when http://blogs.sun.com  suffered a short outage - and the homepage fell back gracefully.  On Sun.com, we often pull data from other sources into our pages - for example Technorati blogs and product reviews - and we always include a graceful fallback mechanism to ensure we don't get ugly errors on our pages.

Back to the new homepage - one of the biggest changes you'll have noticed (apart from the overall colour palette refresh) is the ability to select an audience and see targeted promotions and features.  It's a pretty slick experience that loads in relevant features and promos via AJAX - with an element of randomisation, if necessary.  And guess what?  It's powered by UUIDs.  If you read one of our earlier posts, you probably know that we make heavy use of UUIDs for identifying products - amongst other things.  This is a good example of one of the other things. 

Each audience has a UUID, which content authors tag against features and promotions to mark them as relevant.  When you select an audience, our server side code (Java of course) checks for features and promotions relevant to the UUID, and returns them (or a random selection of them, if there are several available).  By relying on UUIDs, we can change labelling as often as we need to without disturbing the implementation. 


The downside to having such a breadth of content available through the homepage is the caching implications.  Obviously, we need to make heavy use of caching to ensure a quick download.  For the audience-targetted features and promotions, there could be hundreds of combinations to choose from, which results in some pretty long cache keys.  As a developer, this kind of thing scares me - getting the caching wrong for the homepage could result in some pretty weird results being served... and it being on the homepage, it's sort of obvious if it breaks.

And this brings us on to testing!  We run UAT with our primary publishers in three separate environments - our work in progress preview (which has no caching), our stage preview (which has caching), and our external preview (which is outside the firewall, and has caching - the most production like environment we have).

Recently, all QA within CME has been shared with a specialised QA team in DotSun.  This major update was the first time the homepage had been run through their QA processes, which was somewhat stressful - trying to get good tests while working to short deadlines is not easy.  Whilst working with the QA team to iron out issues in our LoadRunner tests, engineering ran some of our own tests using thrasher, so we could measure performance and identify whether we needed to be worried about our implementation.  Thankfully everything came together in good time, and in addition to a homepage that performs well, we also have a set of LoadRunner tests that will serve us well for the future.

All in all, there's a lot of work that goes into a new homepage - design, content gathering, engineering, QA, authoring, publishing.... All of these functions within Sun rallied together to deliver a new homepage on a short deadline, to the same standard of quality we expect of ourselves - hope you like it!