<?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>Wely&#039;s Cloud Journey...</title>
	<atom:link href="http://wely-lau.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://wely-lau.net</link>
	<description>A Wordpress Blog, Running on Windows Azure Platform</description>
	<lastBuildDate>Fri, 18 May 2012 07:25:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Managing session state in Windows Azure: What are the options?</title>
		<link>http://wely-lau.net/2012/05/18/managing-session-state-in-windows-azure-what-are-the-options/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=managing-session-state-in-windows-azure-what-are-the-options</link>
		<comments>http://wely-lau.net/2012/05/18/managing-session-state-in-windows-azure-what-are-the-options/#comments</comments>
		<pubDate>Fri, 18 May 2012 07:25:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Windows Azure Platform]]></category>
		<category><![CDATA[Windows Azure Storage]]></category>
		<category><![CDATA[Session]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/05/18/managing-session-state-in-windows-azure-what-are-the-options/</guid>
		<description><![CDATA[One of the most common questions in developing ASP.NET applications on Windows Azure is how to manage session state. The intention of this article is to discuss several options to manage session state for ASP.NET applications in Windows Azure. What is session state? Session state is usually used to store and retrieve values for a [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most common questions in developing ASP.NET applications on Windows Azure is how to manage session state. The intention of this article is to discuss several options to manage session state for ASP.NET applications in Windows Azure.</p>
<h1>What is session state?</h1>
<p>Session state is usually used to store and retrieve values for a user across ASP.NET pages in a web application. There are four available modes to store session values in ASP.NET:</p>
<ol>
<li>In-Proc, which stores session state in the individual web server’s memory. This is the default option if a particular mode is not explicitly specified. </li>
<li>State Server, which stores session state in another process, called ASP.NET state service. </li>
<li>SQL Server, which stores session state in a SQL Server database </li>
<li>Custom, which lets you choose a custom storage provider. </li>
</ol>
<p>You can get more information about ASP.NET session state <a href="http://msdn.microsoft.com/en-us/library/ms972429.aspx">here</a>.</p>
<h1>In-Proc session mode does not work in Windows Azure</h1>
<p>The In-Proc option, which uses an individual web server’s memory, does not work well in Windows Azure. This may be applicable for those of you who host your application in a multi-instance web-farm environment; Windows Azure load balancer uses round-robin allocation across multi-instances.</p>
<p>For example: you have three instances (A, B, and C) of a Web Role. The first time a page is requested, the load balancer will allocate instance A to handle your request. However, there’s no guarantee that instance A will always handle subsequent requests. Similarly,the value that you set in instance A’s memory can’t be accessed by other instances.</p>
<p>The following picture illustrates how session state works in multi-instances behind the load balancer.</p>
<p align="center"><a href="http://acloudyplace.com/wp-content/uploads/2012/02/managingss1.png"><strong><font size="1"><img title="managingss1" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/managingss1-300x149.png" width="300" height="149" /></font></strong></a></p>
<p align="center"><strong><font size="1">Figure 1 – WAPTK BuildingASP.NETApps.pptx Slide 10</font></strong></p>
<h1>The other options</h1>
<h2>1.&#160;&#160;&#160;&#160; Table Storage</h2>
<p>Table Storage Provider is a subset of the <a href="http://code.msdn.microsoft.com/windowsazure/Windows-Azure-ASPNET-03d5dc14">Windows Azure ASP.NET Providers</a> written by the Windows Azure team. The Table Storage Session Provider is,in fact, a custom provider that is compiled into a class library (.dll file), enabling developers to store session state inside Windows Azure Table Storage.</p>
<p>The way it actually works is to store each session as a record in Table Storage. Each record will have an expired column that describe the expired time of each session if there’s no interaction from the user.</p>
<p>The advantage of Table Storage Session Provider is its relatively low cost: <a href="https://www.windowsazure.com/en-us/home/tour/storage/">$0.14 per GB per month for storage capacity and $0.01 per 10,000 storage transaction</a>s. Nonetheless, according to my own experience, one of the notable disadvantages of Table Storage Session Provider is that it may not perform as fast as the other options discussed below.</p>
<p>The following code snippet should be applied in web.config when using Table Storage Session Provider.</p>
<pre>&lt;sessionState mode=&quot;Custom&quot; customProvider=&quot;TableStorageSessionStateProvider&quot;&gt;&#160;&#160; &lt;providers&gt;&#160;&#160;&#160;&#160; &lt;clear/&gt;&#160;&#160;&#160; &lt;add name=&quot;TableStorageSessionStateProvider&quot;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type=&quot;Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider&quot; /&gt;&#160;&#160; &lt;/providers&gt;
&lt;/sessionState&gt;</pre>
<p>You can get more detail on using Table Storage Session Provider step-by-step <a href="http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_buildingaspnetappswithwindowsazure_topic4#_Toc311041800">here</a>.</p>
<h2>2.&#160;&#160;&#160;&#160; SQL Azure</h2>
<p>As SQL Azure is essentially a subset of SQL Server, SQL Azure can also be used as storage for session state. With just a few modifications, SQL Azure Session Provider can be derived from <a href="http://support.microsoft.com/kb/317604">SQL Server Session Provider</a>.</p>
<p>You will need to apply the following code snippet in web.config when using SQL Azure Session Provider:</p>
<pre>&lt;sessionState mode=&quot;SQLServer&quot;
sqlConnectionString=&quot;Server=tcp:[serverName].database.windows.net;Database=myDataBase;User ID=[LoginForDb]@[serverName];Password=[password];Trusted_Connection=False;Encrypt=True;&quot;
cookieless=&quot;false&quot; timeout=&quot;20&quot; allowCustomSqlDatabase=&quot;true&quot;
/&gt;</pre>
<p>For the detail on how to use SQL Azure Session Provider, you can either:</p>
<ul>
<li>Follow the walkthrough from this <a href="http://blogs.msdn.com/b/sqlazure/archive/2010/08/04/10046103.aspx">post</a>. </li>
<li>Or use <a href="http://nuget.org/packages/System.Web.Providers">ASP.NET Universal Providers via Nuget</a>. </li>
</ul>
<p>The advantage of using SQL Azure as session provider is that it’s cost effective, especially when you have an existing SQL Azure database. Although it performs better than Table Storage Session Provider in most cases, it requires you to clean the expired session manually by calling the DeleteExpiredSessions stored procedure. Another drawback of using SQL Azure as session provider is that Microsoft does not provide any official support for this.</p>
<h2>3.&#160;&#160;&#160;&#160; Windows Azure Caching</h2>
<p>Windows Azure Caching is probably the most preferable option available today. It provides a high-performance, in-memory, distributed caching service. The Windows Azure session state provider is an out-of-process storage mechanism for ASP.NET applications. As we all know, accessing RAM is very much faster than accessing disk, so Windows Azure Caching obviously provides the highest performance access of all the available options.</p>
<p>Windows Azure Caching also comes with a <a href="http://www.microsoft.com/download/en/details.aspx?id=27421">.NET API</a> that enables developers to easily interact with the Caching Service. You should apply the following code snippet in web.config when using Cache Session Provider:</p>
<pre>&lt;sessionState mode=&quot;Custom&quot; customProvider=&quot;AzureCacheSessionStoreProvider&quot;&gt;&#160;&#160; &lt;providers&gt;&#160;&#160;&#160;&#160; &lt;add name=&quot;AzureCacheSessionStoreProvider&quot;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type=&quot;Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache&quot;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; cacheName=&quot;default&quot; useBlobMode=&quot;true&quot; dataCacheClientName=&quot;default&quot; /&gt;&#160;&#160; &lt;/providers&gt;
&lt;/sessionState&gt;</pre>
<p>A step-by-step tutorial for using Caching Service as session provider can be found <a href="http://msdn.microsoft.com/en-us/gg457897">here</a>.</p>
<p>Other than providing high performance access, another advantage about Windows Azure Caching is that it’s officially supported by Microsoft. Despite its advantages, the charge of Windows Azure Caching is relatively high, <a href="https://www.windowsazure.com/en-us/home/tour/caching/">starting from $45 per month for 128 MB, all the way up to $325 per month for 4 GB</a>.</p>
<h1>Conclusion</h1>
<p>I haven’t discussed all the available options for managing session state in Windows Azure, but the three I have discussed are the most popular options out there, and the ones that most people are considering using.</p>
<p>Windows Azure Caching remains the recommended option, despite its cons but developers and architects shouldn’t be afraid to decide on a different option, if it’s more suitable for them in a given scenario.</p>
<blockquote>
<p align="center"><em><strong>This post was also published at <a href="http://acloudyplace.com/2012/02/managing-session-state-in-windows-azure-what-are-the-options/">A Cloud Place</a></strong><strong></strong></em><em></em><em><strong> blog.</strong></em></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/05/18/managing-session-state-in-windows-azure-what-are-the-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Introduction to Windows Azure (Part 2)</title>
		<link>http://wely-lau.net/2012/05/10/an-introduction-to-windows-azure-part-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=an-introduction-to-windows-azure-part-2</link>
		<comments>http://wely-lau.net/2012/05/10/an-introduction-to-windows-azure-part-2/#comments</comments>
		<pubDate>Thu, 10 May 2012 13:38:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Windows Azure Platform]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/05/10/an-introduction-to-windows-azure-part-2/</guid>
		<description><![CDATA[This is the second article of a two-part introduction to Windows Azure. In Part 1, I discussed the Windows Azure data centers and examined the core services that Windows Azure offers. In this article, I will explore additional services available as part of Windows Azure which enable customers to build richer, more powerful applications. Additional [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second article of a two-part introduction to Windows Azure. In <a href="http://wely-lau.net/2012/05/01/an-introduction-to-windows-azure-part-1/">Part 1</a>, I discussed the Windows Azure data centers and examined the core services that Windows Azure offers. In this article, I will explore additional services available as part of Windows Azure which enable customers to build richer, more powerful applications.</p>
<h2>Additional Services</h2>
<h3>1. Building Block Services</h3>
<p>‘Building block services’ were previously branded ‘Windows Azure AppFabric’. The main objective of building block services is to enable developers to build connected applications. The three services under this category are:</p>
<h4>(i) Caching Service</h4>
<p>Generally, accessing RAM is much faster than accessing disk, including storage and databases. For that reason, Microsoft have developed an in-memory and distributed caching service to deliver low latency, high-performance access, namely <a href="http://msdn.microsoft.com/en-us/library/ff383731.aspx">Windows Server AppFabric Caching</a>. However, there are some activities, such as installing and managing, and some hardware requirements like investing in clustered servers, which have to be handled by the end-user.</p>
<p>Windows Azure Caching Service is a self-managed, yet distributed, in-memory caching service built on top of the Windows Server AppFabric Caching Service. Developers will no longer have to install and manage the Caching Service / Clusters. All they need to do is to create a namespace, specify the region, and define the Cache Size. Everything will get provisioned automatically in just a few minutes.</p>
<p align="center"><a href="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2a.png"><img title="Windows Azure Caching Service" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2a.png" width="550" height="293" /></a></p>
<p align="center"><strong>Creating new Windows Azure Caching Service</strong></p>
<p>Additionally, Azure Caching Service comes along with a .NET client library and <a href="http://msdn.microsoft.com/en-us/gg457897">session providers for ASP.NET</a>, which allow the developer to quickly use them in the application.</p>
<h4>(ii) Access Control Service</h4>
<p align="center"><strong><img title="azureintro2b" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2b.png" width="476" height="238" /></strong></p>
<p align="center"><strong>Third Party Authentication</strong></p>
<p>With the trend for federated identity / authentication becoming increasingly popular, many applications have relied on authentication from third party identity providers (IdPs) such as Live ID, Yahoo ID, Google ID, and Facebook.</p>
<p>One of the challenges developers face when dealing with different IdPs is that they use different standard protocols (OAuth, WS-Trust, WS-Federation) and web tokens (SAML 1.1, SAML 2.0, SWT).</p>
<p align="center"><a href="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2c.png"><strong><img alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2c.png" width="231" height="353" /></strong></a></p>
<p align="center"><strong>Multiple ID Authentication</strong></p>
<p>Access Control Service (ACS) allows application users to authenticate using multiple IdPs. Instead of dealing with different IdPs individually, developers just need to deal with ACS and let it take care of the rest.</p>
<p align="center"><a href="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2d.png"><strong><img title="AzureIntro2D" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2d.png" width="304" height="175" /></strong></a></p>
<p align="center"><strong>AppFabric Azzess Control Services</strong></p>
<h4>(iii) Service Bus</h4>
<p>Windows Azure’s Service Bus allows secure messaging and connectivity across multiple network hierarchies. It enables hybrid model scenarios, such as connecting cloud applications with on-premise systems. The Service Bus allows applications running on Windows Azure to call back to on-premise applications located behind firewalls and NATs.</p>
<p align="center"><a href="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2e.png"><strong><img title="azureintro2e" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2e-300x131.png" width="300" height="131" /></strong></a></p>
<p align="center"><strong>Service Bus Diagram</strong></p>
<p>Migrating from an on-premise Windows Communication Foundation (WCF) framework to the Service Bus is trivial as they use a similar programming approach.</p>
<h3>2. Data Services</h3>
<p>Data Services consists of SQL Azure Reporting and SQL Azure Data Sync, both of which are still currently available as Community Technology Previews (CTP).</p>
<h4>(i)&#160; SQL Azure Reporting</h4>
<p>SQL Azure Reporting aims to provide developers with a service similar to that of the <a href="http://msdn.microsoft.com/en-us/library/ms159106.aspx">current SQL Server Reporting Service (SSRS)</a>, with the advantages of being in the cloud. Developers are still able to use familiar tools such as <a href="http://msdn.microsoft.com/en-us/library/ms173767.aspx">SQL Server Business Intelligence Development Studio</a>. Migrating on-premise reports is also easy as SQL Azure Reporting is essentially built on top of SSRS architecture.</p>
<h4>(ii) SQL Azure Data Sync</h4>
<p>SQL Azure Data Sync is a cloud-based data synchronization service built on top of the<a href="http://msdn.microsoft.com/en-us/sync/bb821992">Microsoft Sync Framework</a>. It enables synchronization between a cloud database and another cloud database, or with an on-premise database.</p>
<p align="center"><a href="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2f.png"><strong><img title="azureintro2f" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2f-300x179.png" width="270" height="161" /></strong></a></p>
<p align="center"><strong>SQL Azure Data Sync</strong></p>
<p align="center"><strong>(from Windows Azure Bootcamp)</strong></p>
<h3>3. Networking</h3>
<p>Three networking services are available today:</p>
<h4>(i) Windows Azure CDN</h4>
<p>The Content Delivery Network (CDN) caches static content such as video, images, JavaScript, and CSS at the closest node to users. By doing so, it improves performance and provides the best user experience. There are currently <a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg680302.aspx">24 nodes available globally</a>.</p>
<p align="center"><strong><img title="azureintro2g" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2g.gif" width="450" height="234" /></strong></p>
<p align="center"><strong>Windows Azure CDN Locations</strong></p>
<h4>(ii) Windows Azure Traffic Manager</h4>
<p>Traffic Manager is designed to enable high performance and high availability of web applications, by providing load-balancing across multiple hosted services in the six available data centers. In its current CTP guise, developers can select one of the following rules:</p>
<ul>
<li>Performance – detects the location of the user traffic and routes it to the best online hosted service based on network performance. </li>
<li>Failover – based on an ordered list of hosted services, traffic is routed to the online service highest on the list. </li>
<li>Round Robin – equally distributes traffic to all hosted services. </li>
</ul>
<h4>(iii) Windows Azure Connect</h4>
<p>Windows Azure Connect supports secure network connectivity between on-premise resources and the cloud by establishing a virtual network environment between them. With Windows Azure Connect, cloud applications appear to reside on the same network environment as on-premise applications.</p>
<p align="center"><a href="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2h.png"><strong><img title="azureintro2h" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/02/azureintro2h-300x289.png" width="282" height="271" /></strong></a></p>
<p align="center"><strong>Windows Azure Connect</strong></p>
<p align="center"><strong>(from the Windows Azure Platform Training Kit)</strong></p>
<p>Windows Azure Connect enables scenarios such as:</p>
<ul>
<li>Using an on-premise SMTP Server from a cloud application. </li>
<li>Migrating enterprise apps which require an on-premise SQL Server to Windows Azure. </li>
<li>Domain-join a cloud application running in Azure to an Active Directory. </li>
</ul>
<h3>4. Windows Azure Marketplace</h3>
<p>Windows Azure Marketplace is a centralized online market where developers are able to easily sell their applications or datasets.</p>
<h4>(i) Marketplace for Data</h4>
<p><a href="https://datamarket.azure.com/browse/Data">Windows Azure Marketplace for Data</a> is an information marketplace allowing ISVs to provide datasets (either free or paid) on any platform, and available to the global market. For example, <a href="https://datamarket.azure.com/dataset/ec752a16-c2df-4b77-ac67-c8713115df77">Average House Prices, Borough</a> provides annual and quarterly house prices based on Land Registry data in the UK. Developers can then subscribe and utilize this dataset to develop their application.</p>
<h4>(ii) Marketplace for Applications</h4>
<p><a href="https://datamarket.azure.com/browse/Applications">Windows Azure Market Place for Application</a>s enables developers to publish and sell their applications. Many, if not all of these applications are SAAS applications built on Windows Azure. Applications submitted to the Marketplace must meet a set of criteria.</p>
<h1>Conclusion</h1>
<p>To conclude, we have examined the huge investment that Microsoft is making and will continue to make in Windows Azure, the core of its cloud strategy. Three fundamental services (Compute, Storage, and Database) are offered to developers to satisfy the basic needs of developing cloud applications. Additionally, with Windows Azure services, (Building Blocks Services, Data Services, Networking, and Marketplace) developers will find it increasingly easy to develop rich and powerful applications. The foundations of this cloud offering are robust and we should continue to look out for new features to be added to this platform.</p>
<h1>References</h1>
<p>This article was written using the following resources as references:</p>
<ul>
<li><a href="http://www.microsoft.com/download/en/details.aspx?id=8396">Windows Azure Platform Training Kit</a> </li>
<li><a href="https://www.windowsazure.com/en-us/home/tour/overview/">https://www.windowsazure.com/en-us/home/tour/overview/</a> </li>
<li><a href="http://azurebootcamp.com/">http://azurebootcamp.com/</a> </li>
</ul>
<blockquote><p align="center"><em><strong>This post was also published at <a href="http://acloudyplace.com/2012/02/an-introduction-to-windows-azure-part-2/">A Cloud Place</a></strong><strong></strong></em><em></em><em><strong> blog.</strong></em></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/05/10/an-introduction-to-windows-azure-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editing your XML documents with Liquid XML Studio</title>
		<link>http://wely-lau.net/2012/05/04/editing-your-xml-documents-with-liquid-xml-studio/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=editing-your-xml-documents-with-liquid-xml-studio</link>
		<comments>http://wely-lau.net/2012/05/04/editing-your-xml-documents-with-liquid-xml-studio/#comments</comments>
		<pubDate>Fri, 04 May 2012 03:18:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/05/04/editing-your-xml-documents-with-liquid-xml-studio/</guid>
		<description><![CDATA[2012-05-04 03:18:38]]></description>
			<content:encoded><![CDATA[<p>As we know XML is a popular file format and standard that has been used for many purposes in the IT industry. Starting from storing configuration file, storing data, transferring via web service, and so many more.</p>
<p>Nonetheless, I believe most of you have ever got frustrated with editing and manipulating XML document. </p>
<p>Recently, I have been introduced to try out a powerful XML editor, <a href="http://www.liquid-technologies.com/xml-studio.aspx">Liquid XML Studio</a>. In fact, it is more than an editor. Liquid XML Studio comes with the following features:</p>
<ul>
<li><a href="http://www.liquid-technologies.com/xml-schema-editor.aspx">XML Schema Editor</a> </li>
<li><a href="http://www.liquid-technologies.com/xml-data-binding.aspx">XML Data Binding Code Generator</a> </li>
<li><a href="http://www.liquid-technologies.com/xmldatamapper.aspx">XML Data Mapper</a> </li>
<li><a href="http://www.liquid-technologies.com/wsdl-editor.aspx">WSDL Editor</a> </li>
<li><a href="http://www.liquid-technologies.com/xml-editor.aspx">XML Editor</a> </li>
<li><a href="http://www.liquid-technologies.com/visual-studio-plugin-xml-tools.aspx">Microsoft Visual Studio Integration (2005, 2008, 2010)</a> </li>
<li><a href="http://www.liquid-technologies.com/web-service-test-client.aspx">Web Service Test Client</a> </li>
<li><a href="http://www.liquid-technologies.com/xpath-viewer.aspx">XPath Expression Builder</a> </li>
<li><a href="http://www.liquid-technologies.com/xsd-to-html.aspx">HTML Documentation Generation</a> </li>
<li><a href="http://www.liquid-technologies.com/xslt-debugger.aspx">XSLT Editor &amp; Debugger</a> </li>
<li><a href="http://www.liquid-technologies.com/xquery-debugger.aspx">XQuery Editor &amp; Debugger</a> </li>
<li><a href="http://www.liquid-technologies.com/large-file-editor.aspx">Large File Editor</a> </li>
<li><a href="http://www.liquid-technologies.com/compare-xml.aspx">XML Diff &#8211; Compare XML Files</a> </li>
</ul>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p>
<table border="0" cellspacing="0" cellpadding="2" width="601">
<tbody>
<tr>
<td valign="top" width="295"><img style="display: inline; float: left" align="left" src="http://www.liquid-technologies.com/Images/ProductScreenShots/Flat/XmlEditor.png?width=800" width="288" height="219" /></td>
<td valign="top" width="304"><img style="display: inline; float: left" align="left" src="http://www.liquid-technologies.com/Images/ProductScreenShots/ReflectivePerspective/XsdEditor1.png?width=800" width="302" height="281" /></td>
</tr>
</tbody>
</table>
<p>Check out this link <a href="http://www.liquid-technologies.com/xml-studio.aspx">http://www.liquid-technologies.com/xml-studio.aspx</a> for more detail of Liquid XML Studio!</p>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/05/04/editing-your-xml-documents-with-liquid-xml-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Introduction to Windows Azure (Part 1)</title>
		<link>http://wely-lau.net/2012/05/01/an-introduction-to-windows-azure-part-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=an-introduction-to-windows-azure-part-1</link>
		<comments>http://wely-lau.net/2012/05/01/an-introduction-to-windows-azure-part-1/#comments</comments>
		<pubDate>Tue, 01 May 2012 01:48:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/05/01/an-introduction-to-windows-azure-part-1/</guid>
		<description><![CDATA[Windows Azure is the Microsoft cloud computing platform which enables developers to quickly develop, deploy, and manage their applications hosted in a Microsoft data center. As a PAAS provider, Windows Azure not only takes care of the infrastructure, but will also help to manage higher level components including operating systems, runtimes, and middleware. This article [...]]]></description>
			<content:encoded><![CDATA[<p align="left">Windows Azure is the Microsoft cloud computing platform which enables developers to quickly develop, deploy, and manage their applications hosted in a Microsoft data center. As a PAAS provider, Windows Azure not only takes care of the infrastructure, but will also help to manage higher level components including operating systems, runtimes, and middleware.</p>
<p>This article will begin by looking at the Windows Azure data centers and will then walk through each of the available services provided by Windows Azure.</p>
<h1>Windows Azure Data Centers</h1>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/datacentres.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Azure Datacenters" alt="Map showing global location of datacenters" src="http://acloudyplace.com/wp-content/uploads/2012/01/datacentres.png" width="500" height="281" /></a></p>
<p align="center"><font size="1"><strong>Slide 17 of WindowsAzureOverview.pptx (Windows Azure Platform Training Kit)</strong></font></p>
<p>Microsoft has invested heavily in Windows Azure over the past few years. Six data centers across three continents have been developed to serve millions of customers. They have been built with an optimized power efficiency mechanism, self-cooling containers, and hardware homogeneity, which differentiates them from other data centers.</p>
<p>The data centers are located in the following cities:</p>
<ul>
<li>US North Central – Chicago, IL </li>
<li>US South Central – San Antonio, TX </li>
<li>West Europe – Amsterdam </li>
<li>North Europe – Dublin </li>
<li>East Asia – Hong Kong </li>
<li>South-East Asia – Singapore </li>
</ul>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/dc1.jpg"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Windows Azure Datacenters" alt="Windows Azure Datacenters- aerial and internal views" src="http://acloudyplace.com/wp-content/uploads/2012/01/dc1-1024x374.jpg" width="502" height="183" /></a></p>
<p align="center"><font size="1"><strong>Windows Azure data centers are vast and intricately sophisticated. </strong></font></p>
<p align="center"><font size="1"><strong>Images courtesy of Microsoft http://azurebootcamp.com</strong></font></p>
<h1>Windows Azure Services</h1>
<p>Having seen the data centers, let’s move on to discuss the various services provided by Windows Azure.</p>
<p>Microsoft has previously categorized the Windows Azure Platform into three main components: Windows Azure, SQL Azure, and Windows Azure AppFabric. However, with the recent launch of the Metro-style <a href="https://www.windowsazure.com/">Windows Azure portal</a>, there are some slight changes to the branding, but the functionality has remained similar.&#160; The following diagram illustrates the complete suite of Windows Azure services available today.</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/chart.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="The complete suite of Windows Azure services available today" alt="The complete suite of Windows Azure services available today" src="http://acloudyplace.com/wp-content/uploads/2012/01/chart.png" width="499" height="294" /></a></p>
<p align="center"><strong><font size="1">The complete suite of Windows Azure services available today</font></strong></p>
<h2>A. Core Services</h2>
<h3>1. Compute</h3>
<p>The Compute service refers to computation power, usually in the form of provisioned Virtual Machines (VMs). In Windows Azure, the compute containers are often referred to as ‘roles’. At the moment, there are three types of roles:</p>
<h4>(i) Web Roles</h4>
<p>Web Roles offer a predefined environment, set-up to allow developers to easily deploy web applications. <a href="http://www.iis.net/overview">Web server IIS (Internet Information Services)</a> has been preinstalled and preconfigured to readily host your web application.</p>
<h4>(ii) Worker Roles</h4>
<p>Worker Roles allow the developer to run an application’s background processes that do not require user interface interaction. Worker Roles are perfectly suitable to run processes such as scheduled batch jobs, asynchronous processing, and number crunching jobs.</p>
<h4>(iii) VM Roles</h4>
<p>VM Roles enable developers to bring their customized Windows Server 2008 R2 VM to the cloud, and configure it. VM Roles are suitable for cases where the prerequisite software requires lengthy, manual installation.</p>
<p>Using VM Roles has one substantial drawback. Unlike Web Roles and Worker Roles, whereby Windows Azure will automatically manage the OS, VM Roles require developers to actively manage the OS.</p>
<p>Apart from ‘roles’, there are two other essential terms, namely ‘VM Size’ and ‘Instance’.</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee814754.aspx">VM Size</a> denotes the predefined specifications that Windows Azure offers for the provisioned VM. The following diagram shows various Windows Azure VM Sizes. </li>
</ul>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/cost.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Various Windows Azure VM Sizes, and the associated costs" alt="Various Windows Azure VM Sizes, and the associated costs" src="http://acloudyplace.com/wp-content/uploads/2012/01/cost-1024x328.png" width="500" height="160" /></a></p>
<p align="center"><strong><font size="1">Slide 21 of WindowsAzureOverview.pptx (Windows Azure Platform Training Kit)</font></strong></p>
<ul>
<li>Instance refers to the actual VM that is provisioned. Developers will need to specify how many instances they need after selecting the VM Size. </li>
</ul>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/s-shot1.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Screenshot showing VM size" alt="Screenshot showing VM size" src="http://acloudyplace.com/wp-content/uploads/2012/01/s-shot1.png" width="368" height="234" /></a></p>
<h3>2.&#160;&#160;&#160;&#160; Storage</h3>
<p>Windows Azure Storage is a cloud storage service that comes with the following characteristics:</p>
<ul>
<li>Highly available with <a href="http://www.microsoft.com/download/en/details.aspx?id=6656">99.9% monthly SLA</a> </li>
<li>Scalable with <a href="http://blogs.msdn.com/b/windowsazurestorage/archive/2010/05/10/windows-azure-storage-abstractions-and-their-scalability-targets.aspx">automatic load-balanced partitioning</a> </li>
<li>Data is replicated for resilience and protection with 3 copies within the same data center,&#160; and <a href="http://blogs.msdn.com/b/windowsazurestorage/archive/2011/09/15/introducing-geo-replication-for-windows-azure-storage.aspx">another 3 copies geo-replicated in another data center</a> </li>
<li>Accessible through <a href="http://blog.smarx.com/posts/windows-azure-storage-libraries-in-many-languages">several libraries</a> including .NET, Java, PHP, Ruby, etc. REST-based API </li>
<li><a href="http://blogs.msdn.com/b/windowsazurestorage/archive/2010/05/10/windows-azure-storage-abstractions-and-their-scalability-targets.aspx">Up to 100TB size limit</a> per storage account </li>
<li><a href="http://www.windowsazure.com/en-us/pricing/calculator/">Cost effective</a>
<ul>
<li>Storage capacity: $ 0.14 per GB per month </li>
<li>Storage transaction: $ 0.01 per 10,000 transaction </li>
</ul>
</li>
</ul>
<p>The first step in using Windows Azure Storage is to create a storage account by specifying storage account name and the region:</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/s-shot2.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Screenshot- creating a storage account" alt="Screenshot- creating a storage account" src="http://acloudyplace.com/wp-content/uploads/2012/01/s-shot2.png" width="499" height="278" /></a></p>
<p>There are four types of storage abstraction that are available today:</p>
<h4>(i) BLOB (Binary Large Object) Storage</h4>
<p>Blob Storage provides a highly scalable, durable, and available file system in the cloud. Blob Storage allows customers to store any file type such as video, audio, photos, or text.</p>
<h4>(ii) Table Storage</h4>
<p>Table Storage provides structured storage that can be used to store non-relational tabular data. A Table is a set of entities, which contain a set of properties. An application can manipulate the entities and query over any of the properties stored in a Table.</p>
<h4>(iii) Queue Storage</h4>
<p>Queue Storage is a reliable and persistent messaging delivery that can be used to bridge applications. Queues are often being used to reliably dispatch asynchronous work.</p>
<h4>(iv) Azure Drive</h4>
<p>Azure Drive (aka X-Drive) provides the capability to store durable data by using the existing Windows NTFS APIs. Azure Drive is essentially <a href="http://blogs.msdn.com/b/windowsazure/archive/2010/02/02/beta-release-of-windows-azure-drive.aspx">a VHD Page Blob</a> mounted as an NTFS drive by a Windows Azure instance.</p>
<h3>3.&#160; Database</h3>
<p>SQL Azure database is a <a href="http://www.microsoft.com/download/en/details.aspx?id=8323">highly available</a> database service built on existing SQL Server technology. Developers do not have to setup, install, configure, or manage any of the&#160; database infrastructure. All developers need to do is define the database name, edition, and size. Developers are then ready to bring the objects and data to the cloud:</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/s-shot3.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Screenshot- creating a database" alt="Screenshot- creating a database" src="http://acloudyplace.com/wp-content/uploads/2012/01/s-shot3.png" width="445" height="245" /></a></p>
<p>SQL Azure uses the same T-SQL language and the same tools as SQL Server Management Studio to manage databases.&#160; SQL Azure is likely to lead to a shift in the responsibility of DBAs toward a more logical administration, as SQL Azure handles physical administration. For example, a SQL Azure database will be replicated to three copies to ensure high-availability.</p>
<p>Although <a href="http://msdn.microsoft.com/en-us/library/ee336245.aspx">some variations exist</a> today, Microsoft plans to support the features unavailable in SQL Azure in the future. <a href="http://www.mygreatwindowsazureidea.com/forums/34685-sql-azure-feature-voting">Users can always vote and provide feedback</a> to the SQL Azure team for upcoming feature consideration.</p>
<p>Coming up in my next article, I will carry on the discussion with the additional services that Windows Azure offers including ‘Building Block Services’, Data Services, Networking and more so make sure you keep an eye out for it because it’s coming soon!</p>
<blockquote><p align="center"><em><strong>This post was also published at <a href="http://acloudyplace.com/2012/01/an-introduction-to-windows-azure-part-1/">A Cloud Place</a></strong><strong></strong></em><em></em><em><strong> blog.</strong></em></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/05/01/an-introduction-to-windows-azure-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Comparing IAAS and PAAS: A Developer&#8217;s Perspective</title>
		<link>http://wely-lau.net/2012/04/16/comparing-iaas-and-paas-a-developers-perspective/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=comparing-iaas-and-paas-a-developers-perspective</link>
		<comments>http://wely-lau.net/2012/04/16/comparing-iaas-and-paas-a-developers-perspective/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 01:21:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/04/16/comparing-iaas-and-paas-a-developers-perspective/</guid>
		<description><![CDATA[In my previous article, I discussed the basic concepts behind Cloud Computing including definitions, characteristics, and various service models. In this article I will discuss service models in more detail, and in particular the comparison between IAAS and PAAS from a developer’s standpoint. I’m using two giant cloud players for illustrative purposes: Amazon Web Service [...]]]></description>
			<content:encoded><![CDATA[<p align="left">In my <a href="http://acloudyplace.com/2012/01/2011/12/a-comprehensive-introduction-to-cloud-computing/">previous article</a>, I discussed the basic concepts behind Cloud Computing including definitions, characteristics, and various service models. In this article I will discuss service models in more detail, and in particular the comparison between IAAS and PAAS from a developer’s standpoint.</p>
<p>I’m using two giant cloud players for illustrative purposes: <a href="http://aws.amazon.com/">Amazon Web Service</a> representing IAAS and <a href="https://www.windowsazure.com/">Windows Azure Platform</a> representing PAAS. Nonetheless, please be informed that the emphasis is on the service models and not the actual cloud players.</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/comparing-iaas-and-paas1.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="comparing iaas and paas" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/01/comparing-iaas-and-paas1-1024x754.png" width="553" height="406" /></a></p>
<p align="center"><strong>Figure 1: IAAS VS PAAS</strong></p>
<h1>Infrastructure as a Service (IAAS)</h1>
<p>IAAS refers to the cloud service model that provides on-demand infrastructure services to the customer. The infrastructure may refer to rentable resources such as computation power, storage, load-balancer, and etc. <strong></strong></p>
<p>As you can see on the left-hand side of Table 1, the IAAS provider will be responsible for managing physical resources, for example network, servers, and clustered machines. Additionally, they typically will also manage virtualization technology enabling customers to run VMs (virtual machines). When it comes to the Operating System (OS), it is often arguable whether it’s managed by the provider or customer. In most cases, the IAAS provider will be responsible for customer VM Images with a preloaded OS but the customer will need to subsequently manage it. Using <a href="http://aws.amazon.com/">AWS</a> as an example, <a href="http://aws.amazon.com/amis">AMI (Amazon Machine Image)</a> offers customers several types of Operating Systems such as <a href="http://aws.amazon.com/windows/">Windows Server</a>, <a href="http://aws.amazon.com/suse/">Linux SUSE</a>, and<a href="http://aws.amazon.com/rhel/">Linux Red Hat</a>. Although the OS is preloaded, AWS will not maintain or update it.<strong></strong></p>
<p>Other stacks of software including middleware (such as <a href="http://www.iis.net/">IIS</a>, <a href="http://tomcat.apache.org/">Tomcat</a>, Caching Services), runtime (<a href="http://www.java.com/en/download/index.jsp">JRE</a> and <a href="http://www.microsoft.com/net">.NET Framework</a>), and databases (<a href="http://www.microsoft.com/sqlserver/en/us/default.aspx">SQL Server</a>, <a href="http://www.oracle.com/us/products/database/index.html">Oracle</a>, <a href="http://www.mysql.com/">MySQL</a>) are normally not provided in the VM Image. That’s because the IAAS provider won’t know and won’t care what customers are going to do with the VM. Customers are responsible for taking care of them. When all of the above mentioned software has been settled, customers will finally deploy the application and data on the VM.</p>
<h2>Step-by-step: Setting-up an Application on IAAS Environment</h2>
<p>To convey a comprehensive explanation, I am going to illustrate the steps involved when setting up an application in an IAAS environment. For that, I’m borrowing a slide from a presentation by <a href="http://blogs.technet.com/b/markrussinovich/">Mark Russinovich</a>, at the <a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-852F">BUILD conference</a>. This illustration explains how a typical IAAS provisioning model works.</p>
<p>&#160;</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/comparing-2.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="comparing 2" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/01/comparing-2-1024x593.png" width="560" height="324" /></a></p>
<p align="center"><strong>Figure 2</strong>:<strong> Setting up an App</strong></p>
<p>Considering a common scenario when you have finished developing a multi-tier application, you as the developer will need to deploy it to the cloud. The application will need to be hosted on a Web Server and an RDBMS database. For IAAS, here are the typical steps:<strong></strong></p>
<p><strong>1.&#160;&#160;&#160;&#160;&#160;&#160; </strong><strong>Preparing Database Servers</strong></p>
<p>Select the VM Images from the VM Images library. The VM Image will then get provisioned and launched. If DBMS software is not provided, you will need to install DBMS on your own.<strong></strong></p>
<p><strong>2.&#160;&#160;&#160;&#160;&#160;&#160; </strong><strong>Preparing Web / Application Servers</strong></p>
<p>Select VM Images from the library to get provisioned and launched. If the web/app server/runtime aren’t installed, you’ll need to install them by yourself.<strong></strong></p>
<p><strong>3.&#160;&#160;&#160;&#160;&#160;&#160; </strong><strong>Provisioning a Database and Its Objects</strong></p>
<p>The next step is about provisioning the database, including configuring the data files, log files, security, etc. Then you create the tables and add data to it.<strong></strong></p>
<p><strong>4.&#160;&#160;&#160;&#160;&#160;&#160; </strong><strong>Deploying Your Application</strong></p>
<p>Next you take the application that you’ve developed and deploy it to the Web Server.<strong></strong></p>
<p><strong>5.&#160;&#160;&#160;&#160;&#160;&#160; Configuring load-balancer</strong></p>
<p>When you need to host your application on multiple instances, you may also need to configure things such as the IP Address for each instance and load balancer.<strong></strong></p>
<p><strong>6.&#160;&#160;&#160;&#160;&#160;&#160; </strong><strong>Managing Your VMs and DMBS</strong></p>
<p>The final step is about managing the VMs. For example, when there’s an update or service pack on the OS, the IAAS provider will not automatically do it for you. Instead, you may need to do it by yourself.</p>
<h1>Platform as a Service (PAAS)</h1>
<p>Now, let’s jump into another cloud spectrum, “PAAS”, to see how it differs. In PAAS, the provisioning model is about an on-demand application hosting environment. Not only managing the component like an IAAS provider would, a PAAS provider will also help customers manage additional responsibilities such as OS, Middleware, Runtime, and even Databases, as can be seen on the right-hand side of&#160; Table 1.</p>
<p>In other words, you can think of PAAS as renting a stack of software, hardware, and infrastructure. Customer will just need to bring the application and data and they are ready to go.</p>
<h2>Step-by-step: Setting-up an Application on PAAS Environment</h2>
<p>For PAAS, given that the database server, VM, and web server VM are readily provisioned, you just need to do two steps, as illustrated by another slide from <a href="http://blogs.technet.com/b/markrussinovich/">Mark Russinovich</a>.</p>
<p>&#160;</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/comparing-3.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="comparing 3" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/01/comparing-3.png" width="553" height="331" /></a></p>
<p align="center"><strong>Figure 3: Provision and Deploy</strong></p>
<p><strong>1.&#160;&#160;&#160;&#160;&#160;&#160; </strong><strong>Database Provisioning</strong></p>
<p>You might need to indicate where (which region) your virtual DB Server is provisioned, but you don’t have to install a bunch of DBMS software on your own. You will need to provision the database, create tables, and add data.<strong></strong></p>
<p><strong>2.&#160;&#160;&#160;&#160;&#160;&#160; </strong><strong>Deploying Your Application</strong></p>
<p>This is a similar step applicable to IAAS, you will still need to deploy your application on the PAAS cloud environment.</p>
<p>How about the load-balancer? Take Windows Azure as example, it will all automatically be configured and ready to take the traffic, and everything else will be automatically managed. You don’t have to worry about IP Addresses or a load-balancer.</p>
<p>How about maintaining VMs? The DBMS and Web Server VM will be maintained by the provider. For example:</p>
<ul>
<li>If the VM where your application is hosted has any hardware issues, the provider should be able to detect the failure and rectify it immediately to make sure that your application will stay up and running. In Windows Azure, <a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-853T">Fabric Controller</a> will be the component handling these kinds of issues. </li>
<li>If there are new updates or patches on the Operating System, the provider will make sure that the VM your application sits on is always updated. For example: Windows Azure uses “<a href="http://msdn.microsoft.com/en-us/library/ee924680.aspx">Guest OS Version</a>” to differentiate service updates. Of course you can also choose to stick to one version or auto-update. </li>
</ul>
<p>&#160;</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2012/01/Comparing-4.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Comparing 4" alt="" src="http://acloudyplace.com/wp-content/uploads/2012/01/Comparing-4.png" width="543" height="354" /></a></p>
<p align="center"><strong>Figure 4: Configuration</strong></p>
<h1>Summary</h1>
<p>To summarize, we have investigated different service models and provisioning steps of IAAS and PAAS solutions. PAAS providers indeed take on much more responsibility for your solution than an IAAS provider would. On the other side, IAAS may offer more flexibility at lower level (example: public IP addresses, load-balancer, etc.).</p>
<p>There’s no one-size-fits-all here. As a developer or architect, you should understand a customer’s need and determine the correct model to get the best possible outcome. <strong></strong></p>
<blockquote><p align="center"><em><strong>This post was also published at </strong><a href="http://acloudyplace.com/2012/01/comparing-iaas-and-paas-a-developers-perspective/">A Cloud Place</a><strong></strong></em><em></em><em><strong> blog.</strong></em></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/04/16/comparing-iaas-and-paas-a-developers-perspective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Comprehensive Introduction to Cloud Computing</title>
		<link>http://wely-lau.net/2012/03/29/a-comprehensive-introduction-to-cloud-computing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-comprehensive-introduction-to-cloud-computing</link>
		<comments>http://wely-lau.net/2012/03/29/a-comprehensive-introduction-to-cloud-computing/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 01:38:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/03/29/a-comprehensive-introduction-to-cloud-computing/</guid>
		<description><![CDATA[Introduction I’m aware that there many cloud computing introductory articles or papers out there, so why am I writing another one? As this my first article at A Cloudy Place, I’d like to start at the beginning and take a new approach to explain the cloud. Would you rather buy or rent a car? The [...]]]></description>
			<content:encoded><![CDATA[<h1 align="left">Introduction</h1>
<p>I’m aware that there many cloud computing introductory articles or papers out there, so why am I writing another one? As this my first article at <strong>A Cloudy Place</strong>, I’d like to start at the beginning and take a new approach to explain the cloud.</p>
<h2>Would you rather buy or rent a car?</h2>
<p>The analogy that I will be using is very simple and I believe some readers have probably run into it at some point. Have you ever considered buying or renting a car?</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2011/11/iStock_000011392250XSmall.jpg"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Buy or Rent?" alt="Buying or Renting Cloud Computing" src="http://acloudyplace.com/wp-content/uploads/2011/11/iStock_000011392250XSmall.jpg" width="416" height="288" /></a></p>
<h3>Buy Your Own Car</h3>
<p>Buying a car is a big investment, and there are a lot of important decisions to take into account. Some people like all the different options, and others don’t want to bother with thousands of decisions.&#160; When buying a car you have full control over everything, its make and model, cost, interior, etc. Additionally, you’ve got to work about taxes, insurance, inspections, and all sorts of maintenance, you’ve got the control, but it comes with a hassle.</p>
<h3>Renting a Car</h3>
<p>Then how about renting a car? You have fewer and simpler decisions to make. You just need to select a car from what’s available, and you can switch your car if something comes up.</p>
<p>Rent when you need; pay when you use. You don’t have to worry about maintenance costs, tax, and insurance since they are included in your rental fee. On the other hand, there are obviously some disadvantages. You’re limited by what’s available from the rental vendor, you may not be allowed to customize the car, and the car is not dedicated to you all the time.</p>
<p> <strong></strong><br />
<h2>Translating the Analogy to Cloud Computing</h2>
<p>This simple real life analogy is easily translatable to Cloud Computing.</p>
<p>Buying your own car is similar to setting up your own on-premise data center. You have the flexibility to customize whatever you like, starting from physical infrastructure, the security system, hardware and software, etc. However, you also have to invest a lot of money upfront. And also, you will also need to manage it later when it’s operating.</p>
<p>On the other hand, instead of building your own data center, you can rent computation power and storage from the cloud provider. You can scale in and out when necessary. Just pay when you use. No specific commitment takes place. You can start and stop anytime.</p>
<h1>Characteristics of Cloud Computing</h1>
<p>This summarizes the characteristics of cloud computing.</p>
<ul>
<li><strong>On-demand</strong> </li>
</ul>
<blockquote><p><strong></strong>Resources should be always available when you need them, and you have control over turning them on or off to ensure there’s no lack of resource or wastage happen.</p>
</blockquote>
<ul>
<li><strong>Scalable</strong> </li>
</ul>
<blockquote><p>You should be able to scale (increase or decrease the resource) when necessary. The cloud providers should have sufficient capacity to meet customer’s needs.</p>
</blockquote>
<ul>
<li><strong>Multi-tenant</strong> </li>
</ul>
<blockquote><p><strong></strong>Sometimes you may be sharing the same resource (e.g. hardware) with another tenant. But of course, this is transparent to the customer. Cloud provider shall responsible the security aspect, ensuring that one tenant won’t be able to access other’s data.</p>
</blockquote>
<ul>
<li><strong>Self-service computation and storage resource</strong> </li>
</ul>
<blockquote><p><strong></strong>Related processes including: billing, resource provisioning, and deployment should be self-service and automated, involving much less manual processing. If a machine where our service is hosted fails, the cloud provider should be able to failover our service immediately.</p>
</blockquote>
<ul>
<li><strong>Reliability</strong> </li>
</ul>
<blockquote><p><strong></strong>Cloud provider should be able to provide customer reliability service, committing to uptimes of their service.</p>
</blockquote>
<ul>
<li><strong>Utility-based subscription</strong> </li>
</ul>
<blockquote><p><strong></strong>You will pay the cloud provider as a utility based subscription, just like paying your electricity bill – without any upfront investment.</p>
</blockquote>
<h1>Cloud Computing Service Model</h1>
<p>Cloud Computing consists of several type of service models.</p>
<p><a href="http://acloudyplace.com/wp-content/uploads/2011/11/cloud-service-model.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="cloud service model" alt="" src="http://acloudyplace.com/wp-content/uploads/2011/11/cloud-service-model.png" width="551" height="351" /></a></p>
<ul>
<li><strong>On-premise Environment</strong>       <br />As you can see, for the first stack from left, you will need to take care of everything from networking all the way up to applications. This is typically what many of us are doing today. </li>
</ul>
<ul>
<li><strong>IaaS (Infrastructure as a Service)</strong>       <br />IaaS helps you to take care of some of the components, starting from networking to provisioning the OS. But you are responsible for the middleware, runtime, data, and application. Sometimes IaaS vendors will just provide the OS but will not manage updates or patches for you. You basically just rent the virtual machine (VM) with the preferred OS installed. They won’t care what you do with the VM.       <br />Example of IaaS market players: <a href="http://aws.amazon.com/">Amazon Web Service</a>, <a href="http://www.rackspace.com/">Rackspace</a>, and <a href="http://www.vmware.com/products/vcloud/overview.html">VMware vCloud</a>. </li>
</ul>
<ul>
<li><strong>PaaS (Platform as a Service)</strong>       <br />Paas is one level up from IaaS, where cloud providers not only take care of the components that IaaS does; but also manage the platform-level components like middleware and runtime. Middleware such as applications / web server (IIS, JBoss, Tomcat, etc.) and runtime (.NET Framework, Java runtime) will be pre-installed. As a customer, you just need to focus on managing application and data.       <br />Example of PaaS market player: <a href="http://code.google.com/appengine/">Google AppEngine</a>, <a href="http://www.microsoft.com/windowsazure/">Windows Azure Platform</a>, and<a href="http://www.force.com/">force.com</a>. </li>
</ul>
<ul>
<li><strong>SaaS (Software as a Service)</strong>       <br />SaaS is probably the most common one as we may have been using it, unaware that they are actually cloud services. SaaS takes care of all the stacks from networking to application level. You don’t even manage the application and data storage. All you need to do is to use the system.       <br />Example of SaaS market player: <a href="http://gmail.com/">GMail</a>, <a href="http://www.office365.com/">Office 365</a>, and <a href="https://docs.google.com/">Google Docs</a>. </li>
</ul>
<h1>Cloud Computing Deployment Model</h1>
<p>There are three main cloud deployment models, each on with its own set of customers it’s targeting.</p>
<ul>
<li><strong>Public Cloud</strong>       <br />Public cloud provider refers to the cloud platform that targets any types of customers, regardless of whether they’re an independent consumer, enterprise, or even public sector. Normally, public cloud providers are considered prominent players which have invested huge amount of capital. <a href="http://www.microsoft.com/windowsazure/">Windows Azure Platform</a> by Microsoft, <a href="http://aws.amazon.com/">AWS</a> by Amazon, <a href="http://code.google.com/appengine/">AppEngine</a> and <a href="http://gmail.com/">Gmail</a> by Google, etc. are all examples of public cloud services. Customers who possess sensitive data and application normally do not feel comfortable using public cloud due to privacy, policy, and security concerns. Remember, for public cloud, the application and data will be stored in the provider’s data center. </li>
</ul>
<ul>
<li><strong>Private Cloud</strong>       <br />Private cloud is infrastructure that’s hosted internally, targeting specific customers or sometimes exclusively within an organization. Setting up a private cloud is normally more affordable when compared to a public cloud. As the matter of fact, there are many organizations who have implemented their own private cloud system with product offering from vendors such as <a href="http://www.ibm.com/cloud-computing/us/en/">IBM</a>, <a href="http://www8.hp.com/us/en/solutions/solutions-detail.html?compURI=tcm:245-300983&amp;pageTitle=cloud-computing&amp;contentView=business">HP</a>, <a href="http://www.microsoft.com/en-us/server-cloud/private-cloud/">Microsoft</a>, and so on. Customers who possess sensitive data and application feel more comfortable going with this approach since the data and application are hosted privately. </li>
</ul>
<ul>
<li><strong>Hybrid Cloud</strong>       <br />Hybrid cloud is the combination of public and private clouds, or sometimes on-premise services. Customers who look into this solution generally want to utilize the scalability and cost-competitiveness that public cloud providers offer, but also want to retain their sensitive data on-premise or in a private cloud. With the benefits derived from both deployment models, the hybrid model solution has become more popular nowadays. </li>
</ul>
<p>I sincerely hope that, this article would be helpful to you. In my next article, I’ll discuss more about the comparison between IaaS and PaaS.</p>
<blockquote><p align="center"><em><strong>This post was also published at </strong><a href="http://acloudyplace.com/2011/12/a-comprehensive-introduction-to-cloud-computing/" target="_blank"><strong>A Cloud Place</strong></a></em><em></em><em><strong> blog.</strong></em></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/03/29/a-comprehensive-introduction-to-cloud-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applying Config Transformation app.config in Windows Azure Worker Role</title>
		<link>http://wely-lau.net/2012/03/14/applying-config-transformation-app-config-in-windows-azure-worker-role/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=applying-config-transformation-app-config-in-windows-azure-worker-role</link>
		<comments>http://wely-lau.net/2012/03/14/applying-config-transformation-app-config-in-windows-azure-worker-role/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 08:19:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Config]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/03/14/applying-config-transformation-app-config-in-windows-azure-worker-role/</guid>
		<description><![CDATA[Background In many cases, we need to have two different set of configuration settings (let say: one for development environment and another one for production environment). What we normally do is to change the setting one by one manually before deploying to production server and change them back again to development. This is very annoying [...]]]></description>
			<content:encoded><![CDATA[<h1>Background</h1>
<p>In many cases, we need to have two different set of configuration settings (let say: one for development environment and another one for production environment). What we normally do is to change the setting one by one manually before deploying to production server and change them back again to development. This is very annoying especially when you have many settings.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/dd465326(VS.100).aspx">Web.config transformation</a> is an awesome technique to transform the original web.config into another one with slightly changed of settings. </p>
<p>You could find more detail about how to configure and use it <a href="http://msdn.microsoft.com/en-us/library/dd465326(VS.100).aspx">here</a> in common ASP.NET project.</p>
<h1>Transforming App.Config with some trick</h1>
<p>The bad news is the technique is only built-in for web.config for ASP.NET Web Project, not others like Windows Form, Console App, etc.!</p>
<p>The good news is we can do some trick to make it works. The idea is to perform some modifications on its project file as illustrated in this <a href="http://mitasoft.wordpress.com/2011/09/28/multipleappconfig/">post</a>.</p>
<h1>Config Transformation in Windows Azure</h1>
<p>Since SDK 1.5 (if I remember correctly), VS Tools for Windows Azure enables us to select service configuration and build configuration.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/1.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="1" border="0" alt="1" src="http://cdn.wely-lau.net/wordpress/2012/03/1_thumb.jpg" width="244" height="138" /></a></p>
<p>Service Configuration is essentially configuration for Windows Azure services. You can have two or more different configurations, let say one for local (<strong>ServiceConfiguration.Local.cscfg</strong>) and another one for cloud environment (<strong>ServiceConfiguration.Cloud.cscfg</strong>).</p>
<p>Build configuration is either your <strong>web.config</strong> (for Web Role) and <strong>app.config</strong> (for Worker Role). Let say one for debug (<strong>Web.Debug.config</strong>) and another one for release (<strong>Web.Release.config</strong>).</p>
<h1>App.Config in Windows Azure Worker Role</h1>
<p>For web.config, it certainly works well. Unfortunately, it doesn’t applicable for app.config (Worker Role project) <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-cryingface" alt="Crying face" src="http://cdn.wely-lau.net/wordpress/2012/03/wlEmoticon-cryingface.png" />. Although if you try to apply the <a href="http://mitasoft.wordpress.com/2011/09/28/multipleappconfig/">technique above</a> to your App.config inside your Worker Role, it still won’t work.</p>
<p>That is the reason why I am writing this article <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://cdn.wely-lau.net/wordpress/2012/03/wlEmoticon-winkingsmile.png" />.</p>
<h2>Using SlowCheetah – XML Transforms</h2>
<p>The idea is utilizing an Visual Studio add-on <a href="http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5">SlowCheetah &#8211; XML Transforms</a> to help us perform xml transformation. This is an awesome tools (not only for Windows Azure project) that can help us add and preview applicable on config. Thanks to <a href="http://www.cnblogs.com/robottech">JianBo</a> for recommending me this tool!</p>
<h1>How to?</h1>
<p>Let’s see how it will be done …</p>
<p>1. Download and install <a href="http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5">SlowCheetah &#8211; XML Transforms</a>. You might need to restart your Visual Studio after the installation. </p>
<p>2. Prepare your Windows Azure Worker Role project. I named my Windows Azure project: <strong>WindowsAzureWorkerConfigDemo</strong> and my Worker Role: <strong>WorkerRole1</strong>.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/4.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="4" border="0" alt="4" src="http://cdn.wely-lau.net/wordpress/2012/03/4_thumb.jpg" width="244" height="164" /></a></p>
<p>3. Open the <strong>app.config</strong> file and add the following value:</p>
<pre class="code"><span style="color: blue">&lt;?</span><span style="color: #a31515">xml </span><span style="color: red">version</span><span style="color: blue">=</span>&quot;<span style="color: blue">1.0</span>&quot; <span style="color: red">encoding</span><span style="color: blue">=</span>&quot;<span style="color: blue">utf-8</span>&quot; <span style="color: blue">?&gt;
&lt;</span><span style="color: #a31515">configuration</span><span style="color: blue">&gt;
 <font style="background-color: #ffff00"> &lt;</font></span><span style="color: #a31515"><font style="background-color: #ffff00">appSettings</font></span><font style="background-color: #ffff00"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">add </span><span style="color: red">key</span><span style="color: blue">=</span>&quot;<span style="color: blue">setting1</span>&quot; <span style="color: red">value</span><span style="color: blue">=</span>&quot;<span style="color: blue">original</span>&quot;</font><font style="background-color: #ffff00"><span style="color: blue">/&gt;
  &lt;/</span><span style="color: #a31515">appSettings</span></font><span style="color: blue"><font style="background-color: #ffff00">&gt;
</font>    &lt;</span><span style="color: #a31515">system.diagnostics</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">trace</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">listeners</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">add </span><span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35</span>&quot;
                    <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">AzureDiagnostics</span>&quot;<span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">filter </span><span style="color: red">type</span><span style="color: blue">=</span>&quot;&quot; <span style="color: blue">/&gt;
                &lt;/</span><span style="color: #a31515">add</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">listeners</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">trace</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">system.diagnostics</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">configuration</span><span style="color: blue">&gt;
</span></pre>
<p>Remember to save the file after adding that value.</p>
<p>4. Right-click on <strong>app.config</strong> and select <strong>Add Transform</strong>. (This Add Transform menu will only appear if you’ve successfully install the SlowCheetah). If Visual Studio prompts you for Add Transform Project Import, click on Yes to proceed.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/2.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="2" border="0" alt="2" src="http://cdn.wely-lau.net/wordpress/2012/03/2_thumb.jpg" width="244" height="233" /></a></p>
<p>5. You will then see there are children file (<strong>app.Debug.config</strong> and <strong>app.Release.config</strong>) below your app.config.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/5.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="5" border="0" alt="5" src="http://cdn.wely-lau.net/wordpress/2012/03/5_thumb.jpg" width="244" height="135" /></a></p>
<p>6. Double-click on the <strong>app.Release.config</strong> and add the following snippet:</p>
<pre class="code"><span style="color: blue">&lt;?</span><span style="color: #a31515">xml </span><span style="color: red">version</span><span style="color: blue">=</span>&quot;<span style="color: blue">1.0</span>&quot; <span style="color: red">encoding</span><span style="color: blue">=</span>&quot;<span style="color: blue">utf-8</span>&quot; <span style="color: blue">?&gt;
&lt;!-- </span><span style="color: green">For more information on using transformations
     see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. </span><span style="color: blue">--&gt;
&lt;</span><span style="color: #a31515">configuration </span><span style="color: red">xmlns:xdt</span><span style="color: blue">=</span>&quot;<span style="color: blue">http://schemas.microsoft.com/XML-Document-Transform</span>&quot;<span style="color: blue">&gt;
  <font style="background-color: #ffff00">&lt;</font></span><span style="color: #a31515"><font style="background-color: #ffff00">appSettings</font></span><font style="background-color: #ffff00"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">add </span><span style="color: red">key</span><span style="color: blue">=</span>&quot;<span style="color: blue">setting1</span>&quot; <span style="color: red">value</span><span style="color: blue">=</span>&quot;<span style="color: blue">new value</span>&quot; <span style="color: red">xdt:Transform</span><span style="color: blue">=</span>&quot;<span style="color: blue">SetAttributes</span>&quot; <span style="color: red">xdt:Locator</span><span style="color: blue">=</span>&quot;<span style="color: blue">Match(key)</span>&quot; </font><font style="background-color: #ffff00"><span style="color: blue">/&gt;
  &lt;/</span><span style="color: #a31515">appSettings</span></font><span style="color: blue"><font style="background-color: #ffff00">&gt;
</font>&lt;/</span><span style="color: #a31515">configuration</span><span style="color: blue">&gt;
</span></pre>
<p>As you could see, I’ve change the value of <strong>setting1</strong> into “<strong>new value</strong>”. </p>
<p>The “<strong>xdt:Transform=SetAttributes</strong>” indicates that the action that will be perform. In this case, it sets the attribute of the entry.</p>
<p>The “<strong>xdt:Locator=”Match(key)</strong>” indicates the condition when it will be perform. In this case, when the “<strong>key</strong>” is matched.</p>
<p>You can refer to <a href="http://msdn.microsoft.com/en-us/library/dd465326.aspx">this post</a> to see what are the other possible values for <strong>xdt:Transform</strong> and <strong>xdt:Locator</strong>.</p>
<p>Remember to save the file after adding the settings.</p>
<p>7. Now, right-click on the <strong>app.Release.config</strong> and click on <strong>Preview Transform</strong>. (Again: it will be only appeared if SlowCheetah is properly installed).</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/6.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="6" border="0" alt="6" src="http://cdn.wely-lau.net/wordpress/2012/03/6_thumb.jpg" width="307" height="191" /></a></p>
<p>8. Now, you can see the comparison between the original <strong>app.config</strong> and <strong>app.Release.config</strong>.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/7.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="7" border="0" alt="7" src="http://cdn.wely-lau.net/wordpress/2012/03/7_thumb.jpg" width="570" height="271" /></a></p>
<p>9. Right-click your Windows Azure project and click “<strong>Unload Project</strong>”. Right-click on it again and select Edit [your Windows Azure project].ccproj file.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/10.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="10" border="0" alt="10" src="http://cdn.wely-lau.net/wordpress/2012/03/10_thumb.jpg" width="399" height="178" /></a></p>
<p>10. Scroll down to the end of the file and add the following snippet before the closing tag of project.</p>
<pre class="code">  <span style="color: blue">&lt;</span><span style="color: #a31515">Import </span><span style="color: red">Project</span><span style="color: blue">=</span>&quot;<span style="color: blue">$(CloudExtensionsDir)Microsoft.WindowsAzure.targets</span>&quot; <span style="color: blue">/&gt;
 <font style="background-color: #ffff00"> &lt;</font></span><font style="background-color: #ffff00"><span style="color: #a31515">Target </span><span style="color: red">Name</span><span style="color: blue">=</span>&quot;<span style="color: blue">CopyWorkerRoleConfigurations</span>&quot; <span style="color: red">BeforeTargets</span><span style="color: blue">=</span>&quot;<span style="color: blue">AfterPackageComputeService</span>&quot;</font><font style="background-color: #ffff00"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Copy </span><span style="color: red">SourceFiles</span><span style="color: blue">=</span>&quot;<span style="color: blue">..WorkerRole1bin$(Configuration)WorkerRole1.dll.config</span>&quot;
          <span style="color: red">DestinationFolder</span><span style="color: blue">=</span>&quot;<span style="color: blue">$(IntermediateOutputPath)WorkerRole1</span>&quot; <span style="color: red">OverwriteReadOnlyFiles</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; </font><font style="background-color: #ffff00"><span style="color: blue">/&gt;
  &lt;/</span><span style="color: #a31515">Target</span></font><span style="color: blue"><font style="background-color: #ffff00">&gt;</font>
&lt;/</span><span style="color: #a31515">Project</span><span style="color: blue">&gt;
</span></pre>
<p>What it does is basically performing a task each time before packaging the Windows Azure service. The task is to copy the <strong>WorkerRole1.dll.config</strong> file to the <strong>IntermediateOutputPath</strong>. </p>
<p>Save and close the file. Right-click and select <strong>Reload Project</strong> again on the Windows Azure project. </p>
<p>11. Alright, we should package it now and see if it really works. To do that, right-click on Windows Azure project and select Package. Choose Release for the build configuration. Click on <strong>Package</strong> to package the file.</p>
<p align="center"><a href="http://cdn.wely-lau.net/wordpress/2012/03/8.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="8" border="0" alt="8" src="http://cdn.wely-lau.net/wordpress/2012/03/8_thumb.jpg" width="307" height="164" /></a>&#160;<a href="http://cdn.wely-lau.net/wordpress/2012/03/9.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="9" border="0" alt="9" src="http://cdn.wely-lau.net/wordpress/2012/03/9_thumb.jpg" width="244" height="146" /></a></p>
<p align="left">When Release is selected, we expect the value of “<strong>setting1</strong>” would be “<strong>new value</strong>” as we set inside the <strong>app.Release.config</strong>.</p>
<p>12. Verification</p>
<p>As the service is successfully packaged, you can see two files as usual (one is <strong>ServiceConfiguration.Cloud.cscfg</strong> and another one is <strong>WindowsAzureWorkerConfigDemo.cspkg</strong>).</p>
<p>To verify the correct configuration is included, change the extension of the <strong>cspkg</strong> file into <strong>.zip</strong> and unzip it. Inside the directory, look for the biggest size file (start with <strong>WorkerRole1</strong>, since I name my Worker Role project “<strong>WorkerRole1</strong>”).</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/11.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="11" border="0" alt="11" src="http://cdn.wely-lau.net/wordpress/2012/03/11_thumb.jpg" width="455" height="162" /></a></p>
<p>Change its extension to <strong>.zip</strong> and unzip it again. Navigate inside that directory and look for “<strong>approot</strong>” directory. You could see the <strong>WorkerRole1.dll.config</strong> file inside.</p>
<p>13. Open that file and check out if it’s the correct value, set in our “<strong>release</strong>” build.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/03/12.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="12" border="0" alt="12" src="http://cdn.wely-lau.net/wordpress/2012/03/12_thumb.jpg" width="440" height="171" /></a></p>
<p>Mine is correct, how about yours?</p>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/03/14/applying-config-transformation-app-config-in-windows-azure-worker-role/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uploading Big Files in Windows Azure Blob Storage using PutListBlock</title>
		<link>http://wely-lau.net/2012/02/26/uploading-big-files-in-windows-azure-blob-storage-with-putlistblock/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=uploading-big-files-in-windows-azure-blob-storage-with-putlistblock</link>
		<comments>http://wely-lau.net/2012/02/26/uploading-big-files-in-windows-azure-blob-storage-with-putlistblock/#comments</comments>
		<pubDate>Sun, 26 Feb 2012 05:40:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Windows Azure Storage]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/02/26/uploading-big-files-in-windows-azure-blob-storage-with-putlistblock/</guid>
		<description><![CDATA[Windows Azure Blob Storage could be analogized as file-system on the cloud. It enables us to store any unstructured data file such as text, images, video, etc. In this post, I will show how to upload big file into Windows Azure Storage. Please be inform that we will be using Block Blob for this case. [...]]]></description>
			<content:encoded><![CDATA[<p>Windows Azure Blob Storage could be analogized as file-system on the cloud. It enables us to store any unstructured data file such as text, images, video, etc. In this post, I will show how to upload big file into Windows Azure Storage. Please be inform that we will be using Block Blob for this case. For more information about Block Blob and Page Block, please visit <a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee691964.aspx">here</a>.</p>
<p>I am assume that you know how to upload a file to Windows Azure Storage. If you don’t know, I would recommend you to check out <a href="http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_exploringwindowsazurestoragevs2010_topic3#_Toc310346229">this lab</a> from Windows Azure Training Kit.</p>
<h1>Uploading a blob (commonly-used technique)</h1>
<p>The following snippet show you how to upload a blob using a commonly-used technique, <strong>blob.UploadFromStream()</strong> which eventually invoking <a href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179451.aspx">PutBlob REST-API</a>. </p>
<pre class="code"><span style="color: blue">protected void </span>btnUpload_Click(<span style="color: blue">object </span>sender, <span style="color: #2b91af">EventArgs </span>e)
{
    <span style="color: blue">var </span>storageAccount = <span style="color: #2b91af">CloudStorageAccount</span>.FromConfigurationSetting(<span style="color: #a31515">&quot;DataConnectionString&quot;</span>);
    blobClient = storageAccount.CreateCloudBlobClient();

    <span style="color: #2b91af">CloudBlobContainer </span>container = blobClient.GetContainerReference(<span style="color: #a31515">&quot;image2&quot;</span>);
    container.CreateIfNotExist();

    <span style="color: blue">var </span>permission = container.GetPermissions();
    permission.PublicAccess = <span style="color: #2b91af">BlobContainerPublicAccessType</span>.Container;
    container.SetPermissions(permission);

    <span style="color: blue">string </span>name = fu.FileName;
    <span style="color: #2b91af">CloudBlob </span>blob = container.GetBlobReference(name);
    blob.UploadFromStream(fu.FileContent);
}</pre>
<p>The above code snippet works well in most case. Although you could upload at maximum 64 MB per file (for block blob), it’s more recommended to upload using another technique which I am going to describe more detail.</p>
<h1>Uploading a blob by splitting it into chunks and calling PutBlockList</h1>
<p>The idea of this technique is to split a block blob into smaller chunk of blocks, uploading them one-by-one or in-parallel and eventually join them all by calling <a href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179467.aspx">PutBlockList()</a>.</p>
<pre class="code"><span style="color: blue">protected void </span>btnUpload_Click(<span style="color: blue">object </span>sender, <span style="color: #2b91af">EventArgs </span>e)
{
    <span style="color: #2b91af">CloudBlobClient </span>blobClient;
    <span style="color: blue">var </span>storageAccount = <span style="color: #2b91af">CloudStorageAccount</span>.FromConfigurationSetting(<span style="color: #a31515">&quot;DataConnectionString&quot;</span>);
    blobClient = storageAccount.CreateCloudBlobClient();

    <span style="color: #2b91af">CloudBlobContainer </span>container = blobClient.GetContainerReference(<span style="color: #a31515">&quot;mycontainer&quot;</span>);
    container.CreateIfNotExist();

    <span style="color: blue">var </span>permission = container.GetPermissions();
    permission.PublicAccess = <span style="color: #2b91af">BlobContainerPublicAccessType</span>.Container;
    container.SetPermissions(permission);

    <span style="color: blue">string </span>name = fu.FileName;
    <span style="color: #2b91af">CloudBlockBlob </span>blob = container.GetBlockBlobReference(name);

    blob.UploadFromStream(fu.FileContent);

    <span style="color: blue">int </span>maxSize = 1 * 1024 * 1024; <span style="color: green">// 4 MB

    </span><span style="color: blue">if </span>(fu.PostedFile.ContentLength &gt; maxSize)
    {
        <span style="color: blue">byte</span>[] data = fu.FileBytes;
        <span style="color: blue">int </span>id = 0;
        <span style="color: blue">int </span>byteslength = data.Length;
        <span style="color: blue">int </span>bytesread = 0;
        <span style="color: blue">int </span>index = 0;
        <span style="color: #2b91af">List</span>&lt;<span style="color: blue">string</span>&gt; blocklist = <span style="color: blue">new </span><span style="color: #2b91af">List</span>&lt;<span style="color: blue">string</span>&gt;();
        <span style="color: blue">int </span>numBytesPerChunk = 250 * 1024; <span style="color: green">//250KB per block

        </span><span style="color: blue">do
        </span>{
            <span style="color: blue">byte</span>[] buffer = <span style="color: blue">new byte</span>[numBytesPerChunk];
            <span style="color: blue">int </span>limit = index + numBytesPerChunk;
            <span style="color: blue">for </span>(<span style="color: blue">int </span>loops = 0; index &lt; limit; index++)
            {
                buffer[loops] = data[index];
                loops++;
            }
            bytesread = index;
            <span style="color: blue">string </span>blockIdBase64 = <span style="color: #2b91af">Convert</span>.ToBase64String(System.<span style="color: #2b91af">BitConverter</span>.GetBytes(id));

            blob.PutBlock(blockIdBase64, <span style="color: blue">new </span><span style="color: #2b91af">MemoryStream</span>(buffer, <span style="color: blue">true</span>), <span style="color: blue">null</span>);
            blocklist.Add(blockIdBase64);
            id++;
        } <span style="color: blue">while </span>(byteslength - bytesread &gt; numBytesPerChunk);

        <span style="color: blue">int </span>final = byteslength - bytesread;
        <span style="color: blue">byte</span>[] finalbuffer = <span style="color: blue">new byte</span>[final];
        <span style="color: blue">for </span>(<span style="color: blue">int </span>loops = 0; index &lt; byteslength; index++)
        {
            finalbuffer[loops] = data[index];
            loops++;
        }
        <span style="color: blue">string </span>blockId = <span style="color: #2b91af">Convert</span>.ToBase64String(System.<span style="color: #2b91af">BitConverter</span>.GetBytes(id));
        blob.PutBlock(blockId, <span style="color: blue">new </span><span style="color: #2b91af">MemoryStream</span>(finalbuffer, <span style="color: blue">true</span>), <span style="color: blue">null</span>);
        blocklist.Add(blockId);

        blob.PutBlockList(blocklist);
    }
    <span style="color: blue">else
        </span>blob.UploadFromStream(fu.FileContent);
}</pre>
<h2>Explanation about the code snippet</h2>
<p>Since the idea is to split the big file into chunks. We would need to define size of each chunk, in this case 250KB. By dividing actual size with size of each chunk, we should be able to know number of chunk we need to split.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/02/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://cdn.wely-lau.net/wordpress/2012/02/image_thumb.png" width="541" height="275" /></a></p>
<p>We also need to have a list of string (in this case: <strong>blocklist</strong> variable) to determine the blocks are in one group. Then we will loop to through each chunk and perform and upload by calling blob.PutBlock() and add it (as form of Base64 String) into the blocklist. </p>
<p>Note that there’s actually a left-over block that didn’t uploaded inside the loop. We will need to upload it again. When all blocks are successfully uploaded, finally we call blob.PutBlockList(). Calling PutListBlock() will commit all the blocks that we’ve uploaded previously.</p>
<h1>Pros and Cons</h1>
<h2>The benefits (pros) of the technique</h2>
<p>There’re a few benefit of using this technique:</p>
<ul>
<li>In the event where uploading one of the block fail due to whatever condition like connection time-out, connection lost, etc. We’ll just need to upload that particular block only, not the entire big file / blob.</li>
<li>It’s also possible to upload each block in-parallel which might result shorter upload time.</li>
<li>The first technique will only allow you to upload a block blob at maximum 64MB. With this technique, you can do more almost unlimited.</li>
</ul>
<h2>The drawbacks (cons) of the technique</h2>
<p>Despite of the benefits, there’re also a few drawbacks:</p>
<ul>
<li>You have more code to write. As you can see from the sample, you can simply call the one line blob.UploadFromStream() in the first technique. But you will need to write 20+ lines of code for the second technique.</li>
<li>It incurs more storage transaction as may lead to higher cost in some case. Referring to <a href="http://blogs.msdn.com/b/windowsazurestorage/archive/2010/07/09/understanding-windows-azure-storage-billing-bandwidth-transactions-and-capacity.aspx">a post by Azure Storage team.</a> The more chuck you have, the more storage transaction is incurred. </li>
</ul>
<blockquote>
<p><strong>Large blob upload that results in 100 requests via PutBlock, and then 1 PutBlockList for commit = 101 transactions</strong></p>
</blockquote>
<h1>Summary</h1>
<p>I’ve shown you how to upload file with simple technique at beginning. Although, it’s easy to use, it has a few limitation. The second technique (using PutListBlock) is more powerful as it could do more than the first one. However, it certainly has some pros and cons as well. </p>
<p>I hope you could be able to use either one of them appropriately in your scenario. Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/02/26/uploading-big-files-in-windows-azure-blob-storage-with-putlistblock/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Uploading File Securely to Windows Azure Blob Storage with Shared Access Signature via REST-API</title>
		<link>http://wely-lau.net/2012/01/10/uploading-file-securely-to-windows-azure-blob-storage-with-shared-access-signature-via-rest-api/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=uploading-file-securely-to-windows-azure-blob-storage-with-shared-access-signature-via-rest-api</link>
		<comments>http://wely-lau.net/2012/01/10/uploading-file-securely-to-windows-azure-blob-storage-with-shared-access-signature-via-rest-api/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 07:53:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Windows Azure Storage]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2012/01/10/uploading-file-securely-to-windows-azure-blob-storage-with-shared-access-signature-via-rest-api/</guid>
		<description><![CDATA[In many scenario, you would need to give somebody an access (regardless write, read, etc.) but you don’t want to give him / her full permission. Wouldn’t also be great if you could control the access on certain time frame. The “somebody” could be person or system that use various different platform other than .NET. [...]]]></description>
			<content:encoded><![CDATA[<p>In many scenario, you would need to give somebody an access (regardless write, read, etc.) but you don’t want to give him / her full permission. Wouldn’t also be great if you could control the access on certain time frame. The “somebody” could be person or system that use various different platform other than .NET. This post is about to show you how to upload a file to Windows Azure Storage with REST-based API without having to expose your <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh225339.aspx">Storage Account credential</a>. </p>
<h2>Shared Access Signature</h2>
<p>A cool feature Shared Access Signature (SAS) is built-in on Windows Azure Storage. In a nutshell, SAS is a mechanism to give permission while retaining security by producing a set of attributes and signature in the URL. </p>
<p>For the fundamental of SAS, I recommend you to read the following post:</p>
<ul>
<li><a href="http://blog.smarx.com/posts/new-storage-feature-signed-access-signatures">http://blog.smarx.com/posts/new-storage-feature-signed-access-signatures</a> </li>
<li><a href="http://blog.smarx.com/posts/shared-access-signatures-are-easy-these-days">http://blog.smarx.com/posts/shared-access-signatures-are-easy-these-days</a> </li>
<li><a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee395415.aspx">http://msdn.microsoft.com/en-us/library/windowsazure/ee395415.aspx</a></li>
</ul>
<p>Here’re the walkthrough how you can do that:</p>
<p>I assume that you’ve the Windows Azure Storage Account and Key with you.</p>
<h2>Preparing SAS and Signature</h2>
<p>1. Giving access to your container. You can either use tools or library to set SAS permission access on container or blobs. In this example, I use Cerebrata’s Cloud Storage Studio.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/01/1.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="1" border="0" alt="1" src="http://cdn.wely-lau.net/wordpress/2012/01/1_thumb.jpg" width="438" height="402" /></a></p>
<p>As could be seen, I’ve created a policy with the following attributes:</p>
<ul>
<li>Start Date Time: Jan 8, 2012 / 00:00:00 </li>
<li>Expiry Date Time: Jan 31, 2012 / 00:00:00 </li>
<li>Permission: Write only </li>
<li>Signed Identifier: Policy1</li>
</ul>
<p>By applying this policy to some particular container, somebody who possess a signature will only be able to write something inside this container on the given timeframe. I mentioned “a signature”, what’s the signature then?</p>
<p>2. You can click on “Generate Signed URL” button if you’re using Cloud Storage Studio. But I believe you can do similarly feature although using different tool. </p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/01/2.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="2" border="0" alt="2" src="http://cdn.wely-lau.net/wordpress/2012/01/2_thumb.jpg" width="475" height="383" /></a></p>
<p>In the textbox, you’ll see something like this:</p>
<p><a href="https://[your-account].blob.core.windows.net/samplecontainer1?&amp;sr=c&amp;si=Policy1&amp;sig=pjJhE%2FIgsGQN9Z1231312312313123123A%3D">https://[your-account].blob.core.windows.net/samplecontainer1?&amp;sr=c&amp;si=Policy1&amp;sig=pjJhE%2FIgsGQN9Z1231312312313123123A%3D</a></p>
<p>Basically, starting the ? symbol to the end, that’s the signature: <strong>?&amp;sr=c&amp;si=Policy1&amp;sig=pjJhE%2FIgsGQN9Z1231312312313123123A%3D</strong></p>
<blockquote><p>*Copy that value first, you will need this later.</p>
</blockquote>
<p>The signature will be signed securely according to your storage credentials and also the properties you’ve specified.</p>
<p>&#160;</p>
<h2>Let’s jump to Visual Studio to start our coding!!!</h2>
<p>I use the simplest C# Console Application to get started. Prepare the file to be uploaded. In my case, I am using Penguin.jpg which you can find in Windows sample photo. </p>
<p>3. Since I am about to upload a picture, I will need to get byte[] of data from the actual photo. To do that, I use the following method.</p>
<pre class="csharpcode">        <span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">byte</span>[] GetBytesFromFile(<span class="kwrd">string</span> fullFilePath)
        {
            FileStream fs = File.OpenRead(fullFilePath);
            <span class="kwrd">try</span>
            {
                <span class="kwrd">byte</span>[] bytes = <span class="kwrd">new</span> <span class="kwrd">byte</span>[fs.Length];
                fs.Read(bytes, 0, Convert.ToInt32(fs.Length));
                fs.Close();
                <span class="kwrd">return</span> bytes;
            }
            <span class="kwrd">finally</span>
            {
                fs.Close();
            }
        } </pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>4. The next step is the most important one, which is to upload a file to Windows Azure Storage through REST with SAS.</p>
<pre class="csharpcode">        <span class="kwrd">static</span> WebResponse UploadFile(<span class="kwrd">string</span> storageAccount, <span class="kwrd">string</span> container, <span class="kwrd">string</span> filename, <span class="kwrd">string</span> signature, <span class="kwrd">byte</span>[] data)
        {
            var req = (HttpWebRequest)WebRequest.Create(<span class="kwrd">string</span>.Format(<span class="str">&quot;http://{0}.blob.core.windows.net/{1}/{2}{3}&quot;</span>, storageAccount, container , filename, signature));
            req.Method = <span class="str">&quot;PUT&quot;</span>;
            req.ContentType = <span class="str">&quot;text/plain&quot;</span>;

            <span class="kwrd">using</span> (Stream stream = req.GetRequestStream())
            {
                stream.Write(data, 0, data.Length);
            }

            <span class="kwrd">return</span> req.GetResponse();
        }</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>5. To call it, you will need to do the following:</p>
<pre class="csharpcode">        <span class="kwrd">static</span> <span class="kwrd">void</span> Main(<span class="kwrd">string</span>[] args)
        {
            <span class="kwrd">string</span> storageAccount = <span class="str">&quot;your-storage-account&quot;</span>;
            <span class="kwrd">string</span> file = <span class="str">&quot;Penguins.jpg&quot;</span>;
            <span class="kwrd">string</span> signature = <span class="str">&quot;<strong>?&amp;sr=c&amp;si=Policy1&amp;sig=pjJhE%2FIgsGQN9Z1231312312313123123A%3D</strong>&quot;</span>;
            <span class="kwrd">string</span> container = <span class="str">&quot;samplecontainer1&quot;</span>;

            <span class="kwrd">byte</span>[] data = GetBytesFromFile(file);
            WebResponse resp = UploadFile(storageAccount, container, file, signature, data);

            Console.ReadLine();
        }</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>The signature variable should be filled with the signature that you’ve copied in step 2 just now.</p>
<p>6. Let’s try to see if it works!</p>
<p>And yes, it works <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://cdn.wely-lau.net/wordpress/2012/01/wlEmoticon-smile.png" />.</p>
<p><a href="http://cdn.wely-lau.net/wordpress/2012/01/3.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="3" border="0" alt="3" src="http://cdn.wely-lau.net/wordpress/2012/01/3_thumb.jpg" width="390" height="321" /></a></p>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2012/01/10/uploading-file-securely-to-windows-azure-blob-storage-with-shared-access-signature-via-rest-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;A Cloudy Place&#8221;&#8211; Blogging About Cloud Computing</title>
		<link>http://wely-lau.net/2011/12/29/a-cloudy-place-blogging-about-cloud-computing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-cloudy-place-blogging-about-cloud-computing</link>
		<comments>http://wely-lau.net/2011/12/29/a-cloudy-place-blogging-about-cloud-computing/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 05:35:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud]]></category>

		<guid isPermaLink="false">http://wely-lau.net/2011/12/29/a-cloudy-place-blogging-about-cloud-computing/</guid>
		<description><![CDATA[I am glad to share that “a cloudy place” blog is finally up here: http://acloudyplace.com What is “a cloudy place”? A centralized blog focused on cloud technology exclusively for developers. If you’ve heard about SQL Server Central, it’s somewhat similar but focus on cloud computing. You can find topics such as general cloud info, Amazon [...]]]></description>
			<content:encoded><![CDATA[<p>I am glad to share that “a cloudy place” blog is finally up here: <a href="http://acloudyplace.com">http://acloudyplace.com</a></p>
<p><a href="http://acloudyplace.com"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://cdn.wely-lau.net/wordpress/2011/12/image.png" width="304" height="104" /></a></p>
<h2>What is “a cloudy place”?</h2>
<p>A centralized blog focused on cloud technology exclusively for developers. If you’ve heard about <a href="http://www.sqlservercentral.com/">SQL Server Central</a>, it’s somewhat similar but focus on cloud computing. You can find topics such as <a href="http://acloudyplace.com/category/general/">general cloud info</a>, <a href="http://acloudyplace.com/category/amazon-ec2/">Amazon Web Services</a>, <a href="http://acloudyplace.com/category/azure/">Windows Azure</a>, and so many more.</p>
<h2>Who own “a cloudy place”?</h2>
<p>“a cloudy place” is owned and managed by <a href="http://www.red-gate.com/">Red Gate</a>, a software company specializing in SQL, DBA, .NET, and Oracle development tools based in Cambridge, UK.</p>
<h2>What to do with me?</h2>
<p>Aha! I am invited to become a contributor on “a cloudy place”. In a first few post, you will see me write about some generic cloud concept. Of course, I’ll discuss more about Windows Azure later on.</p>
<p>You can find my articles <a href="http://acloudyplace.com/author/wely_lau/">here</a>.</p>
<p>Happy “cloudy” reading on “a cloudy place”!</p>
]]></content:encoded>
			<wfw:commentRss>http://wely-lau.net/2011/12/29/a-cloudy-place-blogging-about-cloud-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

