According to Wikipedia “cloud computing is Internet-based computing, whereby shared resources, software and information are provided to computers and other devices on-demand, like a public utility.” That’s not really new. We all do that when we check our Hotmail, upload photos to Facebook, post on a blog or use Twitter.
At one of his recent speeches at the University of Washington Steve Ballmer was talking about cloud computing and he said “the cloud creates opportunities and responsibilities. Now, that sounds like some blah, blah, blah, business term, blah, blah, blah. It actually is a whole statement about a range of innovations that I think we are seeing and will continue to see where there are literally new software investments that create new business models, new opportunities to start and form businesses.” You can watch a video of his speech here or find the transcript here.
Microsoft has an extensive cloud strategy which spans over infrastructure, business applications and services in the cloud. A lot of the traditional on-premise products are now available through the cloud as well: Windows, SQL Server, Exchange, SharePoint and Dynamics CRM for example.
Bing Maps is such a service and has been featured in Steve Ballmer’s speech as well. Initially individual cloud services such as Bing Maps have been consumed from applications that are hosted on premise but more and more people take advantage of Windows Azure and SQL Azure not only because they don’t need to take care of operating the data centre as well as running, updating and patching the software but also – and perhaps most importantly – because the cloud is “elastic” – it allows you to easily scale up and down the resources to match the load. Daimler for example chose this approach for the Smart Web Portal, so did the European Environment Agency with the Eye on Earth and the Environmental Atlas of Europe. Another great example is Miami311 which extends MapDotNet into the cloud and earned the company the 1st price in the Windows Azure contest.
At MIX10 David Robinson announced that SQL Azure will receive the same spatial treatment that SQL Server 2008 already has in the on-premise version already: spatial data types, spatial indexes and spatial functions. This will largely improve the spatial awareness of the cloud-database and open up new opportunities.
A less known component of the Windows Azure Platform is still only known under its Codename “Dallas”. Codename “Dallas” is a cloud service that allows data providers to make their valuable data sources available on a subscription base; it allows information workers to analyze these data sources directly from Excel through the Power Pivot add-in and it allows developers to consume the data through a REST web service API and integrate into their applications. “Dallas” is currently available as a Community Technology Preview (CTP) for free trial and you already find a lot of interesting data sources in there from providers such as Associated Press, United Nations, Data.gov, NASA, National Geographic, Zillow, Pitney Bowes, Navteq or Weathercentral.
A lot of these data sources have a spatial component so it’s worth having a closer look at “Dallas” and the integration with Bing Maps.
The first step is to visit the homepage of Codename “Dallas” and sign-up for the trial with your Windows Live ID. This will create you an account key and an account ID which you will need later to consume the services. Once you signed up to the service you can log on to the Dallas Developer Portal and browse the catalog for content you’re interested in:
In your list of active subscriptions you will find now all the datasets you subscribed to:
In our example we are using weather-information from Weather Central. If we click on the subscription we open an explorer that allows us to browse the various datasets and generate URLs and proxy classes to access the data. Weather Central provides 3 datasets: daily and hourly forecasts as well as tiles.
Now that sounds interesting. In Bing Maps we can use both vector data and raster data. Raster data would be overlaid in a tile layer so let’s have a closer look at the tiles first.
Once you selected tiles as the series you can choose from a number of layers. In our example we choose the Temperature.
The next parameter is called Bing and if we click on the help button we will find out that this is actually the quadkey which the Bing Maps AJAX and Silverlight control automatically generate when we overlay a tile layer.
Next comes the time for which we want to retrieve the data. The time has to be provided in Universal Time Code (UTC).
For our example we are going to ignore the last parameter. Once we have compiled the query we can preview the data, copy the link to the clipboard or download the proxy-class as C# code
By invoking the service we get to see the result in the browser:
Integrating this now as a tile layer in our Bing Maps AJAX or Silverlight control is well documented in the interactive SDKs and we are only minutes away from having the temperature in our application:
That was part 1 covering the raster data but I mentioned before that Weather Central also provides RSS data for the daily and hourly weather forecast. This would be vector data, so let’s have a look at this as well.
Let’s say we are looking for the daily forecast. For this service we will need a different set of parameters. First we need a latitude and longitude which we can retrieve for any location from the Bing Maps geocoding service. The offset describes the time difference between our local time and the UTC and the units can be the English or metric ones.
Once we provided the parameters we can analyze them in Excel through the Power Pivot add-in or preview them directly in the Explorer in a table,…
…or in Raw format.
Of course we can also generate the proxy classes again and reuse them in our application. For my sample I have provided a couple of controls that allow to select date and time for the tile layer with the temperature as well as a text box that allows you to enter a location for the daily forecast. When you hit the button underneath this textbox Bing Maps will geocode the location. A handler that captures when the geocode-request is complete will then centre the map on this location, fire a request to Codename “Dallas” and display some of the available weather data for this location.
You will find the sample application here.