<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>domgreen.com &#187; Windows Azure</title>
	<atom:link href="http://domgreen.com/category/windows-azure/feed/" rel="self" type="application/rss+xml" />
	<link>http://domgreen.com</link>
	<description>The geek will inherit the Earth</description>
	<lastBuildDate>Mon, 07 Jun 2010 08:42:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Azure dev Portal, OS Settings</title>
		<link>http://domgreen.com/2010/06/07/azure-dev-portal-os-settings/</link>
		<comments>http://domgreen.com/2010/06/07/azure-dev-portal-os-settings/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 08:42:44 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[dev portal]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/06/07/azure-dev-portal-os-settings/</guid>
		<description><![CDATA[Microsoft have made a small update to the Windows Azure Dev Portal and added the ability to configure the operating system that are running on your nodes and how they are updated.
As you can see in the below image the new magic “OS Settings…” button is now available.
 
Clicking on the “OS Settings…” button takes [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft have made a small update to the Windows Azure Dev Portal and added the ability to configure the operating system that are running on your nodes and how they are updated.</p>
<p>As you can see in the below image the new magic “OS Settings…” button is now available.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/06/image.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/06/image_thumb.png" width="625" height="250" /></a> </p>
<p>Clicking on the “OS Settings…” button takes you to the following screen to configure your operating system options and how it is updated:</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/06/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/06/image_thumb1.png" width="643" height="209" /></a> Hopefully, more updates will start rolling out to the dev portal over the coming months.</p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/06/07/azure-dev-portal-os-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Infrastructure Access Layer</title>
		<link>http://domgreen.com/2010/04/25/infrastructure-access-layer/</link>
		<comments>http://domgreen.com/2010/04/25/infrastructure-access-layer/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 16:06:44 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Cloud Ready]]></category>
		<category><![CDATA[IAL]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/04/25/infrastructure-access-layer/</guid>
		<description><![CDATA[The Infrastructure Access Layer, or IAL for short is a simple concept, nothing new, in-fact you have all been using something similar for years when programming against your databases. I have just expanded the concept to the cloud (and the ability to create “cloud ready” applications).
Infrastructure Access Layer (IAL)
&#160;

The Infrastructure Access Layer is simply a [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>Infrastructure Access Layer</strong>, or <strong>IAL </strong>for short is a simple concept, nothing new, in-fact you have all been using something similar for years when programming against your databases. I have just expanded the concept to the cloud (and the ability to create “cloud ready” applications).</p>
<h2>Infrastructure Access Layer (IAL)</h2>
<p>&#160;</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/04/image4.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/04/image_thumb4.png" width="480" height="366" /></a></p>
<p>The Infrastructure Access Layer is simply a way to abstract away your underlying infrastructure from your business logic or processing. This means that I can easily change how my applications interact with the infrastructure just by changing a method within the IAL and the business logic would be none the wiser.</p>
<p>Lets take a simple example, I may be developing an applications that takes work items and processes them. I create a method in the IAL called <strong>GetWorkItem</strong> which will return to my business logic the work item to be processed. This method can then call out to Azure Queues to get a work item, or maybe in the future you will want to switch out where we are getting the work item from, maybe we want to use a web service to call another location, use blob storage to store large work items or listen for a work item to be passed onto a service bus. This can all be dealt with in a single place.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/04/image5.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/04/image_thumb5.png" width="400" height="125" /></a></p>
<p>All the business logic knows and cares about is that it is going to call the <strong>GetWorkItem </strong>method and get a work item back, not where it came from or how it received it it.</p>
<h2>Cloud Ready…</h2>
<p>Even with more and more people are moving toward the cloud, there are still companies that aren&#8217;t quite ready to make the jump, but realise that in the near future may have to and want to know how to create applications that will be able to transition easily to the cloud when they are ready.</p>
<p>By programming against the Infrastructure Access Layer companies will be able to make this move a lot smoother, by just replacing the needed classes so that they interact with the cloud rather than the old infrastructure.</p>
<p>A great example of this would be using a messaging system such as MSMQ as part of your on premise application, and then being able to easily switch this out for Windows Azure Queues or the App Fabric Service Bus when moving into the cloud. Having to make minimal if any changes to your business logic.</p>
<h2>Keeping the cloud contained</h2>
<p>As I talked about in my <a href="http://domgreen.com/2010/04/24/learnings-from-the-ash-cloud/">last post</a> the cloud can end up getting everywhere and you can soon end up breaking the principle of DRY (Don’t&#160; Repeat Yourself).</p>
<p>With the IAL you can easily keep the cloud contained, letting a minimal number of project have access to the cloud, making SDK upgrades and maintenance easier.</p>
<h2>Is that it?</h2>
<p>It is indeed. As I said at the start, the IAL is a simple concept that allows you to abstract away your underlying infrastructure from your business logic and also help create cloud ready applications for when people are ready to make that push to the cloud.</p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/04/25/infrastructure-access-layer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning&#8217;s From The Ash Cloud</title>
		<link>http://domgreen.com/2010/04/24/learnings-from-the-ash-cloud/</link>
		<comments>http://domgreen.com/2010/04/24/learnings-from-the-ash-cloud/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 14:17:56 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Ash Cloud]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/04/24/learnings-from-the-ash-cloud/</guid>
		<description><![CDATA[I&#8217;m sure everyone is aware of the recent volcanic eruption in Iceland and the cloud of ash that has been spewed out and more importantly the knock on effects this ash cloud has had on not just Europe but the whole world.
 
Clouds can Spread …
The ash cloud started out in Iceland where it eventually [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure everyone is aware of the recent volcanic eruption in Iceland and the cloud of ash that has been spewed out and more importantly the knock on effects this ash cloud has had on not just Europe but the whole world.</p>
<h2><a href="http://domgreen.com/wp-content/uploads/2010/04/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/04/image_thumb2.png" width="526" height="386" /></a> </h2>
<h2>Clouds can Spread …</h2>
<p>The ash cloud started out in Iceland where it eventually moved and spread out to cover the UK and Europe, even some reports say that it got as far as Canada. Grounding planes and crippling transport for a number of weeks.</p>
<p>This got me thinking, not all clouds are nice white clouds, some are evil volcanic clouds that actually do more harm than good especially when not contained to where we want them to be.&#160; (the ash cloud would have been fine if it had not strayed into European airspace).</p>
<p>The same is true in your applications, when developing for the cloud you can find that the cloud can end up spreading throughout your applications and if your not careful touching every section of code you write.</p>
<p>This can then be a real problem when the underlying SDK to interact with the cloud changes and you have to go through all of your application looking where to refractor and make changes.</p>
<h2>Contain Your Cloud</h2>
<p>To combat this I contain any code that will access the cloud within few specialised “cloud” projects within my application.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/04/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/04/image_thumb3.png" width="263" height="189" /></a> </p>
<p>This means that throughout the application if I want to access the Azure message queue, I call a single method from one of my cloud project that will return me a message, meaning that no other part of you application needs to know how to deal with the cloud.</p>
<h2>Added Benefits</h2>
<p>Containing your cloud not only allows you to keep to the DRY principles and code re-use it, makes maintenance of your application easier and can reduce code smells. One of the biggest benefits is that it also allows you to easier test your applications without having to rely on the cloud or developer fabric, as you can create your cloud methods in a mock-able way.</p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/04/24/learnings-from-the-ash-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF Hot Fix &#8211; Don&#8217;t be showing your nodes</title>
		<link>http://domgreen.com/2010/01/25/wcf-hot-fix-dont-be-showing-your-nodes/</link>
		<comments>http://domgreen.com/2010/01/25/wcf-hot-fix-dont-be-showing-your-nodes/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 20:40:41 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/01/25/wcf-hot-fix-dont-be-showing-your-nodes/</guid>
		<description><![CDATA[When browsing to a WCF endpoint hosted in an Azure web role you normally get back a web page for the service showing the location of the individual node / web role that is serving up your request (seen blurred out here) instead of the actual endpoint.
This isn&#8217;t great as you don&#8217;t want everyone knowing [...]]]></description>
			<content:encoded><![CDATA[<p>When browsing to a WCF endpoint hosted in an Azure web role you normally get back a web page for the service showing the location of the individual node / web role that is serving up your request (seen blurred out here) instead of the actual endpoint.</p>
<p>This isn&#8217;t great as you don&#8217;t want everyone knowing about your internal system and especially the URL of one of your web roles, with which they could do who know what.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/01/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/01/image_thumb4.png" width="593" height="368" /></a> </p>
</p>
<p>This can easily be fixed with this <a href="http://code.msdn.microsoft.com/KB977420" target="_blank">patch for WCF</a> that will now show the expected endpoint. This endpoint is actually the address of the load balancer that will then forward your request to an web role.</p>
<p>Once the patch is download and installed you can then simply add the following xml snippet into your behaviour for the WCF service:</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/01/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/01/image_thumb5.png" width="595" height="176" /></a> </p>
<p>With this snippet added into your web.config you can browse back to the previous service and will now see that the correct URL is displayed for your service.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/01/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2010/01/image_thumb6.png" width="600" height="375" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/01/25/wcf-hot-fix-dont-be-showing-your-nodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paying or Not Paying?</title>
		<link>http://domgreen.com/2010/01/24/paying-or-not-paying/</link>
		<comments>http://domgreen.com/2010/01/24/paying-or-not-paying/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 23:00:35 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[billing]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/01/24/paying-or-not-paying/</guid>
		<description><![CDATA[
I have recently been asked a number of questions both internally and from customers about when you will be billed for Azure usage.
As Eric Nelson’s recent post describes, if you suspend a service you will still be paying this is due to the fact you will still have your application deployed on the server ready [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://domgreen.com/wp-content/uploads/2010/01/azurepayment.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Dom Green - azurepayment" border="0" alt="Dominic Green - azurepayment" src="http://domgreen.com/wp-content/uploads/2010/01/azurepayment_thumb.png" width="661" height="295" /></a>
<p>I have recently been asked a number of questions both internally and from customers about when you will be billed for Azure usage.</p>
<p>As Eric Nelson’s recent <a href="http://geekswithblogs.net/iupdateable/archive/2010/01/19/qanda-when-do-i-get-charged-for-compute-hours-on.aspx" target="_blank">post</a> describes, if you <u><strong>suspend</strong></u> a service you <strong>will still be paying </strong>this is due to the fact you will still have your application deployed on the server ready to start again. With your application utilizing the server others will not be able to provision its usage.</p>
<p>When you select <strong><u>delete</u></strong> you will <strong>stop paying</strong> as you will no longer have servers provisioned for your application and the recourses will be freed up for others to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/01/24/paying-or-not-paying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Azure Memcached-ed</title>
		<link>http://domgreen.com/2010/01/18/windows-azure-memcached-ed/</link>
		<comments>http://domgreen.com/2010/01/18/windows-azure-memcached-ed/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 07:57:49 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[Memcached]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/01/18/windows-azure-memcached-ed/</guid>
		<description><![CDATA[
Memcached is a distributed cache used to help speeding up large scale web applications by taking pressure off the database. Memcached is used by many of the internets biggest sites, including Twitter, Wikipedia, and YouTube to name just a few.
A distributed cache is one of the things that I’ve been hoping to see released for [...]]]></description>
			<content:encoded><![CDATA[</p>
<p><a href="http://memcached.org/" target="_blank">Memcached</a> is a distributed cache used to help speeding up large scale web applications by taking pressure off the database. Memcached is used by many of the internets biggest sites, including Twitter, Wikipedia, and YouTube to name just a few.</p>
<p>A distributed cache is one of the things that I’ve been hoping to see released for Windows Azure for quite a while, and I am hoping that <a href="http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx" target="_blank">AppFabric Caching</a> will make the move to the cloud in the coming year. However, until that happens I was determined to find a way to get a distributed cache and this great <a href="http://code.msdn.microsoft.com/winazurememcached" target="_blank">Windows Azure Memcached</a> sample showed me how.</p>
<h2>“Brad Fitzpatrick, I love your ass!&quot;</h2>
<p>Sorry, I just couldn&#8217;t help myself. I found this great quote on in the <a href="http://code.google.com/p/memcached/wiki/TutorialCachingStory" target="_blank">Caching Story</a> page of the Memcached wiki.</p>
<p>After installing and setting up Memcached you will be able to cache any data, including data that is retrieved from your database so that the next time you need it you can get it from cache and not need to re-query your database. Therefore, reduce the pressure on the database and earning the love of our DBA.</p>
<h2>Azure Memcached sample</h2>
<p>You can download the sample code for Windows Azure from the <a href="http://code.msdn.microsoft.com/winazurememcached/Release/ProjectReleases.aspx?ReleaseId=3551" target="_blank">codeplex download page</a> you then need to download a Windows friendly version of Memcached (<a href="http://labs.northscale.com/memcached-packages/" target="_blank">here is where I got mine</a>). With the sample code from codeplex just add the memcached exe to your worker roles. You will now be able to run the sample code either on the dev fabric or in the cloud.</p>
<p>One thing to watch out for, the Memcached exe’s seem to take an age to get up and running. I actually left mine to set up overnight (glad I&#8217;m still on a CTP account) as the Memcached Worker Roles were all showing busy for a long time, during which the sample would not work correctly.</p>
<p>After the servers have started up you can easily set and retrieve values from the cache as shown in the screenshots below.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/01/memchacedset.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Dom Green - memchacedset" border="0" alt="Dominic Green - memchacedset" src="http://domgreen.com/wp-content/uploads/2010/01/memchacedset_thumb.png" width="388" height="317" /></a><a href="http://domgreen.com/wp-content/uploads/2010/01/memchacedget.png"><img style="border-right-width: 0px; margin: 0px auto; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Dom Green - memchacedget" border="0" alt="Dominic Green - memchacedget" src="http://domgreen.com/wp-content/uploads/2010/01/memchacedget_thumb.png" width="382" height="320" /></a>&#160; </p>
<h2>&#160;</h2>
<h2>Under the hood</h2>
<p>Now that we have got our distributed cache working lets have a look how the sample code works.</p>
<h3>Memcached Server</h3>
<p>On the server side we set up an internal endpoint that will be used to connect the clients to the Memcached server. When the node is created we launch the Memcached server that we downloaded before, passing in the nodes cache size and endpoint as arguments.</p>
<pre class="brush: c-sharp" name="code">          string arguments = 	&quot;-m &quot; + cacheSize +
				&quot; -l &quot; + endpoint.Address +
				&quot; -p &quot; + endpoint.Port;

            ProcessStartInfo startInfo = new ProcessStartInfo();
            startInfo.CreateNoWindow = false;
            startInfo.UseShellExecute = false;
            startInfo.FileName = &quot;memcached.exe&quot;;
            startInfo.WindowStyle = ProcessWindowStyle.Hidden;
            startInfo.Arguments = arguments;</pre>
<p>This node is now exposing a Memcached server, which can be used by the client nodes to cache data.</p>
<h3>Utilizing Memcached &#8211; Clients</h3>
<p>The client node in the example looks a lot more complicated that it actually is. The most important part is adding the configuration for our memcached client within the settings tab of the node.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/01/image3.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Dom Green - client settings" border="0" alt="Dominic Green - client settings" src="http://domgreen.com/wp-content/uploads/2010/01/image_thumb3.png" width="467" height="255" /></a> </p>
<p>Then comes the interesting bit using the <em>Enyim</em> caching library (others libraries are available) and creating a <em>MemcachedClient </em>object, allowing us to get and set objects in the cache. </p>
<p>Each time a new MemcacedClient is needed the program loads a configuration based upon the data within the settings (picture above) and then loops through all of the instances of memcached servers nodes that we are running in our hosted service getting their endpoint, to add this to the configuration of available servers.</p>
<pre class="brush: c-sharp" name="code">            _endpoints = new Dictionary<string , ipendpoint>();

            foreach (var endpoint in RoleEnvironment.Roles[_memcachedRoleName].Instances)
            {
                foreach (var epi in endpoint.InstanceEndpoints)
                  {
                    if (epi.Key == &quot;memcached&quot;)
                    {

                        _endpoints.Add(epi.Value.RoleInstance.Id.ToString(),epi.Value.IPEndpoint);
                    }
                }
            }</string></pre>
<p>Now that the connection to our memcached nodes we can use the caching library to set and get values in the cache.</p>
<pre class="brush: c-sharp" name="code">AzureMemcached.Client.Store(StoreMode.Set, key, value);          

AzureMemcached.Client.Get(key);</pre>
<p>With this code we now have distributed caching on Windows Azure, and can use the example to build out much bigger applications. <img src='http://domgreen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> &#160; </p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/01/18/windows-azure-memcached-ed/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Service management API &#8211; REST on REST</title>
		<link>http://domgreen.com/2010/01/11/service-management-api-rest-on-rest/</link>
		<comments>http://domgreen.com/2010/01/11/service-management-api-rest-on-rest/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 23:39:29 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[service management API]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[WCF REST]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/01/11/service-management-api-rest-on-rest/</guid>
		<description><![CDATA[In a previous post I mentioned using the Service Management API sample library to call out to the Azure fabric from within a C# application.
The natural progression from here was to get the code working from within a web or worker role instance hosted within the cloud. Using a web role, I used the OnStart [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://domgreen.com/2010/01/06/azure-service-management-api-via-c/" target="_blank">previous post</a> I mentioned using the Service Management API <a href="http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=windowsazuresamples&amp;ReleaseId=3233" target="_blank">sample library</a> to call out to the Azure fabric from within a C# application.</p>
<p>The natural progression from here was to get the code working from within a web or worker role instance hosted within the cloud. Using a web role, I used the OnStart method to set up a IServiceManagent class that could then be shared with the remainder of the classes within the role.</p>
<p>When tracing the hosted services from either the OnStart method or from within default.aspx.cs I could successfully print out all of the services within my account. However, when I set up a WCF REST service to return these hosted services in an array I started to get an error with the connection to the Management API. Giving a argument error stating that a property with the name “httpRequest” is not present. This was even happening when I was using <strong>exactly</strong> the same code as I was elsewhere.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/01/image1.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Dom Green - httpRequest" border="0" alt="Dominic Green - httpRequest" src="http://domgreen.com/wp-content/uploads/2010/01/image_thumb1.png" width="642" height="209" /></a> </p>
<p>After a push in the right direction from <a href="http://blogs.msdn.com/simondavies/default.aspx" target="_blank">Simon Davies</a> we found out&#160; that the issue was in the WCF REST service already having an OperationContext from the original REST call before calling out to the Service Management API. This <a href="http://blogs.msdn.com/pedram/archive/2008/07/19/webchannelfactory-inside-a-wcf-service.aspx" target="_blank">handy blog post</a>, help solve all my issues, all that was needed was to create a second OperationalContext before calling the management service.</p>
<pre class="brush: c-sharp" name="code">using(new OperationContextScope((IContextChannel)WebRole.serviceManagement))
{
  var hostedServices = WebRole.serviceManagement.ListHostedServices(subscriberID);

  foreach (HostedService service in hostedServices)
  {
    Trace.TraceInformation(&quot;Hosted Service: {0}&quot;, service.ServiceName);
  }
}
            </pre>
<p>Ta dar … everything now works, we can use the above code snippet to retrieve back all our hosted services by calling our own web role.</p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/01/11/service-management-api-rest-on-rest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Azure Service Management API &#8211; via C#</title>
		<link>http://domgreen.com/2010/01/06/azure-service-management-api-via-c/</link>
		<comments>http://domgreen.com/2010/01/06/azure-service-management-api-via-c/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 08:58:38 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[csmanage]]></category>
		<category><![CDATA[service management API]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/01/06/azure-service-management-api-via-c/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>I previously published an article showing how the <a href="http://msdn.microsoft.com/en-us/library/ee460799.aspx" target="_blank">Service Management API</a> and the <a href="http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=windowsazuresamples&amp;ReleaseId=3233" target="_blank">csmanage</a> tool could be used to aid in the deployment of your Windows Azure application as <a href="http://domgreen.com/2009/09/29/deploying-to-the-cloud-as-part-of-your-daily-build/" target="_blank">part of your daily build</a>.</p>
<p>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.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2010/01/serviceManagement.png"><img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Dom Green - serviceManagement" border="0" alt="Dominic Green - serviceManagement" align="right" src="http://domgreen.com/wp-content/uploads/2010/01/serviceManagement_thumb.png" width="197" height="191" /></a>I 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 <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=windowsazuresamples&amp;DownloadId=8254" target="_blank">this very handy library</a> 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).</p>
<p>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.</p>
<pre class="brush: c-sharp" name="code">namespace serviceManagementConsoleApplication
{
    class Program
    {
        private const string subscriberID = &quot;...&quot;;

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

 	    var x = serviceManagment.ListHostedServices(subscriberID);

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

            Console.Read();
        }
    }
}</pre>
<p>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.</p>
<p>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.</p>
<pre class="brush: xml" name="code"><configuration>
  <system .servicemodel>
    <bindings>
      <webhttpbinding>
        <binding name="WindowsAzureServiceManagement_WebHttpBinding" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00">
          <readerquotas maxstringcontentlength="1048576" maxbytesperread="131072" />
          <security mode="Transport">
<transport clientcredentialtype="Certificate" />
          </security>
        </binding>
      </webhttpbinding>
    </bindings>
    <client>
      <endpoint name="WindowsAzureEndPoint" contract="Microsoft.Samples.WindowsAzure.ServiceManagement.IServiceManagement" binding="webHttpBinding" address="https://management.core.windows.net" bindingconfiguration="WindowsAzureServiceManagement_WebHttpBinding" />
    </client>
  </system>
</configuration></pre>
<p>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.</p>
<p>Download the sample library <a href="http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=windowsazuresamples&amp;ReleaseId=3233" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/01/06/azure-service-management-api-via-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Azure Data Centres open Worldwide?</title>
		<link>http://domgreen.com/2010/01/05/azure-data-centres-open-worldwide/</link>
		<comments>http://domgreen.com/2010/01/05/azure-data-centres-open-worldwide/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 16:38:10 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://domgreen.com/2010/01/05/azure-data-centres-open-worldwide/</guid>
		<description><![CDATA[&#160;&#160;

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.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://domgreen.com/wp-content/uploads/2010/01/azureEuropeAsia.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="azureEuropeAsia" border="0" alt="azureEuropeAsia" src="http://domgreen.com/wp-content/uploads/2010/01/azureEuropeAsia_thumb.png" width="604" height="400" /></a>&#160;&#160;
</p>
<p>This afternoon I noticed that I was able to select Europe and Asia regions to deploy my Azure application.</p>
<p>I have yet to see official word of these locations being available, but this must be for the move from CTP to production.</p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2010/01/05/azure-data-centres-open-worldwide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Azure TCO and ROI Calculator</title>
		<link>http://domgreen.com/2009/11/22/azure-tco-and-roi-calculator/</link>
		<comments>http://domgreen.com/2009/11/22/azure-tco-and-roi-calculator/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 17:36:00 +0000</pubDate>
		<dc:creator>domgreen</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Calculator]]></category>

		<guid isPermaLink="false">http://domgreen.com/2009/11/22/azure-tco-and-roi-calculator/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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. </p>
<p>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.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2009/11/image4.png"><img style="border-right-width: 0px; margin: 0px auto 10px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TCO &amp; ROI Calculator Questions - Dom Green" border="0" alt="TCO &amp; ROI Calculator Questions - Dominic Green" src="http://domgreen.com/wp-content/uploads/2009/11/image_thumb3.png" width="592" height="460" /></a> The TCO &amp; 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.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2009/11/image5.png"><img style="border-right-width: 0px; margin: 0px auto 10px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TCO &amp; ROI Calculator Azure Services - Dom Green" border="0" alt="image" src="http://domgreen.com/wp-content/uploads/2009/11/image_thumb4.png" width="590" height="458" /></a> Answers from this questionnaire can then be used to calculate an estimate on the total cost and nodes needed for the application.</p>
<p>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.</p>
<p><a href="http://domgreen.com/wp-content/uploads/2009/11/image6.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="TCO &amp; ROI Calculator Cost - Dom Green" border="0" alt="TCO &amp; ROI Calculator Cost - Dominic Green" src="http://domgreen.com/wp-content/uploads/2009/11/image_thumb5.png" width="591" height="458" /></a>&#160; </p>
<p><a href="http://domgreen.com/wp-content/uploads/2009/11/image7.png"><u></u><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="TCO &amp; ROI Calculator Comparison - Dom Green" border="0" alt="TCO &amp; ROI Calculator Comparison - Dominic Green" src="http://domgreen.com/wp-content/uploads/2009/11/image_thumb6.png" width="585" height="456" /></a></p>
<p>&#160;</p>
<p>Check out the TCO &amp; ROI Calculator <a href="http://www.microsoft.com/windowsazure/tco/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://domgreen.com/2009/11/22/azure-tco-and-roi-calculator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
