Couchbase on Azure: A Tour of New Windows Azure Features

With the recent announcements of new capabilities in Windows Azure, particularly the support of a persistent Virtual Machine instance, a multitude of opportunities emerges to host just about anything that will run on Windows or Linux (yes, Linux!) inside the Windows Azure cloud. To explore some of this new functionality, I thought I’d start by creating a Couchbase cluster and building a simple Web application that accesses the cluster – all in Windows Azure, of course.

is an open source, NoSQL offering that provides a distributed, in-memory key-value data store having 100% on-the-wire protocol compatibility with memcached. Formed by the merger of Membase and CouchOne in 2011, CouchBase’s current release, 1.8, leverages SQLite as a persistence engine, and its next release, 2.0, replaces SQLite with CouchDB bringing with it such features as map-reduce and materialized views. Couchbase additionally has a strong client ecosystem with SDKs for a number of languages, including .NET.

I’m going to leverage work that John Zablocki, Developer Advocate for Couchbase and leader of the Beantown ALT.NET Group, has underway for his .NET audience. He’s built a ASP.NET MVC 3 application called TapMap (sort of a FourSquare for mpyraphiles), so the goal of this exercise is to set up a Couchbase cluster with his sample database using the new Virtual Machine feature and then deploy the ASP.NET MVC application as a traditional Web Role Cloud Service. Both the Couchbase cluster and the ASP.NET MVC application will run in the confines of a Virtual Network so the application can communicate directly with the database, but only administrative access to the cluster itself will be publically exposed. 

In pictures, the architecture looks something like this:

Couchbase on Azure architecture

There are several significant architectural facets at work here, and while this specific exercise uses Couchbase, the concepts and Windows Azure configuration steps largely apply to other mixed mode application scenarios. Given that, I’m going to split up what would be a really, really long post into a series of articles that cover the major features being leveraged by the application and thereby demonstrate how to:

Note: the completed application was deployed to, but depending on when you are reading this post, it may no longer be publically available.