Azure Service Management API – via C#

I previously published an article showing how the Service Management API and the csmanage tool could be used to aid in the deployment of your Windows Azure application as part of your daily build.

Once I had began playing with the API’s, I wanted to be able to use them within an application so that I would be able to create something like a simple dashboard for managing your services without calling to csmanage all of the time.

Dominic Green - serviceManagementI started to do this by building up the REST requests within the application and performing a HTTP GET from my application. However, I then found this very handy library from Microsoft that has done the leg work around all of the calls needed for the service API (almost like a Blue Peter, here’s one I made earlier).

You can see in the code below that to utilize the library, we first need to create a ServiceManagementHelper class. This class will then be used to call out to each of the available services. To create this helper class we need to pass in a reference to an endpoint in app.config (show further down) and a reference to the certificate uploaded to manage our service.

namespace serviceManagementConsoleApplication
{
    class Program
    {
        private const string subscriberID = "...";

        static void Main(string[] args)
        {
            var serviceManagment = ServiceManagementHelper.CreateServiceManagementChannel				   ("WindowsAzureEndPoint", new X509Certificate2("insertcert"));

 	    var x = serviceManagment.ListHostedServices(subscriberID);

            foreach (HostedService s in x)
            {
                Console.WriteLine(s.ServiceName);
            }

            Console.Read();
        }
    }
}

As you can see in the code once the helper is set up we can call any of the services such as ListHostedServices which will return an list containing each service we have hosted in our account.

As mentioned above we need to have an endpoint set up for the helper class to call out to, the configuration for this is shown below.


  
    
      
        
          
          

          
        
      
    
    
      
    
  

With the configuration set up and the sample service management API library, we can easily get any application to call out and manage our cloud services.

Download the sample library here.

Azure Data Centres open Worldwide?

azureEuropeAsia  

This afternoon I noticed that I was able to select Europe and Asia regions to deploy my Azure application.

I have yet to see official word of these locations being available, but this must be for the move from CTP to production.

NxtGen Oxford – Presentation Blues

leedsoxfordBad news guys … I am unable to present at the upcoming NxtGen Oxford. I have just started a new and exciting project up in Leeds and therefore will be unable to get back down to Oxford in time for presentation. It does mean I will have even more content for my presentation when I eventually do get the opportunity to do it.

However, every cloud (pun intended) has a silver lining  and this one comes in the shape of Dave McMahon who will be stepping in for me to give a great presentation on SharePoint:

SharePoint Starting Point

SharePoint is one of Microsoft’s biggest success stories. It’s grown from a Document Management system into an Enterprise Platform capable of being scaled out to serve thousands of users, provide a platform for BI, CMS, EDM and a whole bunch of other stuff. But how exactly does it work?

I would like to say a big thank you to Dave for doing this at such short notice.

That’s not all we still have Ben Nunney presenting on “The Power of PowerShell” which promises to be a great talk, showing how developers can really get the most out of PowerShell.

Finally, if anyone is around Leeds and fancies a cheeky pint, let me know :)

Google Reader in Outlook

You know what really grinds my gears…  having to download multiple applications when the functionality should be in one place.

RSS applications are one such pain area, why would I want to have to load up another application each morning, especially when I live in Outlook.

I had previously used NewsGator to sync my feeds online and to Outlook using NewsGator Inbox, however for some reason after the last reformat of my machine I couldn’t download the app. So set about trying to find a new RSS reader for Outlook.

The results of my tinkering was finding that I could get Google Reader to work a treat within Outlook. All I had to do was alter some of the Outlook RSS folder properties so that it pointed to the Google Reader URL.

Outlook Properties - Dominic GreenOnce this had been set up the first time you click on the RSS folder you are prompted to log into Google Reader. You will now be able to view all your feeds from within Outlook or on the move.

Outlook and Google Reader - Dominic Green

Google Gears and offline mode didn’t seem to work so great within Outlook, although the posts were accessible offline no images were downloaded with the posts. Maybe this is something I’ve done wrong when setting up Gears, if anyone has a workaround for this would be great to hear it.

Keeping an Eye on Earth

Over the past few months I have been part of an extremely exciting project, I am pleased that I am finally able to share it with you.

Eye On Earth is a new application that provides air and water quality to more than 500 million people across Europe, using both measurement stations and modelling data, along with social observations from people around not only Europe, but the whole world.

This is one of the first applications to be built and run on Windows Azure and SQL Azure allowing near real-time data to be presented at air stations and in a Europe wide air quality model.

Eye on Earth - Dominic Green

Environmental issues, Bleeding Edge Solution

Eye On Earth uses a number of bleeding edge technologies including Windows Azure, SQL Azure and Silverlight to bring a rich user experience that can be scaled on demand whilst still processing all the near real-time data.

One of the first things that you notice when you visit Eye on Earth is how great it looks- it really shows off what you can do with Silverlight and the latest Bing Maps Silverlight Control.

Windows Azure is at the core of Eye On Earth and is not only used to host the front end, but also on the back end sits on it too – with a number of worker roles that are used to process compute intense tasks, without effecting the performance of the front end.

Eye on Earth is heavily focused on data, all of which is stored and queried using SQL Azure, along with this the application has large volumes of data being entered at near real-time from the European Environmental Agency.

But I Don’t Have Silverlight …

Eye On Earth will still love you. While it was primarily designed to be run as a Silverlight application, but with not everyone being able to use this technology, a parallel site has also been created using ASP.NET (along with some blood, sweat and tears). The ASP.NET version not only allows you to run the application anywhere – it gives you the vast majority of the features you would see in the Silverlight version.

Along with ASP.NET the team utilized jQuery and the recently released Microsoft AJAX Content Delivery Network (CDN) to give all the rich user interactions without the power of Silverlight. When being re-directed to this version of the site you can hardly tell the difference between what you would have experienced in Silverlight and what you see in ASP.NET

Quick Tip – turn off Silverlight and check it out.

Lighting up Europe

 

Light map showing stations across Europe - Dominic Green

Eye on Earth has a number of “light maps” that are overlaid on a Bing Map controls to show a visual representation of both the air and water stations as well as user feedback.

Different coloured dots are used to visualise where the measurement stations are and allows users to zoom in and view more fine grained data.

User feedback, for both air and water quality can be turned on and off at the top of the map control and will show a colour coded display of where users have rated the air or water in a given location. These user ratings are coloured differently to the official readings, so that the user will be able view the social rating of given areas.

As more users rate the air and water quality around the world the light map will automatically re-generate and show an updated view of the social ratings.

Each of the light map tiles in the application have been generated using using a number complex algorithms, and processed on Azure worker roles before being stored in blobs for retrieval when a user views the site. This makes it much easier to create the tiles in parallel over multiple nodes, ensuring that the process is both fast and efficient.

Modelling Air Quality

 

Air Quality Model - Dominic Green

You can also see air quality models put together by the European Environmental Agency on an hourly basis. With this model, users can be given a overview of the quality of the air around Europe from either a heat map, or placing push pins.

As this data arrives it is directly input into SQL Azure and processed, and passing the a number of compute tasks to Azure worker roles so that the images are generated correctly and displayed in the fastest possible manner.

Station to Station

 Eye On Earth, measurement stations - Dominic Green

As you zoom into the map within the Eye on Earth application measurement station appear as icons. Round icons represent water stations and the square icons with a wind-sock represent the air stations.

Station Data - Dominic GreenYou can mouse over or click on individual measurement stations, to view more in depth data about the given station. On the left hand side the station will show the official EEA rating and a break down of the measurements that give the station this rating. On the right social user ratings are displayed, giving an idea of how the general public rate the air or water quality at the given location.

As you can see in the image this station has a good user rating, but a rating of very good from the EEA.

As more users rate the station or the air in surrounding areas, the word cloud on the left will update giving an idea of keywords that users have selected when rating the quality at this location.

Eye on Earth also displays historical water data on the water stations, allowing the user to see what the station has measured the water to be like over the past couple of years. Along with a yearly update seasonal updates will be displayed, showing how the current water season has been for the location.

We Live in a Social Environment

It’s not just the EEA that get to put data on the site – as a user, you can rate the quality of air and water in your region too.

Rating a location is simple, all you need to do is identify how good the air or water quality is at this location and then select one or more rating keywords that best describe the area.

Sharing the data at a given location can be via a number of social networks, including Facebook, Twitter and Live Spaces.

Eye On Earth, Rate - Dominic GreenEye On Earth, Share - Dominic Green

 

I Can See my House from Up Here

Viewing the air data within Europe is not restricted only to the measurement stations within the application. Using the air model we allow users to place pushpins anywhere on the map, and if this is within the data areas for the model it will return what the quality of air is at that location.

The user will then be able to rate or share the information at this pushpin location as if they had viewed the data from a measurement station.

If the pushpin is placed outside of the air model for Europe no air data will be retrieved, however you will still be able to rate the air at the location, using the rate button. This allows something that doesn’t exit anywhere else – a worldwide air quality indication generated by users.

Data On the Go, via SMSSMS - Dominic Green

Users wont always be in the comfort of their own home or workplace  and therefore not always have access to a computer – and so it was a logical step to build a mobile solution into the application for the user to get data on the move.

Eye On Earth has a SMS service that allows users to text in their location, and retrieve an automated response showing what the quality is like at the given location. 

Je Ne Comprends Pas

It’s always easy to forget that English isn’t everyone’s first language – and over the next couple of weeks we’ll be adding 24 additional languages to the Eye On Earth site, enabling more and more individuals to benefit from the site via Silverlight, ASP.NET and SMS.

Eye on Earth will automatically detect your locale as it loads, and switch not only to the correct language but also giving you localized map controls.

And Finally…

Eye on Earth is a stunning, elegant and full featured application that allows businesses, governments and individuals from around Europe to view and rate the air and water quality where they are, using the latest technologies such as Azure and Silverlight. All of this data contributes to the biggest, most up-to-date Europe wide map of air and water quality publicly available on the Internet.

Go to www.eyeonearth.eu and try the site yourself.

NxtGenUG Oxford – January 2010

Oxford - Dominic Green The guys over at NxtGenUG Oxford have invited me along on the 5th of January 2010 to give a talk on Windows Azure and to share what I have learned over the past couple of months whilst developing on the platform.

Along with my talk, Ben Nunney will be giving a presentation on Powershell for developers. Showing how developers can make PowerShell work for them, whilst proving that the command line is still cool.

Here is a breakdown of the event with overviews of each talk:

Cloud Coffee – Dominic Green

Cloud Coffee is the latest in a wide range of coffee shops on the high-street. What makes Cloud Coffee different is that they use latest “cloud” principles, keeping costs low by using utility based staffing, maintaining a decoupled working environment and ensuring good scalability to meet customer demand. Cloud Coffee has very quickly risen to high street fame.
This analogy will help you understand how things work in the cloud, specifically Windows Azure. During this talk Dominic will elaborate and expand upon on the concept of ‘Cloud Coffee’, sharing some of the lessons he learned whilst developing one of the first production applications for the Windows Azure Platform.

The Power of PowerShell – Ben Nunney

It’s a long time since DOS ruled the world, and the classic command shell was in serious need of an upgrade. Enter PowerShell – focusing on accuracy, extensibility, and congruent syntax, it is one of the most powerful and misunderstood things to come out of Microsoft in recent years. Who says a command shell can’t be interesting? By the time the session is over you’ll have seen what PowerShell can do for you as a developer, know exactly how to get there, and who knows – you may have even fallen in love with the command line all over again.

You can find out more information and register for the event here.

Azure TCO and ROI Calculator

PDC brought a lot of new cloud content to Azure, however one great feature that has been added to the Windows Azure portal seems to have been slightly overlooked.

The total cost of ownership (TCO) and return on investment (ROI) calculator allows end users and organisations see how much money they are likely to save / spend when migrating or developing an application on the Azure Platform.

TCO & ROI Calculator Questions - Dominic Green The TCO & ROI Calculator takes the user through a number of steps, starting with a number of questions about the application. Selecting such things as the type of business / application, use of SQL Azure and how you expect to see the service fluctuate over time.

image Answers from this questionnaire can then be used to calculate an estimate on the total cost and nodes needed for the application.

This can then be seen over a number of years to see what the cost would be over a longer time period as well as a comparison to how much would be spent hosting the application on premise.

TCO & ROI Calculator Cost - Dominic Green 

TCO & ROI Calculator Comparison - Dominic Green

 

Check out the TCO & ROI Calculator here.

What Is SQL Azure Database?

What Is SQL Azure Database - Dominic Green

SQL Azure, that’s just a SQL Database in the cloud right? Wrong… It actually offers all this and then some.

This new “hand drawn” video from the SQL Azure team shows why SQL Azure is much more than just a simple database and how it can make life easier and cheaper for all those database guys out there.

Check out the video here, and find out more about SQL Azure here.

Also, Check out some of the other “What Is…” videos in the series.

What Is the Windows Azure  Platform

What Is Windows Azure

Turning Off Silverlight without Uninstalling

At various time during project I have found that when developing with Silverlight, I have wanted the browser to act as if Silverlight had not been installed on my machine.

This has primarily been to test out the welcome / install screen if the end user does not have Silverlight install. The easiest and quickest way around this is to disable the Silverlight plugin, when using Internet Explorer simply go to:

Tools > Internet Options > Programs > Manage Add-Ons

This will show all of your installed add-ons as below and you will be able to scroll through till you find the “Microsoft Silverlight” add-on and you will be able to click on “disable” to turn it off.

image

Similarly, when using FireFox you can do the same thing by going to:

Tools > Add-Ons > Plug-Ins

And then clicking “Disable” on the Silverlight plug-in.

image 

Go check this out by navigating to www.silverlight.net and turning your Silverlight off and on again.

Eye on Earth – Video Demo

As part of the Eye On Earth (link) launch today, we have a video demonstration of the project by Ludo de Bock  (Senior Director – Microsoft)along with a discussion about how the project can engage both European citizens and governments using real time environmental data by Rob Bernard (Chief Environmental Strategist – Microsoft) and Prof. Jacqueline McGlade (European Environmental Agency).