Archive for May, 2012

Yesterday I had the chance to speak about windows azure at a Microsoft Azure camp event. People seemed very exited and stayed till late in the evening asking questions, writing code and publishing services to the cloud. Attendees also showed great anticipation for the spring release, and the future of the platform. So when I saw the announcement of the Meet Windows Azure online event this morning I thought “…damn missed that for a day, I could have let everyone know yesterday about the release date” Smile

Anyway this is something that you should not loose, register now and find out what’s the future of Microsoft’s cloud platform.


Five years ago my primary hard disk failed taking some of my precious data like family pictures, videos, personal files and code away for ever. I was able to recover some but had to pay a hefty fee to the service guys. After the “melt down incident” I’ve decided to keep triplicates of my data to 2 more disks to avoid this from ever happening again. Setting this up though was quite a pain since I use a laptop and I’m constantly on the move, so I had to remember to sync everything the minute I got home to avoid losing anything.

From time to time I considered moving my data to the cloud to avoid all the hassle and worries of syncing the data but to also be able to access those from where ever I was. There were a couple of services I’ve looked at but two things were keeping me from going through with this, the price, and the trust (not that someone would steal my data – who would care about my children photos after all, but what happens if the company is sold, closes, its hardware fails and so on).

Microsoft’s SkyDrive would have been the perfect solution for my problems, it was free (now it’s very cheap – free for 25GB and 100$/year for 125GB) and I could trust Microsoft with my data, but it didn’t have a desktop client that would automatically sync those to the cloud, well… that is till last week. Last week Microsoft released preview versions of SkyDrive for Windows and Mac, along with updates for iOS and Windows Phone. With SkyDrive on my desktop, I can now store and access files in the cloud right from any of my PCs or anywhere in the world and not worry of loosing anything.

But that’s not all, what’s most important is that together with the release of SkyDrive desktop app Microsoft released a set of REST based APIs – the next version of the Live Connect APIs and the newly created Live SDK that can be consumed by any platform and device bringing my data to all my devices Desktop, Windows 8 Tablet and Windows Mobile Phone 7.


Here is a sample HTTP request to retrieve a list of a user’s entire set of folders in SkyDrive:



User-Agent: Fiddler


The above request returns the following JSON result set for my SkyDrive account: 



    "id": "folder.616444ee7a34f417.616444EE7A34F417!12045",

    "from":{"name": "Dare Obasanjo",

    "id": "616444ee7a34f417"},

    "name": "Wave 4 Feedback",

    "description": null,

    "parent_id": "folder.616444ee7a34f417",

    "upload_location": "!12045/files/",

    "count": 14,

    "link": "!12045&parid=616444EE7A34F417!1967",

    "type": "album",



       "access": "Everyone (public)"


    "created_time": "2010-07-14T13:28:48+0000",

    "updated_time": "2011-07-18T03:40:07+0000"



Uploading files is similarly straightforward. Applications can use either HTTP PUT or POST requests to upload documents, photos or videos to SkyDrive at the folder’s upload location. It should be noted that not all file formats are supported for upload to SkyDrive.

Below is an example of uploading a text file using HTTP PUT:


Hello, World! 

and here’s what the same upload looks like using HTTP POST:


Content-Type: multipart/form-data; 



Content-Disposition: form-data; 



Content-Type: application/octet-stream 

Hello, World!


These are just a few examples of how easy it is to interact with SkyDrive using nothing but regular HTTP. Other operations such as editing, copying or sharing files are similarly straightforward. For an easy way to try the Live Connect REST API for yourself, visit the interactive SDK.

So what do you think, ready to write your application using SkyDrive as the storage engine?

One of the challenges any company faces when developing multi tenant applications based on Windows Azure is how much will the tenant be charged for the services offered. The problem is more apparent in cases where the customer is not charged with a fixed monthly rate but according to the service usage (pay as you go model). Till today one had to manually track and monitor service consumption in order to be able to establish each tenant cost and adjust the billing accordingly.

meteringToday though the Azure ISV team in DPE announced public availability of Cloud Ninja Multi-Tenant Metering Block (CNMB).  CNMB enables SaaS ISVs to meter tenant-level consumption of various Windows Azure resources such as bandwidth, storage, SQL Azure, and compute.  CNMB provides tenant-level meters, application level aggregates, rich query model based on OData, extensibility to implement customer meters.  It comes with out-of-box meter providers for bandwidth, storage, SQL Azure, and compute.  In future CNMB will add providers for Tomcat and CDN.  Also it is very easy to write custom provider if ISV wants to meter application specific resources.  CNMB includes an HTML5 portal to visualize tenant and app level usage.  But all data can be queried using OData API, which enables interesting mash-ups in PowerPivot and integration with external systems like billing. 

mettering2You can try Live Demo here and download full source code from CodePlex.  The live demo is currently metering our Cloud Ninja application.  When you try the demo, check out links on home page to app-level, tenant-level usage, PowerPivot dashboard, and OData feed.

CNMB is:
1.    Easy to Use: CNMB works with existing multi-tenant SaaS application in a non-intrusive manner.  It needs simple configuration to point to SaaS application’s storage account and SQL Azure database and simple regular expressions to associate tenants with resource consumption. 
2.    Economical:  CNMB can be deployed in a single web role, which hosts UI, Web Services, and metering workers.  Data schema is optimized so that 1GB SQL Azure database can hold an entire year’s worth data for thousands of tenants.
3.    Standards Based: All data in and out is via authenticated OData API.  OData allows rich query model on top of meter data.  We support both JSON and Atom payloads.  This enables 3rd party apps like PowerPivot and external systems like billing to consume meter data through industry standard API.
4.    Extensible: CNMB has multiple levels of extension points from writing your own tenant resolver, defining customer meters, and developing customer meter providers.

Another great tool added in our arsenal to help us maximize our cloud usage benefits by adopting the Multi-Tenant model for our applications.