<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Fleeting Thoughts</title>
	<atom:link href="http://vlele.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vlele.wordpress.com</link>
	<description>Just another Wordpress.com weblog</description>
	<lastBuildDate>Thu, 05 Jan 2012 15:28:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='vlele.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Fleeting Thoughts</title>
		<link>http://vlele.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vlele.wordpress.com/osd.xml" title="Fleeting Thoughts" />
	<atom:link rel='hub' href='http://vlele.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Windows Azure Planning &#8211; A Post-decision Guide to Integrate Windows Azure in Your Environment</title>
		<link>http://vlele.wordpress.com/2011/10/15/windows-azure-planning-a-post-decision-guide-to-integrate-windows-azure-in-your-environment/</link>
		<comments>http://vlele.wordpress.com/2011/10/15/windows-azure-planning-a-post-decision-guide-to-integrate-windows-azure-in-your-environment/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 19:54:13 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/2011/10/15/windows-azure-planning-a-post-decision-guide-to-integrate-windows-azure-in-your-environment/</guid>
		<description><![CDATA[&#160; Once an organization has made the decision to adopt Windows Azure, it is faced with a set of planning challenges, beginning with the basic, “Who should be responsible for signing up and managing the Windows Azure account?” to more involved, “How will Windows Azure impact the ALM process, availability, operational costs?” In this guide, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=357&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>&#160;</h3>
<p>Once an organization has made the decision to adopt Windows Azure, it is faced with a set of planning challenges, beginning with the basic, “Who should be responsible for signing up and managing the Windows Azure account?” to more involved, “How will Windows Azure impact the ALM process, availability, operational costs?” In this guide, we will seek to answer some of these questions. </p>
<p>&#160;</p>
<h3>1. Plan for Administration </h3>
<h4>Billing</h4>
<p>A Windows Azure subscription can be setup by creating a Microsoft Online Services account via the <a href="https://mocp.microsoftonline.com/">Microsoft Online Services Portal</a>. Before you create a subscription, you must decide on a billing method. Unless you buy resources in bulk ahead of time, providing a credit card to pay for monthly services has been the only available option until recently. While the credit card approach works for individuals and smaller organizations, finance departments at larger organizations are simply not structured to support this billing model. Recognizing this as a potential problem, Microsoft has recently initiated an invoice billing model. </p>
<h4>Administrators</h4>
<p>At least two individuals in your organization should be given Co-Administrator rights to your service. That said, the number of Co-Administrators should be carefully controlled as people in those roles have full access to add, modify, and delete services. Note that adding a user to the Co-Administrator role will accord them administrative privileges across Windows Azure Compute, Storage and SQL Azure services (Windows Azure AppFabric service is not integrated at the time of writing).</p>
<h4>Subscriptions</h4>
<p>You should determine the number of subscriptions that will be needed. Each subscription is associated with an Azure datacenter and comes with a quota of resources – storage (100 TB) and compute (20 cores). A subscription can contain up to six hosted services (applications) and 5 storage accounts by default which can be increased if needed by contacting Windows Azure support. For example, an organization may choose from among two distinct services to host in Windows Azure and two environments – production and test – for a given application. Many organizations will start with one subscription but may want to add other subscriptions later. Thus, it is important to plan meaningful names for subscriptions. One other consideration when planning subscription(s) is that storage within a subscription can only be shared by services contained within a subscription. For example when deploying a service, the package file can be deployed from an Azure storage account that is part of the same subscription as the service.</p>
<h4>Certificate Management</h4>
<p>Windows Azure relies on X.509.v3 certificates for authentication. There are two types of certificates used by Windows Azure:</p>
<p><b><i>Management Certificates</i></b> are associated with a subscription and, as the name suggests, are utilized when performing management operations against it. Typical clients include Windows Azure Tools for Visual Studio, command line tools, such as <i>CSUpload.exe,</i> and custom programs leveraging the Windows Azure Service Management REST API. Management certificates only contain the public key (.cer file). Clients connecting to the subscription need to be trusted and should have the private key.</p>
<p>Service Certificates are associated with a service and are used by Windows Azure services to enable secure interaction with its users. For example, a Windows Azure service that hosts a HTTPS based web endpoint will need a service certificate. Another example is a WCF based Windows Azure Service that requires mutual authentication. Unlike the management certificate, service certificates are private key (.pfx ) files. Service certificates associated with a service are analogous to certificates in a certificate store in on Windows. In fact, Windows Azure copies the service certificates to each role (Virtual Machine) instance associated with a service.</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb.png?w=441&#038;h=261" width="441" height="261" /></a></p>
<p>Here are some of the considerations for managing Windows Azure certificates:</p>
<p>· There can be a maximum of 10 management certificates associated with a subscription per administrator. So if there is a need to associate more than 10 certificates, additional administrators would need to be added to a subscription. Note that administrators can share certificates. </p>
<p>· There is no role-based access to the portal. All administrators have the same level of access. This is why it is important to keep the setup simpler by limiting the number of administrators and distinct management certificates. </p>
<p>· Follow industry best practices to secure certificates. If, for whatever reason, there is a need for large number of certificates, consider the use of a third-party tool to manage the certificates.</p>
<p>· Management and service certificates can be <i>self-issued</i> or <i>trusted</i> certificates. Self-issued certificates will cause a security warning that will need to be explicitly bypassed. This is more likely an issue for service certificates that are used to secure HTTPS endpoints. </p>
<p>· Service certificates can be managed by multiple individuals. For example, developers typically work with self-signed certificates. At a later time, IT pros can replace self-signed certificates with trusted ones without having to redeploy the service. This is possible because Windows Azure references the certificate (store name and location) as a logical name stored in the service definition file. This way a certificate can be changed by simply uploading a new service certificate and changing the certificate thumbprint in the service configuration file. </p>
<h4>Operations</h4>
<p>The Windows Azure portal provides unified access to various operational tasks such as creating subscriptions, creating storage accounts, deploying services, etc. At the same time, most administrators prefer a repeatable, automated way of performing these tasks. Fortunately, the Windows Azure Platform PowerShell Cmdlets can make this task easier. These Cmdlets fall into four categories:</p>
<p>· Hosted services, affinity groups and role instance management, including functions like adding a new hosted service, getting an instance status, adding an affinity group, etc.</p>
<p>· Automation of SQL Azure deployments, including creating and removing a SQL Azure server, adding a firewall rule, and setting/ resetting a SQL Azure password </p>
<p>· Windows Azure Diagnostics Management, including downloading specified performance counters, and clearing Windows logs from storage. </p>
<p>· Windows Azure Storage including adding a new storage account, clearing a container, and getting and setting storage analytics. </p>
<p>For more information please refer to <a href="http://michaelwasham.com/2011/09/16/announcing-the-release-of-windows-azure-platform-powershell-cmdlets-2-0/">http://michaelwasham.com/2011/09/16/announcing-the-release-of-windows-azure-platform-powershell-cmdlets-2-0/</a> &amp; <a href="http://msdn.microsoft.com/en-us/library/gg433135.aspx">http://msdn.microsoft.com/en-us/library/gg433135.aspx</a></p>
<h4></h4>
<h4>Affinity Groups</h4>
<p>When creating a Windows Azure service, you can either specify the datacenter location or specify that the services you create should be part of an affinity group. Affinity groups are logical containers for associating services and storage accounts to a data center. The advantage of having all your services in same affinity group is low latency between these services. Once an affinity group has been defined at a subscription level, it becomes available to any subsequent services or storage accounts. It is recommended that administrators first create an affinity group before provisioning services and storage accounts.</p>
<p>Note that currently the affinity groups do not apply to SQL Azure and Windows Azure AppFabric. You will need to ensure that you create an instance of these services in the datacenter to which the affinity group is associated.</p>
<h4>2. Plan for ALM </h4>
<p>David Chappell, in his <a href="http://go.microsoft.com/?linkid=9743693">ALM whitepaper</a>, divides <b>Application Lifecycle Management</b> (ALM) into three distinct areas: governance, development and operations (as shown in the screenshot below). </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb1.png?w=545&#038;h=277" width="545" height="277" /></a></p>
<p>Pasted from <a href="http://go.microsoft.com/?linkid=9743693">http://go.microsoft.com/?linkid=9743693</a></p>
<p>For ALM to be effective, an organization needs a common foundation (depicted in screenshot below) for version control, build management, test case management, reporting, and other functions. Having a common foundation makes it easier to share artifacts between teams. Additionally, having a consistent foundation makes it possible to share processes for build and deployment, thereby reducing overall costs. </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb2.png?w=457&#038;h=198" width="457" height="198" /></a></p>
<p>Pasted from <a href="http://go.microsoft.com/?linkid=9743693">http://go.microsoft.com/?linkid=9743693</a></p>
<p>The governance aspects of ALM remain largely the same for Windows Azure based projects. Teams can continue to use tools in place for use case development, project management, and application portfolio management.</p>
<p>Since Microsoft Team Foundation Server (TFS) is a common choice for Windows Azure based projects, we will use it for our discussion here – although this discussion is applicable to other ALM tools such as IBM Rational Concert. Development aspect of ALM will be impacted by Window Azure in the following ways:</p>
<p>· Unlike traditional projects, most of the initial development will take place inside the cloud emulator built into Visual Studio. From time to time, developers will need to develop directly against Windows Azure. This is mainly due to the differences in behavior between the emulator and Windows Azure. For example, the code running in the emulator runs under the administrative privileges and has access to GAC. This is not available to code running in Windows Azure. Another example would be Azure AppFabric services. There are no emulator versions of these services. For a complete list of differences between the emulator and Windows Azure please refer to <a href="http://msdn.microsoft.com/en-us/library/gg432960.aspx">http://msdn.microsoft.com/en-us/library/gg432960.aspx</a></p>
<p>· Starting with version 1.4 of Windows Azure Tools for Visual Studio, it is possible to create separate target files for different environments. By default, it creates a local and a cloud target environment. It is possible to create a custom target configuration such as “Production” or “Test”. This feature makes it easy for developers to test against the emulator and Windows Azure hosted service. </p>
<p>· The test team will primarily be testing against Windows Azure hosted services. This means that build definitions (including compilation, code analysis, smoke tests and deployment steps) need to be modified to target a Windows Azure based test environment. Fortunately, codeplex tools such <a href="http://deploytoazure.codeplex.com/">DeploytoAzure</a>, provide custom workflow actions for extending the build process. Another approach would be to use <a href="http://wappowershell.codeplex.com/">Azure Powershell Cmdlets</a> to modify the build definition. </p>
<p>· Windows Azure service deployments are conducted by copying the service package and configuration files to Azure Blob storage first (unless the deployments are being done manually via the Azure portal). So you would want to copy the build output to a Azure Blob container (described in the previous step). As an aside, the elastic nature of Azure storage makes it a great place to archive build outputs. Please refer to Joel Forman’s post on <a href="http://blog.slalom.com/2011/08/19/building-and-deploying-windows-azure-projects-using-msbuild-and-tfs-2010/">Building and Deploying Windows Azure Projects using MSBuild</a>. </p>
<p>· Windows Azure provides production and staging environments to create a service deployment. Typically, a service is deployed to the staging environment to test it before deploying it to the production environment. A service in staging can be promoted to the production environment by a simple swapping process, without the need for redeployment. For details on swapping, please refer to <a href="http://msdn.microsoft.com/en-us/library/ee517253.aspx/">MSDN article</a>. The swapping feature can be used to deploy changes or to rollback to a previous version of the service without interrupting the service.</p>
<p>· Tom Hollander is his <a href="http://blogs.msdn.com/b/tomholl/archive/2011/09/28/environments-for-windows-azure-development.aspx">blog post</a> provides an example of a typical Windows Azure setup:</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb3.png?w=517&#038;h=207" width="517" height="207" /></a></p>
<p>Pasted from <a href="http://blogs.msdn.com/b/tomholl/archive/2011/09/28/environments-for-windows-azure-development.aspx">http://blogs.msdn.com/b/tomholl/archive/2011/09/28/environments-for-windows-azure-development.aspx</a></p>
<p>· The elastic nature of Windows Azure makes it suitable for generating load for a stress test. One such test setup is proposed in a series of blog posts by <a href="http://blogs.msdn.com/b/ricardo/">ricardo</a>. As shown below, Agents run on Windows Azure, thereby making it possible to quickly load on the system. The test controller resides on-premise and uses Windows Azure Connect to communicate with the controllers. </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb4.png?w=446&#038;h=255" width="446" height="255" /></a></p>
<p>Pasted from &lt;<a href="http://blogs.msdn.com/b/ricardo/archive/2011/04/08/load-testing-with-agents-running-on-windows-azure-part-1.aspx">http://blogs.msdn.com/b/ricardo/archive/2011/04/08/load-testing-with-agents-running-on-windows-azure-part-1.aspx</a>&gt; </p>
<p>&#160;</p>
<h3>3. Plan for Availability </h3>
<h4>Architectural Considerations </h4>
<p>While detailed discussion on architectural best practices is out of scope for this guide, it is important to note that availability begins with a good design. Every aspect of your Windows Azure Service should take advantage of scale-out features available on the platform. Let us refer to the following architectural diagram in order to review of some key scalability aspects:</p>
<p>· <b>Load Balancer.</b> Each service is assigned a single Virtual IP (VIP) for all role instances. VIP is managed by the load balancer. Load balancer uses a simply round-robin approach for routing incoming requests. This means that each role instance has to be stateless. Any role instances that become non-responsive for any reason are taken out of the load balancer automatically, and Windows Azure will start the process of healing the service by adding another role instance in due course. This is why it is important to have at least two role instances to maintain availability (in fact having two role instances is a requirement to qualify for the SLA). The same principle of availability and self-healing applies to the worker roles shown in the diagram below. In addition to having multiple role instances, it is also important to logically split the role instances into fault and upgrade domains. Please refer to <a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg236576.aspx">Improving Application Availability in Windows Azure</a> for more information. </p>
<p>· <b>Partitioning of the Azure Storage Queues.</b> The Azure Storage Queues are used to communicate between Web and Worker roles. For availability and scalability reasons, it is important to consider partitioning the Azure queue.</p>
<p>· <b>Storage.</b> Azure storage and SQL Azure are designed to be fault tolerant. Each manages multiple replicas of data behind the covers and can failover to a different replica, as needed. That said, it is important to partition your storage appropriately to not only improve the availability but also throughput. Please refer to <a href="http://blogs.msdn.com/b/windowsazurestorage/archive/2010/05/10/windows-azure-storage-abstractions-and-their-scalability-targets.aspx">Windows Azure Storage Scalability Targets</a> for more information. </p>
<p>· <b>Intelligent Retry Logic.</b> It is important to design your code to handle failure conditions and temporary unavailability by baking in retry logic when interacting with SQL Azure, Azure storage, etc. <a href="http://windowsazurecat.com/2011/02/transient-fault-handling-framework/">Transient Fault Handling Framework </a>developed by Customer Advisory team has built a reusable set of components for adding intelligent retry logic into applications. </p>
<p>· <b>Application Developer Responsibilities.</b> Finally, it is important to know of instances where the platform does not provide high availability out of the box. For example, it is the responsibility of the application developer to make inter-role communication fault tolerant. </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb5.png?w=540&#038;h=234" width="540" height="234" /></a></p>
<h4>Global Availability </h4>
<p>In the previous section, we reviewed some design considerations for making Windows Azure services more available. However, all of those considerations were limited to services deployed within one datacenter. No matter how available a service is within a data center, it does no good if the there is a data center outage. If the business requirements dictate accounting for such a contingency, there are additional considerations that apply. In the next section we will discuss design considerations for making your application available globally – across different Windows Azure datacenters. </p>
<p>· <b>Azure Traffic Manager.</b> We already know that in order for an Azure service to be globally available, it must be deployed to more than one data center. However, we also know that each instance of the service gets its own VIP. So how are the customers to know which VIP address to use, especially when, there is a contingency and service has to be failed over to another datacenter? This is where Azure Traffic Manager comes in. It allows customers to balance traffic to service hosted across multiple datacenters. Note that load balancing may be triggered due to load on the system or a failure condition. The following diagram explains at a high level how Traffic Manager works. Based on the defined policy, foo.cloudapp.net can be directed to either foo-us.cloudapp.net or foo-europe.cloudapp.net. </p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb6.png?w=496&#038;h=156" width="496" height="156" /></a></p>
<p>· <b>Deployment Strategies.</b> The ability to route to a different datacenter is great, but what about the data. How will data be synchronized across datacenters? How will Access Control Service or Service Bus endpoints be accounted for? The following table (pasted from David Aiken’s <a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-869T/">presentation </a>) provides a summary of deployment strategies that make Windows Azure service globally available. Strategies included in this table are combination of Windows Azure features and custom code. For example, SQL Azure Data Sync Service can be used to synchronize the SQL Azure database instances. Windows Azure Storage has geo-replication (within a region) enabled by default. However, note that geo-replicated data is not directly accessible to services. It is designed for handle data center outages. Service Bus and Access Control Service are not currently covered by Traffic Manager. This means that in order to achieve global availability, separate namespaces will need to be created.</p>
<p>&#160;</p>
<p>
<table border="1" cellspacing="0" cellpadding="0" width="500">
<tbody>
<tr>
<td valign="top" width="216">
<p><b>Windows Azure Service</b></p>
</td>
<td valign="top" width="282">
<p><b>Multi-datacenter deployment strategy</b></p>
</td>
</tr>
<tr>
<td valign="top" width="216">
<p>Windows Azure Compute</p>
</td>
<td valign="top" width="282">
<p>Create multiple deployments – user traffic manager to route traffic</p>
</td>
</tr>
<tr>
<td valign="top" width="216">
<p>Windows Azure Storage</p>
</td>
<td valign="top" width="282">
<p>Geo-replication is turned on by default</p>
</td>
</tr>
<tr>
<td valign="top" width="216">
<p>SQL Azure</p>
</td>
<td valign="top" width="282">
<p>Use SQL Azure Data Sync Service</p>
</td>
</tr>
<tr>
<td valign="top" width="216">
<p>Reporting Services</p>
</td>
<td valign="top" width="282">
<p>Deploy reports to different locations</p>
</td>
</tr>
<tr>
<td valign="top" width="216">
<p>Service Bus</p>
</td>
<td valign="top" width="282">
<p>Create multiple namespaces</p>
</td>
</tr>
<tr>
<td valign="top" width="216">
<p>Access Control Service</p>
</td>
<td valign="top" width="282">
<p>Create multiple namespaces</p>
</td>
</tr>
</tbody>
</table>
<h4>Service Updates</h4>
<p>There are three options for updating a deployed Windows Azure Service. <u></u></p>
<p>o <b>Delete and redeploy.</b> Given that the previous service instance is deleted, this option offers maximum flexibility with the updates that can be applied. On the flip side this option is most disruptive because it incurs service downtime. <u></u></p>
<p>o <b>Deploy to staging followed by a VIP Swap.</b> This option involves deploying an updated version of the service to staging and then performing a VIP swap. There is no downtime incurred in this option, however, existing connections are not moved over to the newly promoted instance. The types of updates that can be applied via this option are limited as well. Additionally there is an additional cost associated with standing up the staging environment.<u></u></p>
<p>o <b>In-place or rolling upgrade.</b> This option involves deploying the updates to a service one upgrade domain at time. (It is recommended that each service have at least two upgrade domains defined.) Only instances associated with the upgrade domain are stopped, while other instances keep running. <u></u></p>
<p>The following table depicts the kinds of updates that can be applied via each of the three upgrade options discussed above.</p>
<p>&#160;</p>
<p>
<table border="1" cellspacing="0" cellpadding="0" width="500">
<tbody>
<tr>
<td valign="top" width="153">
<p><b>Changes permitted</b></p>
</td>
<td valign="top" width="114">
<p><b>In-place</b></p>
</td>
<td valign="top" width="110">
<p><b>VIP Swap</b></p>
</td>
<td valign="top" width="121">
<p><b>Delete and re-deploy</b></p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Operating system version</p>
</td>
<td valign="top" width="114">
<p>Yes</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>.NET trust level</p>
</td>
<td valign="top" width="114">
<p>No</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Virtual machine size</p>
</td>
<td valign="top" width="114">
<p>No</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Local storage settings</p>
</td>
<td valign="top" width="114">
<p>No</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Number of roles for a service</p>
</td>
<td valign="top" width="114">
<p>No</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Number of instances of a particular role</p>
</td>
<td valign="top" width="114">
<p>Yes</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Number or type of endpoints for a service</p>
</td>
<td valign="top" width="114">
<p>No</p>
</td>
<td valign="top" width="110">
<p>No</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Names and values of configuration settings</p>
</td>
<td valign="top" width="114">
<p>Yes</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Values (but not names) of configuration settings</p>
</td>
<td valign="top" width="114">
<p>Yes</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Add new certificates</p>
</td>
<td valign="top" width="114">
<p>Yes</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Change existing certificates</p>
</td>
<td valign="top" width="114">
<p>Yes</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
<tr>
<td valign="top" width="153">
<p>Deploy new code</p>
</td>
<td valign="top" width="114">
<p>Yes</p>
</td>
<td valign="top" width="110">
<p>Yes</p>
</td>
<td valign="top" width="121">
<p>Yes</p>
</td>
</tr>
</tbody>
</table>
<p>The above table is pasted from <a href="http://msdn.microsoft.com/en-us/library/ff966479.aspx">http://msdn.microsoft.com/en-us/library/ff966479.aspx</a></p>
<p>For recommendations on improving availability during the upgrade process refer to <a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg236576.aspx">this</a> MSDN page.</p>
<h4>Diagnostics </h4>
<p>Designing for availability does not preclude the need to collect diagnostics. In fact, as shown in the diagram below, the need for collecting diagnostics is even greater in the cloud.</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb7.png?w=575&#038;h=299" width="575" height="299" /></a></p>
<p>Fortunately, Windows Azure Diagnostics enables you to collect diagnostic data from an application running in Windows Azure and store it in Windows Azure storage. The following diagram depicts the overall architecture of how diagnostic data is collected. Each role has a diagnostic monitor process that collects the collects the data requested by the user. This includes Windows Event Logs, Performance Counters, crash dumps, and even custom file-based logs. The diagnostic data is written to the local disk within the role instance. At a pre-determined frequency, the diagnostic data is transferred to Windows Azure Storage. Please refer to <a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg433048.aspx">this</a> MSDN link for more on information on collecting diagnostic data. </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb8.png?w=492&#038;h=170" width="492" height="170" /></a></p>
<p>There are a number on open source and third-party tools that can simplify the collection and analysis of diagnostic data. These include <a href="http://wapmmc.codeplex.com/">Azure MMC</a> and Cerebrata’s <a href="http://www.cerebrata.com/Products/AzureDiagnosticsManager/">Azure Diagnostic Manager</a>. </p>
<p>Organizations that rely on Operations Manager for service management of their Windows environment can add the Monitoring pack for Windows Azure Applications. This pack allows for collecting performance information, Windows events. .NET framework trace data from the Windows Azure storage account. For more information please refer to <a href="http://www.microsoft.com/download/en/details.aspx?id=11324">this</a> download page. </p>
<h4>Monitoring </h4>
<p>Diagnostics can help monitor the internal health of a Windows Azure service, but they do not tell you if the application is visible to the users. This is where monitoring comes in. These applications can monitor the health of your Windows Azure applications and initiate alerts and notifications in the event of an emergency. Again, organizations using Operations Manager today can use the Azure pack to monitor Windows Azure services as well. In addition, there are a number of third-party providers such as Cumulux’s <a href="http://www.cumulux.com/products-and-services/cloud-operations/">ManageAxis</a> that can provide similar capability.</p>
<h4></h4>
<h4>4. Plan for Storage</h4>
<p>Windows Azure offers a number of different storage options that are elastic and highly available. </p>
<p>Consistent with the theme of this paper, we will focus on how each storage option impacts the existing IT setup. (A discussion on the applicability of each option (SQL vs NoSQL) is outside the scope for this section.) Additionally, we discuss the differences in cost in a later section. </p>
<p>There are two storage solutions available on the Windows Azure platform – SQL Azure and Azure Storage. </p>
<h4>SQL Azure </h4>
<p>SQL Azure offers a familiar relational capability. However, there are some <a href="http://social.technet.microsoft.com/wiki/contents/articles/compare-sql-server-with-sql-azure.aspx">key differences</a> as compared to an on-premise SQL Server. Let us look at how these differences will impact planning and administration of SQL Azure databases.</p>
<p>· When a SQL Azure subscription is created it results in creation of a master database and server-level principal (similar to the sa role on -premise). The master database keeps track of all the databases and logins that are provisioned. Even though the databases are physically located on different machines, the SQL Azure server provides an abstraction that groups all the SQL Azure databases. For additional information on SQL Azure administration refer to <a href="http://msdn.microsoft.com/en-us/library/windowsazure/ff394116.aspx">this</a> MSDN page. </p>
<p>· Database administrators will continue to manage schema creation, index tuning, and security administration. However, being a multi-tenant service, SQL Azure abstracts the physical aspects of database setup and administration. For instance, it is not possible to specify a file group where the database or index will reside. </p>
<p>· SQL Azure databases are designed to be fault tolerant within a datacenter, so there is no need for a custom clustering or mirroring setup. However, as discussed earlier, in order to make the SQL Azure database globally available, multiple copies of databases will need to be provisioned across different datacenters. These database copies can then be synchronized using the SQL Azure DataSync service. As you would imagine, the synchronization across different datacenters is not atomic. The inherent latency involved in synchronization can result in loss of data and needs to be accounted for in the design of the application. </p>
<p>· On-premise tools such as SQL Server 2008 R2 SSMS can be used to manage the SQL Azure instances. In addition, third-party tools such as <a href="http://www.red-gate.com/products/cloud/">Redgate</a> support SQL Azure as well. For light weight operations against SQL Azure databases, Microsoft provides a Silverlight based tool via the SQL Azure portal. </p>
<p>· SQL Azure is accessible via TCP port 1443. This means that to access SQL Azure databases you will need to ensure that firewall rules allow outgoing traffic on port 1443. </p>
<p>· As discussed, given that physical aspects of a SQL Azure database is not accessible, SQL backup and restore commands will not work. Fortunately, SQL Azure offers a capability to backup and restore databases to Azure Blob storage. There are third-party solutions available as well. </p>
<p>· SQL Azure Administrators and developers need to take into account the transient nature of connections. As stated, SQL Azure databases reside in a multi-tenant setup. In order to prevent one tenant from starving other tenants of resources, database connections can be throttled, resulting in termination or temporary unavailability. This is why it is important incorporate retry logic when accessing the database. Frameworks such as <a href="http://windowsazurecat.com/2011/02/transient-fault-handling-framework/">Transient Fault Handling Framework </a>can make this task easier. </p>
<p>· Currently, there is a 50 GB limit on a single instance of the SQL Azure database. In order to deal with this limitation, applications are expected to “shard” (or partition) the data across multiple databases. Today the partitioning logic is owned by the application. A forthcoming feature of SQL Azure, referred to as <i>federation</i>, will allow the partitioning logic to be managed outside the application – by database administrators. For example, if the distribution of data changes across the partitions changes over time, the federation feature will for allow splitting and merging of data without effecting the availability or consistency of data. </p>
<h4>Windows Azure Storage</h4>
<p>Azure storage offers three different kinds of storage options – Tables, Blobs and Queues. Azure Storage is designed for durability and scalability. For more information on Windows Azure Storage, please refer to <a href="http://www.microsoft.com/windowsazure/features/storage/">this</a> MSDN page. </p>
<p>Here are some planning considerations for Windows Azure Storage: </p>
<p>· <b>Windows Azure Tables.</b> Windows Azure Tables is good choice for storing data that will benefit from a “No-SQL” pattern – a massively large volume with low duty (in terms of query processing). Windows Azure Storage manages multiple replicas of the dataset to protect against hardware failures. However, for business continuity reasons it may be important to protect against errors in the application by maintaining snapshots of data. Blob storage has a built-in snapshot capability (while Windows Azure Table Storage does not). Tools such as <a href="http://azurestoragebackup.codeplex.com/">AzureStorageBackup</a> or <a href="https://github.com/Lokad/lokad-snapshot">lokad-snapshot</a> rely on snapshot capability of blob storage to offer backup functionality.&#160; <a href="http://www.cerebrata.com/Products/AzureManagementCmdlets/">Cerebrata Azure Management Cmdlets</a> can also be used to back up a storage account to local computer and restoring the contents of a storage account.</p>
<p>· <b>Geo-replication.</b> As stated previously, Geo-replication is enabled by default at no cost. However, note that geo-replication is a platform level feature that comes into play when there is a data center outage. Replicated data is not directly available to the applications. Furthermore Geo-replication feature is only available between data centers in the same region.</p>
<p>· <b>Tools.</b> There are a number of open source and commercial options available for managing Windows Azure Storage including tools from <a href="http://www.cerebrata.com/">http://www.cerebrata.com/</a> and <a href="http://cloudberrylab.com/">http://cloudberrylab.com/</a>. In addition, Microsoft has made a sample available (including source code) to manage Windows Azure Storage. This sample can be found at <a href="http://wapmmc.codeplex.com/">http://wapmmc.codeplex.com/</a> .</p>
<p>· <b>CDN.</b> Consider enabling the <a href="http://www.microsoft.com/windowsazure/features/cdn/">CDN</a> feature if the data stored in Windows Azure Blob is public data. For data that is not public, consider the use of <a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee395415.aspx">shared access signatures</a>. </p>
<p>· <b>Windows Azure Blobs. </b>As the name suggests, Windows Azure Blobs is designed for storing large binary objects. Blob storage is a great place to host streaming content. It supports efficient resume for browsers and streaming media players via Http headers such as <i>Accept-Ranges</i>. It is expected that smooth streaming for video content will be available in future. </p>
<p>· <b>SMB.</b> Page blobs can be mounted as a NTFS volume on a cloud or on-premise machine (a feature referred to as the X-Drive). Only a single instance can be allowed read-write access via X-drive. However, using SMB, it is possible to mount a drive on one role instance and then share that out to other instances. For more information refer to this <a href="http://blogs.msdn.com/b/windowsazurestorage/archive/2011/04/16/using-smb-to-share-a-windows-azure-drive-among-multiple-role-instances.aspx">blog</a> post. The following diagram depicts how Windows Azure Drive works. </p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb9.png?w=500&#038;h=273" width="500" height="273" /></a></p>
<p>· Consider enabling Windows Azure Storage Metrics to better understand usage patterns. For example, it is possible to obtain hourly summary of number of requests, average latency and more for Blobs, Tables and Queues. For more information refer to <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh343258.aspx">this</a> MSDN page </p>
<p>· Consider enabling Windows Azure Storage Logs to trace requests executed against storage accounts. For example, it is possible to capture the Client IP that issued a “Delete Container”. For more information refer to <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh343262.aspx">this</a> MSDN page. </p>
<p>· Review the throughput guideline for Windows Azure Storage to make sure that the scalability needs can be met. Additionally, consider using tools such as <a href="http://research.microsoft.com/en-us/downloads/5c8189b9-53aa-4d6a-a086-013d927e15a7/default.aspx">Azure Throughput Analyzer</a> that can help measure the upload and download throughput achievable from your on-premise. </p>
<h4>Hybrid Solution – On Premise Data Store</h4>
<p>There are scenarios where a cloud based data store is not viable. Here are some scenarios:</p>
<p>· Compliance (HIPPA or PCI DSS) concerns may prevent the data from being stored in the public cloud.</p>
<p>· Non-availability of features such as encryption in SQL Azure.</p>
<p>· Inability to undertake certain performance improvement steps such as changing the fill_factor or pad index or affect the disk I/o by moving to a RAID or another type of controller. </p>
<p>In such situations it may be advisable to host within SQL Server running on-premise. The connectivity to the on-premise instance of SQL Server will be via <a href="http://www.microsoft.com/windowsazure/features/virtualnetwork/">Windows Azure Connect</a>. Windows Azure Connect provides IP-based network connectivity between on-premises and Windows Azure resources. </p>
<p>&#160;</p>
<h3>5. Plan for Compute </h3>
<p>Windows Azure compute instances are where applications are hosted. The Windows Azure platform takes care of the operation constraints (administration, availability and scalability) so developers can focus on the applications. However, as you would imagine, some amount of planning / governance is needed to make the most of the compute service. Here are some key considerations:</p>
<p>· Compute instances come in different sizes. You will need to decide which instance meets your needs by reviewing the <a href="http://www.microsoft.com/windowsazure/features/compute/">characteristics of each instance size</a>.</p>
<p>· You will need to decide in which data center to provision the compute instances. As discussed, you need to consider location affinity, fault tolerance and global availability needs. </p>
<p>· There is a system based on heartbeats for monitoring the health of compute instance. If a hardware or software failure causes the compute instance to be down, it will be detected by the Windows Azure platform. (Refer to the diagram below.) The worst case reaction time is heartbeat interval + heartbeat timeout = ~ 10 minutes. </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image10.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb10.png?w=545&#038;h=159" width="545" height="159" /></a></p>
<p>The above diagram was pasted from <a href="http://channel9.msdn.com/Events/TechEd/Europe/2010/COS326">http://channel9.msdn.com/Events/TechEd/Europe/2010/COS326</a></p>
<p>· Profile your applications to determine if compute instances that you have spawned are causing a bottleneck. </p>
<p>· In order to dynamically scale your applications up and down, you will need to determine thresholds for dynamic scaling based on load and demand. The dynamic scaling threshold can be max queue length, % CPU utilization, etc. </p>
<p>· Once you have determined the dynamic scalability threshold, you can use tools such as <a href="http://www.paraleap.com/">AzureWatch</a>, <a href="http://archive.msdn.microsoft.com/azurescale">AzureScale</a> or <a href="http://www.cumulux.com/products-and-services/cloud-operations/">Cumulux</a> to scale the instances appropriately. </p>
<p>· In addition to dynamic scaling, consider periods of day where application will witness low volumes of access. It may be possible to scale down and then up, based on the schedule.</p>
<p>· Note that each compute instance is a virtual server hosted on a shared piece of hardware. Given that compute instances are running inside multi-tenant environment, it is important to consider side-channel attack. For more information, refer to <a href="http://www.microsoft.com/download/en/details.aspx?id=7253">Microsoft Best Practices for Developing Secure Azure Applications.</a></p>
<p>&#160;</p>
<h3>6. Plan for Cost</h3>
<p>With the “utility-like pay-per-use” pricing, Cloud computing promises to change the economics of running applications in fundamental ways. This is commonly referred to as <i>Cloudonomics</i>, a term Joe Weinman coined in his seminal <a href="http://www.businessweek.com/technology/content/sep2008/tc2008095_942690.htm">article</a>.</p>
<p>In this section, we will review some of the key considerations related to cost of hosting services in Windows Azure:</p>
<p>· You should understand the differences in costs between maintaining a traditional server, virtualized sever, private and public cloud. Please refer to <a href="http://www.microsoft.com/presspass/presskits/cloud/docs/The-Economics-of-the-Cloud.pdf">Microsoft white paper</a> for more information.</p>
<p>· It is important to understand the pricing for various Windows Azure Platform components. The easiest way is to start with the <a href="http://www.microsoft.com/windowsazure/pricing-calculator/">Windows Azure pricing calculator </a>to model the costs of various components. </p>
<p>· In the application architecture section above, we reviewed a number of considerations to make the application more scalable and fault tolerant. Added scalability and fault tolerance comes at a cost. You need to make sure that business requirements warrant extra costs. One of the benefits of cloud computing is that many of these options (i.e. deploying service to additional datacenters, and adding a number of instances) need not be enabled upfront. </p>
<p>· Once you have built a Windows Azure Service, it is important to periodically review the monthly bill in conjunction with profile data for your application. This will allow you to eliminate services that are not being used. For example, if the compute instances are not taxed, you may want to scale down to a smaller number of instances. Similarly, if the pattern of usage warrants a lower number of instance during a certain part of day, automate the scaling to have lower number of instances during this time. </p>
<p>· Watch for runaway costs. Even though cost per transaction may be very small (i.e. 100,000 transactions against Windows Azure storage costs $.10) unchecked usage can run up costs quickly. For example, consider the following diagram – monitoring 5 performance counters every 5 second for 100 instances can cost you more than $260 a month. </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/10/image11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/10/image_thumb11.png?w=397&#038;h=116" width="397" height="116" /></a></p>
<p>Another example is Windows Azure Storage Analytics. Again, the cost of storage may be small per GB, but if left unchecked, the storage costs can mount over time. This is why it is important to declare a retention policy. When a retention policy is applied, Storage Analytics will automatically delete logging and metrics data older than the specified number of days. Note that disposition as a result of the retention policy is not billable.</p>
<p>· Use the billing period to your advantage. The compute instances are billed per hour. It makes no sense to shutdown and restart an instance for a 30 minute period of inactivity. You would end up paying for two compute hours. SQL Azure charges are pro-rated over a month of usage. If you are not using a database for a period of time, backup it to Blob storage and restore it when you need it. </p>
<p>· Be aware of common pitfalls such as the ones described below: </p>
<p>o You are paying for the service as soon as the role has been provisioned. This means that if your service recycles between ‘initializing’ / ’busy’ / ‘stopping states’ (perhaps due to an error in the deployment package), you are continuing to accrue charges.</p>
<p>o A service that is in a suspended state continues to incur charges.</p>
<p>o To avoid incurring any charges for a service that is not in use, delete that service.</p>
<h4><font size="4" face="Tahoma"><font>7. Conclusion</font></font></h4>
<p>In this blog post, we reviewed some of the planning considerations for getting started with Windows Azure. We discussed the following major areas: Administration, ALM, Availability, Storage, Compute and Cost. While not an exhaustive set, hopefully this post can help you plan your Windows Azure deployment.</p>
<p>Thanks to <a href="http://sandhoo.wordpress.com/">Harin Sandhoo</a>, Kevin Griffie and <a href="http://gauravmantri.blogspot.com/">Gaurav Mantri</a> for their contributions to this blog post. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/357/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=357&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2011/10/15/windows-azure-planning-a-post-decision-guide-to-integrate-windows-azure-in-your-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/10/image_thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint and Azure Integration Opportunities</title>
		<link>http://vlele.wordpress.com/2011/05/06/sharepoint-and-azure-integration-opportunities/</link>
		<comments>http://vlele.wordpress.com/2011/05/06/sharepoint-and-azure-integration-opportunities/#comments</comments>
		<pubDate>Fri, 06 May 2011 03:08:40 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/2011/05/06/sharepoint-and-azure-integration-opportunities/</guid>
		<description><![CDATA[&#160; There is a lot of talk about the use of SharePoint, and other Office products, in the upcoming cloud offering Office365. Office 365 is SaaS (Software as a Service) style of cloud computing wherein one can subscribe and use the SharePoint functionality without worrying about the underlying hardware and software infrastructure. The entire underlying [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=332&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>There is a lot of talk about the use of SharePoint, and other Office products, in the upcoming cloud offering <a href="http://www.microsoft.com/pt-pt/office365/enterprise/what-is-office365.aspx">Office365</a>. Office 365 is SaaS (Software as a Service) style of cloud computing wherein one can <i>subscribe</i> and use the SharePoint functionality without worrying about the underlying hardware and software infrastructure. The entire underlying infrastructure is owned, built and administered by Microsoft. In addition, the continued management of the infrastructure &#8211; including application of patches, upgrades, backups and recovery operations, etc. &#8211; is also Microsoft’s responsibility. Subscribers pay one fixed monthly amount for Office 365’s services. Microsoft is able to offer a reasonable price point for a monthly subscription because Office365 is based on a shared, multi-tenant infrastructure. Of course, while the software and hardware is shared, data belonging to each subscriber is appropriately sequestered </p>
<p>While a multitenant offering built on a shared infrastructure can be a cost effective option, there are scenarios where it may not completely meet the needs. Here are some examples:</p>
<ul>
<li><b>Regulatory Compliance:</b> A specific regulatory or compliance requirement may prohibit hosting documents in a shared or public cloud environment. (For example, Canadian privacy laws may restrict data that can be stored in a cloud data center located outside Canada). <b>SharePoint Customization:</b> Since the underlying infrastructure is shared across all subscribers, there is limited flexibility in installing custom modules. Customizations are generated limited to the constraints imposed by SharePoint sandbox solutions (Sandbox solutions run in a separate process and can only access a limited subset of the SharePoint OM). </li>
</ul>
<p><i>One possible alternative to the above limitations is to obtain&#160; a dedicated SharePoint instance in the cloud. This is possible in two ways today: i) For customers with a user base of 5000 of more users can take advantage of the dedicated level of service wherein the hardware is dedicated for the customer ii) For U.S. government organizations, Microsoft offers BPOS Federal, in which all data is stored in a secure facility dedicated to the customer. It is interesting to note that BPOS-Federal just </i><a href="http://blogs.technet.com/b/msonline/archive/2011/04/20/bpos-federal-amp-fisma.aspx"><i>achieved</i></a><i> the FISMA (</i><a href="http://csrc.nist.gov/drivers/documents/FISMA-final.pdf"><i>Federal Information Security Management Act</i></a><i>) certification and accreditation.</i></p>
<ul>
<li><b>Other Platform Releases:</b> There may be a need to run a previous version of SharePoint, such as Sharepoint 2007, and Office365 is based on SharePoint 2010. Conversely, there may be a need to tap into the functionality offered by a newer release of the .Net framework beyond the version that SharePoint is based on today (for instance, Windows Workflow 4.0). </li>
</ul>
<p>The key points above represent dilemmas that customers face today. As shown in the diagram below, while SharePoint as a Service via Office365.com provides benefits such as lower costs and elasticity of resources, the flexibility to customize is limited, and there are potential compliance concerns. On the other hand, while setting up SharePoint on-premise addresses these issues , it also comes with the added responsibility of configuring and managing the underlying infrastructure. </p>
<p><a href="http://vlele.files.wordpress.com/2011/05/clip_image002.gif"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="clip_image002" border="0" alt="clip_image002" src="http://vlele.files.wordpress.com/2011/05/clip_image002_thumb.gif?w=244&#038;h=184" width="244" height="184" /></a></p>
<p>Enter the Windows Azure Platform. Windows Azure platform is a <a href="http://vlele.wordpress.com/2010/12/07/platform-as-a-service-when-it-comes-to-the-cloud-paas-is-the-point-2/">PaaS</a> (Platform as a Service) offering from Microsoft. It allows for building and running custom applications in the cloud. The key benefit of Windows Azure is that it offers elasticity of resources such as storage and computation. Customers can leverage these capabilities to “enhance” their on-premise, as well as SaaS-based, SharePoint installations. The diagram below depicts how both the on-premise and online SharePoint environments can leverage the Windrows Azure Platform:&#160; </p>
<p>i) On-premise installations can scale out easily by relying on the virtually infinite storage and computing resources available on the Windows Azure platform. The key benefit, of course, is that massive scalability is available without undertaking a huge capital investment upfront. Instead, customers are able to dynamically scale up and down while only paying for what they use. </p>
<p>ii) Online installations can take advantage of the Windows Azure platform to run customizations. For instance, a custom-built workflow may be hosted within a Windows Azure role. Since the workflow is hosted on Windows Azure, there is minimal administrative overhead for ensuring that the workflow is up and running, OS patches are applied etc. </p>
<p><a href="http://vlele.files.wordpress.com/2011/05/clip_image003.gif"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="clip_image003" border="0" alt="clip_image003" src="http://vlele.files.wordpress.com/2011/05/clip_image003_thumb.gif?w=240&#038;h=153" width="240" height="153" /></a></p>
<p>To better understand this concept let us briefly look at a few scenarios: </p>
<p><b><u>Scenario #1: Connecting to Cloud-based databases</u></b></p>
<p>This scenario is about leveraging SQL Azure-based databases within an on-premise SharePoint instance. SQL Azure is a database-as-a-service offering that is part of Windows Azure. It makes it easy to provision any number of databases that are easy to administer and come bundled with a highly availability setup. </p>
<p>As depicted in the diagram below, Business Connectivity Services (BCS) can be used to connect data contained within a SQL Azure database to an external list in SharePoint. You can choose to connect to the SQL Azure instance directly or via a Web or Worker role. </p>
<p><a href="http://vlele.files.wordpress.com/2011/05/clip_image004.gif"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="clip_image004" border="0" alt="clip_image004" src="http://vlele.files.wordpress.com/2011/05/clip_image004_thumb.gif?w=174&#038;h=240" width="174" height="240" /></a></p>
<p><i>For detailed steps on connecting to SQL Azure using BCS please refer to </i><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6d2dc556-650a-484f-8f52-f641967b42ea&amp;displaylang=en"><i>this</i></a><i> toolkit. </i></p>
<p><b><u>Scenario #2: Taking advantage of the data marketplace </u></b></p>
<p>This scenario is about leveraging the Windows Azure <a href="https://datamarket.azure.com/about">DataMarket</a> to author SharePoint-based dashboards and mashups. The Windows Azure DataMarket provides a marketplace for data where content publishers can make their datasets available to consumers. This includes datasets such as Health and Wellness data, location-based services, demographics, etc. All of the data available on DataMarket is curated and highly available. It is also consumable via a consistent set of REST-based ODATA APIs. This makes it possible to consume the DataMarket data via PowerPivot add-in in Excel. Once an Excel workbook containing PowerPivot data has been authored, it can then be published to SharePoint. This allows SharePoint users to view and collaborate around the Power Pivot application.&#160;&#160; <i>For a brief demo of PowerPivot with a Windows Azure DataMarket datasource, please refer to this brief </i><a href="http://cid-818700175481d002.office.live.com/self.aspx/shared/PowerPivot%20Demo%20Vishwas%5E52%5E6.mp4"><i>video</i></a><i> I recorded a while back. </i></p>
<p><b><u>Scenario #3: Scalable routing of notifications</u></b></p>
<p>This scenario is about leveraging the Windows Azure-based infrastructure to route SharePoint notifications. The Windows Azure AppFabric Service Bus provides an infrastructure for large-scale event distribution. As shown in the diagram below, SharePoint notification such as the item added events (for instance adding a new announcement to a list) can be routed over the Windows Azure App Fabric Service Bus to a large number of listeners. </p>
<p><a href="http://vlele.files.wordpress.com/2011/05/clip_image005.gif"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="clip_image005" border="0" alt="clip_image005" src="http://vlele.files.wordpress.com/2011/05/clip_image005_thumb.gif?w=240&#038;h=167" width="240" height="167" /></a></p>
<p><i>For detailed discussion on building custom SharePoint Service Application that can act as conduit to the Windows Azure AppFabric Service Bus, please refer to my earlier </i><a href="http://vlele.wordpress.com/2010/09/08/sharepoint-as-a-services-platform/"><i>blog post</i></a><i>.</i></p>
<p><b><u>Scenario #4: Dynamic Scaling </u></b></p>
<p>This scenario is about leveraging the elastic computational resources available on the Windows Azure platform. Windows Azure VM role allows customers to bring their own pre-created OS image to the cloud. Recently, as a proof of concept, we hosted an Excel Services instance via the VM Role. As shown in the diagram below, the benefit of such an approach is that number of VM role instances can be dynamically changed based on the load.&#160; This means that the customer doesn’t need to have a large setup on-premise to handle expected and un-expected peaks. Instead, they can “burst out” to the cloud </p>
<p><a href="http://vlele.files.wordpress.com/2011/05/clip_image006.gif"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:5px;" title="clip_image006" border="0" alt="clip_image006" src="http://vlele.files.wordpress.com/2011/05/clip_image006_thumb.gif?w=240&#038;h=145" width="240" height="145" /></a></p>
<p><i>For more information on setting up Excel Services in VM role please refer to a </i><a href="http://sandhoo.wordpress.com/2011/03/01/using-the-azure-vm-role-to-host-sharepoint-functionality/"><i>blog post</i></a><i> by Harin Sandhoo from </i><a href="http://www.appliedis.com/"><i>AIS</i></a><i>.</i></p>
<p>Before I close, I would like to refer the readers to Steve Fox’s <a href="http://blogs.msdn.com/b/steve_fox/">blog</a>. Steve Fox has been a thought leader on this topic of integrating Windows Azure with SharePoint. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/332/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=332&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2011/05/06/sharepoint-and-azure-integration-opportunities/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://cid-818700175481d002.office.live.com/self.aspx/shared/PowerPivot%20Demo%20Vishwas%5E52%5E6.mp4" length="22554" type="video/mp4" />
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/05/clip_image002_thumb.gif" medium="image">
			<media:title type="html">clip_image002</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/05/clip_image003_thumb.gif" medium="image">
			<media:title type="html">clip_image003</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/05/clip_image004_thumb.gif" medium="image">
			<media:title type="html">clip_image004</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/05/clip_image005_thumb.gif" medium="image">
			<media:title type="html">clip_image005</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/05/clip_image006_thumb.gif" medium="image">
			<media:title type="html">clip_image006</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows Azure Boot Camp at MIX</title>
		<link>http://vlele.wordpress.com/2011/04/11/windows-azure-boot-camp-at-mix/</link>
		<comments>http://vlele.wordpress.com/2011/04/11/windows-azure-boot-camp-at-mix/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 03:51:00 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/2011/04/12/windows-azure-boot-camp-at-mix/</guid>
		<description><![CDATA[Later today I will be presenting the “Cloud computing with the Windows Azure Platform” boot camp at MIX. My session is comprised of three sections: Overview of Cloud Computing Introduction to Windows Azure Platform Review an on-premise MVC3 app Move the on-premise app to Windows Azure Fault Tolerance and Diagnostics Tips &#38; Tricks &#8211; Building [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=298&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Later today I will be presenting the “<a href="http://channel9.msdn.com/events/MIX/MIX11/CMP04">Cloud computing with the Windows Azure Platform</a>” boot camp at MIX. My session is comprised of three sections:</p>
<ul>
<li>Overview of Cloud Computing      <br />Introduction to Windows Azure Platform </li>
<li>Review an on-premise MVC3 app      <br />Move the on-premise app to Windows Azure </li>
<li>Fault Tolerance and Diagnostics      <br />Tips &amp; Tricks &#8211; Building Scalable Apps in the cloud </li>
</ul>
<p>As part of the second session, I will go over the steps to “Azure-enable” an existing on-premise MVC 3 based web application. This blog is an attempt to capture these steps for the benefit of the attendees and other readers of this blog. </p>
<p>Before we begin, let me state the key objectives of this exercise:</p>
<ul>
<ul>
<li>Demonstrate that apps built using currently shipping, on-premise technologies (.NET 4.0 / VS 2010) can easily be moved to the Windows Azure Platform. (Of course, the previous version of .NET (3.5 Sp1) is supported as well.) </li>
<li>Understand subtle differences in code between&#160; running on-premise and on the Windows Azure platform. </li>
<li>Reduce the number of moving parts within the application by “outsourcing” a number of functions to Azure based services. </li>
<li>Refactor the application to take advantage of the elasticity and scalability characteristics, inherent in a cloud platform such as Windows Azure. </li>
</ul>
</ul>
<p>&#160;</p>
<p><font size="4"><strong>Community Portal – An MVC3 based on-premise application</strong></font></p>
<p>The application is simple by design. It is a Community Portal (hereafter interchangeably referred to as CP) that allows users to create tasks. To logon to the CP, users need to register themselves. Once a task has been created, users can kick-off a workflow to guide the task to completion. The workflow represents a two-step process that routes the request to the assignee, first, and then to the approver. In addition to this primary use case of task creation and workflow, Community Portal also allows users to access reports such as “Tasks complete/ Month”. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb.png?w=569&#038;h=156" width="569" height="156" /></a></p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb1.png?w=157&#038;h=240" width="157" height="240" /></a><a href="http://vlele.files.wordpress.com/2011/04/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb2.png?w=240&#038;h=219" width="240" height="219" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>The following diagram depicts the Community Portal architecture. It is comprised of two subsystems: 1) an MVC3 based Community Portal site, and 2) a WF 4.0 based Task Workflow Service. This is very quick overview assuming that you are familiar with the core concepts such as MVC 3, EF, Code-First and so on. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb3.png?w=608&#038;h=398" width="608" height="398" /></a></p>
<p>&#160;</p>
<p>Community Portal is a MVC 3 based site. The bulk of the logic is resides within the actions&#160; as part of the <em>TasksController class</em>.&#160; Razor is used as the ViewEngine. Model is based on EF generated entities. Data annotations are used to specify validation for individual fields.&#160; Community Portal uses the built-in membership provider to store and validate user credentials. CP also uses the built-in ASP.NET session state provider to store and retrieve data from the cache. In order to avoid hitting the database on each page refresh, we cache the <em>TaskSummary</em> (list of tasks assigned to a user) in the session state.&#160; </p>
<blockquote><p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb4.png?w=240&#038;h=44" width="240" height="44" /></a></p>
<p>Tasks created by the users are stored in SQL Server. EF 4.0, in conjunction with the Code-First library, is used to access the data stored in SQL Server. As part of the task creation, users can upload an image. Uploaded images are stored in SQL Server using the FILESTREAM feature.&#160; Since the FILESTREAM allows for storing the BLOB data on a NTFS volume, it provides excellent support for streaming large BLOBs [as opposed to the 2GB limit imposed by varbinary(max)]. When the user initiates a workflow, a message is sent over to WCF using the <i>BasicHttpBinding</i>. This causes the WF instance to be created. This brings us to the second subsystem – workflow host. </p>
<p>As stated, Task Workflow Service consists of a WF 4.0-based workflow program hosted inside a console application (we could have just as easily hosted this in IIS). WF program is based on built-in <i>Receive</i>, <i>SendReply,</i> and <i>InvokeMethod</i> activities. As stated, this workflow is a two-stage workflow. The first call into the workflow kicks off a new instance. Each new instance updates the task status to “Assigned” via the <i>InvokeMethod</i> activity and sends a reply to the caller. Then the workflow waits for “task completed” message to arrive. Once the “task completed” message arrives, the workflow status is marked “complete”, followed by a response to the caller. The last step is repeated for the “task reviewed” message. </p>
</blockquote>
<blockquote></blockquote>
<p><a href="http://vlele.files.wordpress.com/2011/04/image5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:block;float:none;padding-top:0;border-width:0;margin:5px auto;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb5.png?w=171&#038;h=417" width="171" height="417" /></a></p>
<p>In order to ensure that all messages are appropriately correlated (i.e. routed to the appropriate instance), a content-based correlation identifier is used. Content-based correlation is new in WF 4.0. It allows an element in the message (in this case taskId) to server as the correlation token. Refer to the screenshot below: Xpath query is used to extract the TaskId from the message payload. The WF 4 runtime compares the result of the Xpath expression to the variable pointed to by the <i>CorrelatesWith</i> attribute to determine the appropriate instance where the message needs to be delivered. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb6.png?w=461&#038;h=255" width="461" height="255" /></a></p>
<p>&#160;</p>
<p>A quick word on the reporting piece, again for the sake of simplicity, the Community Portal relies on client report definition files (.rdlc). This is based on the local processing mode supported by the report viewer control. Since the ReportViewer control (a server-side control) cannot be used inside MVC, an alternate route was created. </p>
<p>Finally, the following diagram depicts the on-premise solution – it consists of two projects: 1) an MVC 3 based CommunityPortal project, and 2) a console application that hosts the WF 4.0 based TaskWorkflow.</p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb7.png?w=240&#038;h=69" width="240" height="69" /></a></p>
<p>This concludes our whirlwind tour of the on-premise app. </p>
<p><font size="4"><strong>Changing Community Portal to run on Windows Azure</strong></font></p>
<p>Let us switch gears and discuss how the on-premise version of Community Portal can be moved to the Windows Azure Platform. </p>
<p>Even though our on-premise application is trivial, it includes a number of moving parts. So if we were to move this application to IaaS (Infrastructure as a Service) provider, we would have to setup and manage the various building blocks ourselves. For instance, we would need to install Windows Server AppFabric caching and setup a pool of cache servers; we would also have to install SQL Server and setup high availability; we would have to install an identity provider (IP) and setup user database and so on. We have not even discussed the work involved in keeping the servers patched. </p>
<p>Fortunately, Windows Azure platform is a PaaS offering. In other words, it provides a platform of building block services that can make it easier to develop cloud-based applications. Application developers can subscribe to a set of pre-built services as opposed to creating and managing their own. There is one other important benefit of PaaS – the ability to treat the entire application (including the virtual machines, executable and binaries) as one logical service. For instance, rather than logging on to each server (that makes up the application) and deploying the binaries to them individually, Windows Azure allows developers to simply upload the binaries and a deployment model to the Windows Azure Management portal – as you would expect there is a way to automate this step using the management API. Window Azure in turn allocates the appropriate virtual machines, storage and network, based on the deployment model. It also takes care of installing the binaries to all the virtual machines that have been provisioned. For more a detailed discussion on PaaS capabilities of Windows Azure PaaS, please refer to my <a href="http://vlele.wordpress.com/2010/12/07/platform-as-a-service-when-it-comes-to-the-cloud-paas-is-the-point-2/">previous</a> blog post.</p>
<p>The following diagram illustrates the different pieces that make up a Windows Azure virtual machine (also referred to a compute unit). The binaries supplied by the application developer are represented as the dark grey box. The rest of the components are supplied by the Windows Azure platform. Role runtime is some bootstrapping code that we will discuss later in the blog post. Together, this virtual machine represents an instance of software component (such as an MVC 3 site, a batch executable program, etc.) and is commonly referred to as a role. Currently, there are three types of roles – Web role, Worker Role and VM role. Each role type is designed for a type of software component. For instance, a web role is designed for web application or anything related to it; a worker role is designed for long running, non-interactive tasks. An application hosted within Azure (commonly referred to as an Azure-hosted service) is made up of one more types of roles. Another thing to note is that an Azure-hosted application can scale by adding instances of a certain type.</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb8.png?w=437&#038;h=288" width="437" height="288" /></a></p>
<p>&#160;</p>
<p>Now that you understand the core concepts (such as deployment model, role and role instances) let us resume our discussion on converting the on-premise application to run on Windows Azure. Let us begin with a discussion of the deployment model. It turns out that the deployment model is an XML file that describes things such as the various roles that make our application, number of instances of each role, configuration settings, port settings, etc. Fortunately, Visual Studio provides tooling so that we don’t have to hand create the XML file. Simply add a Windows Azure project to the existing solution as shown below. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb9.png?w=496&#038;h=343" width="496" height="343" /></a></p>
<p>Select a worker role. Remember that a worker role is designed for a long-running task. In this instance, we will use it to host instances of TaskWorkflow. There is no need to select a web role as we will take the existing <i>CommunityPortal</i> project and map it to a web role.</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image10.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb10.png?w=458&#038;h=288" width="458" height="288" /></a></p>
<p><a href="http://vlele.files.wordpress.com/2011/04/clip_image0014.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:5px;" title="clip_image001[4]" border="0" alt="clip_image001[4]" src="http://vlele.files.wordpress.com/2011/04/clip_image0014_thumb.png?w=244&#038;h=155" width="244" height="155" /></a></p>
<p>We do this by clicking on <i>Add </i>Web Role in the solution (as shown below) and selecting the <i>CommunityPortal</i> project. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb11.png?w=313&#038;h=145" width="313" height="145" /></a></p>
<p>Here is the screen shot of our modified&#160; solution structure. Our solution has two roles.&#160; To mark the transition to an Azure service, I dropped the <i>OnPremise</i> suffix from our solution name – so our solution is now named <i>CommunityPortal</i>. </p>
<p> <a href="http://vlele.files.wordpress.com/2011/04/image12.png"><img style="background-image:none;padding-left:0;padding-right:0;display:block;float:none;padding-top:0;border-width:0;margin:5px auto;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb12.png?w=240&#038;h=197" width="240" height="197" /></a></p>
<p>Through these steps, we have generated our deployment model! </p>
<p>The following snippet depicts the generated <i>ServiceDefinition</i> file. This file contains definitions of role, endpoints, etc. As you can see, we have one web role and one worker role as part of our service. The Sites element describes the collection of web sites that are hosted in a web role. In this instance, we have a single web site that is bound to an external endpoint that is listening to HTTP traffic over port 80 ( line # 12 &amp; 17 ). </p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span>&lt;?xml version=<span class="str">&quot;1.0&quot;</span> encoding=<span class="str">&quot;utf-8&quot;</span>?&gt;</pre>
<pre><span class="lnum">   2:  </span>&lt;ServiceDefinition name=<span class="str">&quot;WindowsAzureProject5&quot;</span> xmlns=<span class="str">&quot;http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition&quot;</span>&gt;</pre>
<pre class="alt"><span class="lnum">   3:  </span>  &lt;WorkerRole name=<span class="str">&quot;WorkerRole1&quot;</span>&gt;</pre>
<pre><span class="lnum">   4:  </span>    &lt;Imports&gt;</pre>
<pre class="alt"><span class="lnum">   5:  </span>      &lt;Import moduleName=<span class="str">&quot;Diagnostics&quot;</span> /&gt;</pre>
<pre><span class="lnum">   6:  </span>    &lt;/Imports&gt;</pre>
<pre class="alt"><span class="lnum">   7:  </span>  &lt;/WorkerRole&gt;</pre>
<pre><span class="lnum">   8:  </span>  &lt;WebRole name=<span class="str">&quot;CommunityPortal&quot;</span>&gt;</pre>
<pre class="alt"><span class="lnum">   9:  </span>    &lt;Sites&gt;</pre>
<pre><span class="lnum">  10:  </span>      &lt;Site name=<span class="str">&quot;Web&quot;</span>&gt;</pre>
<pre class="alt"><span class="lnum">  11:  </span>        &lt;Bindings&gt;</pre>
<pre><span class="lnum">  12:  </span>          &lt;Binding name=<span class="str">&quot;Endpoint1&quot;</span> endpointName=<span class="str">&quot;Endpoint1&quot;</span> /&gt;</pre>
<pre class="alt"><span class="lnum">  13:  </span>        &lt;/Bindings&gt;</pre>
<pre><span class="lnum">  14:  </span>      &lt;/Site&gt;</pre>
<pre class="alt"><span class="lnum">  15:  </span>    &lt;/Sites&gt;</pre>
<pre><span class="lnum">  16:  </span>    &lt;Endpoints&gt;</pre>
<pre class="alt"><span class="lnum">  17:  </span>      &lt;InputEndpoint name=<span class="str">&quot;Endpoint1&quot;</span> protocol=<span class="str">&quot;http&quot;</span> port=<span class="str">&quot;80&quot;</span> /&gt;</pre>
<pre><span class="lnum">  18:  </span>    &lt;/Endpoints&gt;</pre>
<pre class="alt"><span class="lnum">  19:  </span>    &lt;Imports&gt;</pre>
<pre><span class="lnum">  20:  </span>      &lt;Import moduleName=<span class="str">&quot;Diagnostics&quot;</span> /&gt;</pre>
<pre class="alt"><span class="lnum">  21:  </span>    &lt;/Imports&gt;</pre>
<pre><span class="lnum">  22:  </span>  &lt;/WebRole&gt;</pre>
<pre class="alt"><span class="lnum">  23:  </span>&lt;/ServiceDefinition&gt;</pre>
</div>
<p>.csharpcode {<br />
	background-color: #ffffff; font-family: consolas, &#8220;Courier New&#8221;, courier, monospace; color: black; font-size: small<br />
}<br />
.csharpcode pre {<br />
	background-color: #ffffff; font-family: consolas, &#8220;Courier New&#8221;, courier, monospace; color: black; font-size: small<br />
}<br />
.csharpcode pre {<br />
	margin: 0em<br />
}<br />
.csharpcode .rem {<br />
	color: #008000<br />
}<br />
.csharpcode .kwrd {<br />
	color: #0000ff<br />
}<br />
.csharpcode .str {<br />
	color: #006080<br />
}<br />
.csharpcode .op {<br />
	color: #0000c0<br />
}<br />
.csharpcode .preproc {<br />
	color: #cc6633<br />
}<br />
.csharpcode .asp {<br />
	background-color: #ffff00<br />
}<br />
.csharpcode .html {<br />
	color: #800000<br />
}<br />
.csharpcode .attr {<br />
	color: #ff0000<br />
}<br />
.csharpcode .alt {<br />
	background-color: #f4f4f4; margin: 0em; width: 100%<br />
}<br />
.csharpcode .lnum {<br />
	color: #606060<br />
}</p>
<p>While the service definition file defines the settings, the values associated with these settings reside in the service configuration file. The following snippet shows the equivalent service configuration file. Note the Instances element (line #4 &amp; line #10) that defines the number of instances for a given role. This tells us that changing the number of instances of a role is just a matter of changing a setting within the service configuration file. Also note that we have one or more configuration settings defined for each role. This seems a bit odd doesn’t it? Isn’t Web.config the primary configuration file for an ASP.Net application? The answer is that we are defining configuration settings that apply to one or more instances of a web role. There is one other important reason for preferring the service definition file over web.config. But to discuss that, we need wait until we have talked about packaging and uploading to application binaries to Windows Azure. </p>
<p>&#160;</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span>&lt;?xml version=<span class="str">&quot;1.0&quot;</span> encoding=<span class="str">&quot;utf-8&quot;</span>?&gt;</pre>
<pre><span class="lnum">   2:  </span>&lt;ServiceConfiguration serviceName=<span class="str">&quot;WindowsAzureProject5&quot;</span> xmlns=<span class="str">&quot;http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration&quot;</span> osFamily=<span class="str">&quot;1&quot;</span> osVersion=<span class="str">&quot;*&quot;</span>&gt;</pre>
<pre class="alt"><span class="lnum">   3:  </span>  &lt;Role name=<span class="str">&quot;WorkerRole1&quot;</span>&gt;</pre>
<pre><span class="lnum">   4:  </span>    &lt;Instances count=<span class="str">&quot;1&quot;</span> /&gt;</pre>
<pre class="alt"><span class="lnum">   5:  </span>    &lt;ConfigurationSettings&gt;</pre>
<pre><span class="lnum">   6:  </span>      &lt;Setting name=<span class="str">&quot;Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString&quot;</span> <span class="kwrd">value</span>=<span class="str">&quot;UseDevelopmentStorage=true&quot;</span> /&gt;</pre>
<pre class="alt"><span class="lnum">   7:  </span>    &lt;/ConfigurationSettings&gt;</pre>
<pre><span class="lnum">   8:  </span>  &lt;/Role&gt;</pre>
<pre class="alt"><span class="lnum">   9:  </span>  &lt;Role name=<span class="str">&quot;CommunityPortal&quot;</span>&gt;</pre>
<pre><span class="lnum">  10:  </span>    &lt;Instances count=<span class="str">&quot;1&quot;</span> /&gt;</pre>
<pre class="alt"><span class="lnum">  11:  </span>    &lt;ConfigurationSettings&gt;</pre>
<pre><span class="lnum">  12:  </span>      &lt;Setting name=<span class="str">&quot;Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString&quot;</span> <span class="kwrd">value</span>=<span class="str">&quot;UseDevelopmentStorage=true&quot;</span> /&gt;</pre>
<pre class="alt"><span class="lnum">  13:  </span>    &lt;/ConfigurationSettings&gt;</pre>
<pre><span class="lnum">  14:  </span>  &lt;/Role&gt;</pre>
<pre class="alt"><span class="lnum">  15:  </span>&lt;/ServiceConfiguration&gt;</pre>
</div>
<p>.csharpcode {<br />
	background-color: #ffffff; font-family: consolas, &#8220;Courier New&#8221;, courier, monospace; color: black; font-size: small<br />
}<br />
.csharpcode pre {<br />
	background-color: #ffffff; font-family: consolas, &#8220;Courier New&#8221;, courier, monospace; color: black; font-size: small<br />
}<br />
.csharpcode pre {<br />
	margin: 0em<br />
}<br />
.csharpcode .rem {<br />
	color: #008000<br />
}<br />
.csharpcode .kwrd {<br />
	color: #0000ff<br />
}<br />
.csharpcode .str {<br />
	color: #006080<br />
}<br />
.csharpcode .op {<br />
	color: #0000c0<br />
}<br />
.csharpcode .preproc {<br />
	color: #cc6633<br />
}<br />
.csharpcode .asp {<br />
	background-color: #ffff00<br />
}<br />
.csharpcode .html {<br />
	color: #800000<br />
}<br />
.csharpcode .attr {<br />
	color: #ff0000<br />
}<br />
.csharpcode .alt {<br />
	background-color: #f4f4f4; margin: 0em; width: 100%<br />
}<br />
.csharpcode .lnum {<br />
	color: #606060<br />
}</p>
<p>&#160;</p>
<p>Visual Studio makes it easy to work with the service configuration settings so developers don’t have to work with the XML directly. Following screenshot shows the UI for adjusting the configuration settings. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image13.png"><img style="background-image:none;padding-left:0;padding-right:0;display:block;float:none;padding-top:0;border-width:0;margin:5px auto;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb13.png?w=336&#038;h=298" width="336" height="298" /></a></p>
<p>Now that we have the deployment model, it’s time to discuss how we package up the binaries (recall that to host an application on Windows Azure, we need to provide a deployment model and the binaries ). Before we create the package, we need to make sure that all the files we will need to run our application in Window Azure are indeed included. By default, all the application assemblies will be included. However, recall that Windows Azure is providing the environment for our application to run. So we can expect .NET 4.0 framework (or 3.5 Sp1) assemblies, C Runtime components, etc. to be available to the applications running in Windows Azure. There are however, some add-on packages that are not available provided in the environment today such as MVC3. This means we need to explicitly include the MVC3 assemblies as part of our package by setting the <i>CopyLocal=true</i>. </p>
<p>Now that we have covered the concept of a service package and configuration file, let us revisit the discussion on where to store configuration settings that need to change often. The only way to change a setting that is part of the package (such as the settings included within the web.config) is to redeploy it. In contrast, settings defined in the service configuration can easily be changed via the portal or the management API, without the need to redploy the entire package. So, now that I have convinced you to store the configuration settings in the service configuration files, we must make a change to the code to read settings from the new location. We need to use the <i>RoleEnvironment.GetConfigurationSettingValue </i>to read the value of a setting from the service configuration file. <i>RoleEnvironment</i> class gives us access to the Windows Azure runtime. In addition to accessing the configuration settings, we can use this class to find out about all the roles instances that are running as part of the service. We can also use it to make checks to see if the code is running in Windows Azure. Finally, we also need to set the global configuration setting publisher inside the Global.asax.cs as shown below: </p>
<p>&#160;</p>
<p>&#160;</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span>           CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =&gt;</pre>
<pre><span class="lnum">   2:  </span>            {</pre>
<pre class="alt"><span class="lnum">   3:  </span>                configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));</pre>
<pre><span class="lnum">   4:  </span>            });</pre>
<pre class="alt"><span class="lnum">   5:  </span>&#160;</pre>
</div>
<p>That’s all the changes we will make to the web role for now. </p>
<p>But we also need to modify the worker role we just added. The on-premise version relied on a console application to the host the task workflow. The equivalent piece of code (shown) can be moved to the <i>Run</i> method within the <i>RoleEntryPoint.</i> This begs the question – what is <i>RoleEntryPoint </i>and why do I need it? Recall that when discussing the Azure VM, we briefly alluded to the Role Runtime. This is the other piece of logic (other than the application code files themselves) that an application developer can include as part of the package. It allows an application to receive callbacks (OnStart, OnStop. etc.) from the runtime environment and is, therefore, a great place to inject bootstrapping code such as diagnostics, another important example of the type of callback is the notification when there is a change in service configuration setting. We talked about the role instance count as being a service configuration setting. So if the user decides to add or remove role instances, the application can receive a configuration change event and act accordingly. </p>
<p>Strictly speaking, including a class derived from RoleEntryPoint is not required if there is no initialization to be done. That is not the case with worker role we added to the solution. Here we need to use the OnStart method to setup WorkflowService endpoint and open the workflowhost as shown in the snippet below. Once the OnStart method returns (with a return value of true) we will start receiving incoming traffic. This is why it is important to have the WorkflowServiceHost all ready before we return from OnStart.</p>
<p>The first line of the snippet below requires some explanation. While running on-premise, the base address was simply the local host and dynamically assigned port. However, when the code is being run inside Windows Azure, we need to determine at runtime which port has been assigned to the role. The worker role needs to setup an <i>internal</i> endpoint to listen to incoming requests to the workflow service. Choosing an internal endpoint is a decision we made. We could have just as easily decided to allow the workflow host to listen on an external point (available on the public internet) However, in deference to the defense in depth idea, we decided to limit the exposure to the workflow host and only allow other role instances running as part of the service to communicate with it. </p>
<p>&#160;</p>
<div class="csharpcode">
<pre><span class="lnum">   1:  </span>RoleInstanceEndpoint internalEndPoint =</pre>
<pre><span class="lnum">   2:  </span>     RoleEnvironment.CurrentRoleInstance.InstanceEndpoints[<span class="str">&quot;TaskEndpoint&quot;</span>];</pre>
<pre><span class="lnum">   3:  </span>&#160;</pre>
<pre><span class="lnum">   4:  </span>  <span class="kwrd">string</span> protocol = <span class="str">&quot;http://&quot;</span>;</pre>
<pre><span class="lnum">   5:  </span>  <span class="kwrd">string</span> baseAddress = <span class="kwrd">string</span>.Format(<span class="str">&quot;{0}{1}/&quot;</span>, protocol, internalEndPoint.IPEndpoint);</pre>
<pre><span class="lnum">   6:  </span>&#160;</pre>
<pre><span class="lnum">   7:  </span>  host = <span class="kwrd">new</span> WorkflowServiceHost(<span class="kwrd">new</span> TaskService(), <span class="kwrd">new</span> Uri(baseAddress));</pre>
<pre><span class="lnum">   8:  </span>  </pre>
<pre><span class="lnum">   9:  </span>  host.AddServiceEndpoint(<span class="str">&quot;ITaskService&quot;</span>, <span class="kwrd">new</span> BasicHttpBinding(BasicHttpSecurityMode.None) { HostNameComparisonMode = HostNameComparisonMode.Exact }, <span class="str">&quot;TaskService&quot;</span>);</pre>
<pre><span class="lnum">  10:  </span>&#160;</pre>
<pre><span class="lnum">  11:  </span>  host.Open();</pre>
</div>
<p>The Run method then simply runs a never ending&#160; loop as shown below.&#160; This is equivalent to the static void <em>Main</em> method from our console application. </p>
<pre class="csharpcode">&#160;</pre>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span>           Trace.WriteLine(<span class="str">&quot;TaskServiceWorkerRole entry point called&quot;</span>, <span class="str">&quot;Information&quot;</span>);</pre>
<pre><span class="lnum">   2:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">   3:  </span>            <span class="kwrd">while</span> (<span class="kwrd">true</span>)</pre>
<pre><span class="lnum">   4:  </span>            {</pre>
<pre class="alt"><span class="lnum">   5:  </span>                Thread.Sleep(10000);</pre>
<pre><span class="lnum">   6:  </span>                Trace.WriteLine(<span class="str">&quot;Working&quot;</span>, <span class="str">&quot;Information&quot;</span>);</pre>
<pre class="alt"><span class="lnum">   7:  </span>            }</pre>
</div>
<p>Once we have gone through and included the&#160; appropriate files, packaging the application binaries is just matter of right clicking and selecting the publish option. This brings up the publish dialog as shown below. For now we will simply select “Create Service Package option” and click OK. </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image14.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb14.png?w=312&#038;h=294" width="312" height="294" /></a></p>
<p>That’s it. At this point, we have both the required artifacts we need to publish to Windows Azure. We can browse to the windows.Azure.com (shown below) and create a new service called <em>CommunityPortal</em>. Notice the two highlighted text boxes – here we provide the package location and the deployment model. Let us&#160; go ahead and publish our application to Windows Azure. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image15.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb15.png?w=392&#038;h=420" width="392" height="420" /></a></p>
<p>&#160;</p>
<p><font size="4"><strong>Not so fast …</strong></font></p>
<p>We’re all done and the application is running on Windows Azure! Well almost, except we don’t have a database available to the code running in Windows Azure (this includes the Task database and the membership database). Unless of course, we make our on-premise database instances accessible to the Windows Azure hosted service. While doing so is technically possible, it may not be such a good idea because of latency and security concerns. The alternative is to move the databases close to the Windows Azure hosted service. Herein lies an important concept. Not only do we want to move these databases to Windows Azure, we also want to get out of the business of setting up high availability, applying patches, etc. for our database instances. This is where the PaaS platform capabilities offered by Windows Azure shine. </p>
<p>In the next few subsections, we will look at approaches that allow us to “get out of the way” and let the Windows Azure platform take care of as many moving parts as possible. One other thing – changing the on-premise code to take advantage of Azure-provided services sounds good, but, it is only practical to do if there is semantic parity between the two environments. It is not reasonable to expect developers to maintain two completely different code bases. Fortunately, achieving semantic parity is indeed the key design goal that designers of Windows Azure had in mind. The following diagram represents the symmetry between the between on-premise and on Windows Azure offerings. It is important to note that a complete symmetry between on-premise and Windows Azure is not there today and is unlikely to be there anytime soon. Frankly, achieving complete symmetry is a journey on which the entire ecosystem including Microsoft, ISVs, SIs and developers like us, have to embark on together. Only then can we hope to realize the benefits that PaaS has to offer. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image16.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb16.png?w=493&#038;h=232" width="493" height="232" /></a></p>
<p>Let us start with moving the database to the cloud.</p>
<p>Windows Azure includes a highly available database as a service offering called SQL Azure. The following diagram depicts the architecture of SQL Azure. SQL Azure is powered by a fabric of SQL Servers nodes that allows for setting up highly elastic (i.e. ability to create as many databases as needed) and redundant (i.e. resilience against failures such as corrupted disk) databases. While the majority of the on-premise SQL Server functions are available within SQL Azure, there is not 100% parity between the two offerings. This is mainly due to the following reasons : </p>
<blockquote>
<p>1) SQL Azure team has simply not gotten around building this capability into SQL Azure yet, however, a future release is planned to address this. An example of such a feature is CLR-based stored procedures. This is something that is not available on SQL Azure today, but the team has gone on record to add this capability in the future.<br />
    </p>
<p>2) It simply does not make sense to enable certain features in a hosted environment such as SQL Azure. For example, ability to specify file groups will limit how the SQL Azure service can move the databases around. So this feature is unlikely to be supported by SQL Azure.</p>
</blockquote>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image17.png"><img style="background-image:none;padding-left:0;padding-right:0;display:block;float:none;padding-top:0;border-width:0;margin:5px auto;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb17.png?w=433&#038;h=260" width="433" height="260" /></a></p>
<p>As application developers, all we need to do is provision the database on the Windows Azure portal by specifying the size as shown below. For this sample, we have a very modest size requirement. So we don’t have to worry about sharding our data across multiple databases. The next step is to replace the on-premise connection string with the SQL Azure connection string. </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image18.png"><img style="background-image:none;padding-left:0;padding-right:0;display:block;float:none;padding-top:0;border-width:0;margin:5px auto;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb18.png?w=408&#038;h=230" width="408" height="230" /></a></p>
<p>&#160;</p>
<p>Remember from our earlier discussion that there is not 100 % parity between on-premise SQL Server and SQL Azure. Reviewing our on-premise database reveals one aspect of our schema that cannot be migrated to SQL Azure – this is the FILESTREAM column type that we used to efficiently store an uploaded image associated with a task. The FILESTREAM column type allows us to store the image on a mounted NTFS volume outside of the data file. This is something that SQL Azure is unlikely to support. Fortunately, Windows Azure provides Azure Blob storage that allows us to store large BLOBs efficiently. Furthermore, we don’t have to worry about managing the NTFS volume (as is the case with FILESTREAM) – Azure Blob storage takes care of that for us. It provides a highly elastic store that is also fault tolerant (as it keeps multiple copies of the data). Finally, should we need to, we can serve the images from a location closer to our users by enabling the Content Delivery Network (CDN) option on our Azure Blob containers. Hopefully, I have convinced you that Azure Blob storage is a much more optimal place for storing our BLOB data. </p>
<p>Now, let’s look at the code change that is needed to store the images in Blob store. The change is rather simple. First, we will upload the image to the Azure Blob storage. Next, we will take the address of the Blob container and store it in the Tasks table. Of course, we will need to change the Tasks table to replace the FILESTREAM column with the varchar (255) that allows us to store the address of the Blob container. </p>
<p>&#160;</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span>       <span class="kwrd">public</span> <span class="kwrd">void</span> SaveFile(HttpPostedFileBase fileBase, <span class="kwrd">int</span> taskId)</pre>
<pre><span class="lnum">   2:  </span>        {</pre>
<pre class="alt"><span class="lnum">   3:  </span>            var ext = System.IO.Path.GetExtension(fileBase.FileName);</pre>
<pre><span class="lnum">   4:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">   5:  </span>            var name = <span class="kwrd">string</span>.Format(<span class="str">&quot;{0:10}_{1}{2}&quot;</span>, DateTime.Now.Ticks, Guid.NewGuid(), ext);</pre>
<pre><span class="lnum">   6:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">   7:  </span>            CreateOnceContainerAndQueue();</pre>
<pre><span class="lnum">   8:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">   9:  </span>            var blob = blobStorage.GetContainerReference(<span class="str">&quot;imagelib&quot;</span>).GetBlockBlobReference(name);</pre>
<pre><span class="lnum">  10:  </span>            blob.Properties.ContentType = fileBase.ContentType;</pre>
<pre class="alt"><span class="lnum">  11:  </span>            blob.UploadFromStream(fileBase.InputStream);</pre>
<pre><span class="lnum">  12:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">  13:  </span>            <span class="rem">// Save the blob name into the table</span></pre>
<pre><span class="lnum">  14:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">  15:  </span>            <span class="kwrd">using</span> (SqlConnection conn = <span class="kwrd">new</span> SqlConnection(RoleEnvironment.GetConfigurationSettingValue(<span class="str">&quot;CommunityPortalEntities&quot;</span>)))</pre>
<pre><span class="lnum">  16:  </span>            {</pre>
<pre class="alt"><span class="lnum">  17:  </span>                SqlCommand comm = <span class="kwrd">new</span> SqlCommand(<span class="str">&quot;UPDATE Tasks SET BlobName = @blobName WHERE TaskId = @TaskId&quot;</span>, conn);</pre>
<pre><span class="lnum">  18:  </span>                comm.Parameters.Add(<span class="kwrd">new</span> SqlParameter(<span class="str">&quot;@blobName&quot;</span>, name));</pre>
<pre class="alt"><span class="lnum">  19:  </span>                comm.Parameters.Add(<span class="kwrd">new</span> SqlParameter(<span class="str">&quot;@TaskId&quot;</span>, taskId));</pre>
<pre><span class="lnum">  20:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">  21:  </span>                conn.Open();</pre>
<pre><span class="lnum">  22:  </span>                comm.ExecuteNonQuery();</pre>
<pre class="alt"><span class="lnum">  23:  </span>            }</pre>
<pre><span class="lnum">  24:  </span>        }</pre>
</div>
<p>With this change, we are ready to hook up the SQL Azure based CommunityPortal database to the rest of our application, but what about the existing SSRS reports? What happens to these reports, now that the database has been moved to SQL Azure? We have two options: 1) continue to run the report on an on-premise version of SQL Server Reporting Services (SSRS) by adding the SQL Azure database as a datasource, and 2) move the reporting function to an Windows Azure hosted SSRS service instance (currently in a CTP). The benefit of the latter is obvious by now. We get to subscribe to “reporting as a service” capability without being bogged down with installing and maintaining SSRS instances ourselves. The following screenshot depicts how, using Business Intelligence Development Studio BIDS , we can deploy the existing report definition to SQL Azure Reporting Services instance. Since our database is already migrated to SQL Azure, we can easily add it as the report datasource. </p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image19.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb19.png?w=428&#038;h=257" width="428" height="257" /></a></p>
<p><font size="4"><strong>Outsourcing the authentication setup</strong></font></p>
<p>What about the ASP.NET membership database? I suppose we can also migrate it to SQL Azure. In fact, it turns out that there is a <a href="http://archive.msdn.microsoft.com/KB2006191/Release/ProjectReleases.aspx?ReleaseId=3539">version</a> of ASP.NET membership database install scripts that are designed to work with SQL Azure. So once we migrate the data to SQL Azure based membership database, it is straight forward to rewire our Azure hosted application to work with the new provider. While this approach works just fine, there is one potential issue. Our users do not like the idea of registering a new set of credentials to access the Community Portal. Instead, they would like to use their existing credentials such as Windows LiveID, Facebook, Yahoo! and Google to authenticate to the Community Portal. Since these credentials such as Windows Live ID allow a user to establish their identity, we commonly refer to them as identity providers, or IP. Turns out that IPs rely on a number of different underlying protocols such as OpenID, OAuth etc. Furthermore, these protocols tend to evolve constantly. The task of interacting with a number of distinct IPs seems daunting. Fortunately, Windows Azure provides a service called Access Control Service (ACS) can simplify this task. ACS can act as an intermediary between our application and various IPs. Vittorio and Wade authored an excellent <a href="http://msdn.microsoft.com/en-us/magazine/gg490345.aspx">article</a> that goes through the detailed steps required to integrate our application with ACS. So I will only provide a quick summary. </p>
<ul>
<li>Logon to the portal.appfabriclabs.com</li>
<li>Create a namespace for the Community Portal application as shown below. </li>
</ul>
<ul></ul>
<p><a href="http://vlele.files.wordpress.com/2011/04/image20.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb20.png?w=551&#038;h=62" width="551" height="62" /></a></p>
<ul>
<li>Add the Identity Providers we want to support. As shown in the screenshot below, we have selected Google and Windows Live ID as the two IPs. </li>
</ul>
<p><a href="http://vlele.files.wordpress.com/2011/04/image21.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb21.png?w=443&#038;h=159" width="443" height="159" /></a></p>
<ul>
<li>Notice that the role of our application has changed from being an IP (via the ASP.NET membership provider that was in place earlier) to being entity that relies on well-known IPs. In security parlance, our Community Portal application has become a replying party or RP. Our next step is to register Community Portal as a RP with ACS. This will allow ACS to pass us information about the authenticated users. The screenshot below illustrates how we setup Community Portal as an RP</li>
</ul>
<p><a href="http://vlele.files.wordpress.com/2011/04/image22.png"><img style="background-image:none;padding-left:0;padding-right:0;display:block;float:none;padding-top:0;border-width:0;margin:5px auto;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb22.png?w=454&#038;h=324" width="454" height="324" /></a></p>
<p>&#160;</p>
<ul>
<li>The previous step concludes the ACS setup. All we need to do is copy and paste some configuration settings that ACS has generated for us (based on the IPs and RP setup). This configuration setting needs to be plugged into the Community Portal source code. The configuration information that needs to be copied is highlighted in the screenshot below. </li>
</ul>
<p><a href="http://vlele.files.wordpress.com/2011/04/image23.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb23.png?w=494&#038;h=305" width="494" height="305" /></a></p>
<ul>
<li>Finally, inside Visual Studio we need to add ACS as our authentication mechanism. We do this by selecting “Add STS reference” menu and plugging in the configuration metadata we copied from the ACS portal, as shown in the screenshot below. </li>
</ul>
<p><a href="http://vlele.files.wordpress.com/2011/04/image24.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb24.png?w=563&#038;h=422" width="563" height="422" /></a></p>
<p>&#160;</p>
<ul>
<li>Windows Identity Foundation (WIF) classes needed to interact with ACS are not already installed within the current versions of OS available on Windows Azure. To get around this limitation, we need to install the WIF update as part of the web role initialization. </li>
<li>That’s it! Users will now be prompted to select an IP of their choice, as shown below:</li>
</ul>
<p><a href="http://vlele.files.wordpress.com/2011/04/image25.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb25.png?w=300&#038;h=285" width="300" height="285" /></a></p>
<p><font size="4"><strong>Outsourcing the caching setup</strong></font></p>
<blockquote>
<p><font size="4"><strong>&#160;</strong></font>Up until now we have successfully migrated the task database to SQL Azure. We have also “outsourced” our&#160; security scheme to ACS. Let us look at one last example of a building block service provided by Windows Azure Platform- caching. The on-premise version of Community Portal relies on default in-memory ASP.NET session state. The challenge with moving this default implementation to the cloud is that all web role instances are networked load balanced, so storing the state in-proc on one of the worker role instance does not help. We can get around this limitation by install caching components such as memcached on each of our web role instances.&#160; However, it is our stated goal to&#160; minimize the number of moving parts. Fortunately, what is now becoming a recurring theme of this blog post, we can leverage a Windows Azure Platform provided service called the AppFabric Caching Service.&#160; The next set of steps illustrate how this can be accomplished:</p>
<ul>
<li>Since AppFabric Caching Service is in CTP, we first browse to Appfabric labs portal&#160; &#8211; portal.appfabriclabs.com </li>
<li>We create a new cache service namespace as shown below. </li>
</ul>
<p>&#160;</p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2011/04/image26.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb26.png?w=480&#038;h=210" width="480" height="210" /></a></p>
<ul>
<li>We are done creating the cache. All we need to do is grab the configuration settings from the portal (as shown below) and plug it into the web.config of the Community Portal web project.&#160; </li>
</ul>
<p><a href="http://vlele.files.wordpress.com/2011/04/image27.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2011/04/image_thumb27.png?w=435&#038;h=330" width="435" height="330" /></a></p>
<ul>
<li>With the last step, our ASP.NET state session provider is now based on AppFabric Caching Service. We can continue to use the familiar session syntax to interact with the session state. </li>
</ul>
</blockquote>
<p><font size="4"><strong>Summary </strong></font></p>
<p>We have taken an on-premise version of Community Portal built using currently shipping technologies and moved it to the Windows Azure Platform. In the process&#160; we have eliminated many moving parts of the on-premise application. The Windows Azure based version of Community Portal can now take advantage of the elasticity and scalability characteristics inherent in the platform. </p>
<p>Hope you found this description useful. The source code for the on-premise version can be found <a href="http://cid-818700175481d002.office.live.com/self.aspx/MIX%20BootCamp%202011/CommunityPortalOnPremise.zip">here</a>. The source code for the “Azure-enabled” version can be found <a href="http://cid-818700175481d002.office.live.com/self.aspx/MIX%20BootCamp%202011/CommunityPortal.zip">here</a>. Also, if you would like to test drive Community Portal on Windows Azure – please visit <a href="http://ais.cloudapp.net">http://ais.cloudapp.net</a>&#160; (I will leave it up and running for a few days)</p>
<ul><!--EndFragment--></ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=298&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2011/04/11/windows-azure-boot-camp-at-mix/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/clip_image0014_thumb.png" medium="image">
			<media:title type="html">clip_image001[4]</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb14.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb15.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb16.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb17.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb18.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb19.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb20.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb21.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb22.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb23.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb24.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb25.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb26.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/04/image_thumb27.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing Netizen &#8211; a Windows Azure + Windows Phone 7 Application</title>
		<link>http://vlele.wordpress.com/2011/01/29/introducing-netizen-a-windows-azure-windows-phone-7-application/</link>
		<comments>http://vlele.wordpress.com/2011/01/29/introducing-netizen-a-windows-azure-windows-phone-7-application/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 03:59:52 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/2011/01/29/introducing-netizen-a-windows-azure-windows-phone-7-application/</guid>
		<description><![CDATA[&#160; Netizen (http://netizen.cloudapp.net/ is a Windows Phone 7 application (available in the marketplace for free) that brings the voting record of your congressional representative to your finger tips, directly from your mobile phone. Simply select the Member of Congress you want to follow and &#34;flick through&#34; their voting record. Information about each member’s voting record [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=230&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://vlele.files.wordpress.com/2011/01/clip_image001.gif"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="clip_image001" border="0" alt="clip_image001" src="http://vlele.files.wordpress.com/2011/01/clip_image001_thumb.gif?w=105&#038;h=103" width="105" height="103" /></a></p>
<h3>&#160;</h3>
<p><b>Netizen</b> (<a href="http://netizen.cloudapp.net/">http://netizen.cloudapp.net/</a> is a Windows Phone 7 application (available in the marketplace for free) that brings the voting record of your congressional representative to your finger tips, directly from your mobile phone. Simply select the Member of Congress you want to follow and &quot;flick through&quot; their voting record. Information about each member’s voting record is stored in Windows Azure Storage and is updated daily.</p>
<p>But don&#8217;t just follow how your representative is voting in congress, make your voice heard. By clicking on the &quot;Like It&quot; button on the mobile application, you can influence your friends and neighbors about the bill through the power of social networking. For each bill, Netizen automatically provisions a Facebook page<a href="/Users/vishwas.lele/AppData/Local/Microsoft/Windows/Temporary Internet Files/Content.Outlook/EW5W2V8Y/#_ftn1_2172" name="_ftnref1_2172">[1]</a> dedicated to your member of congress. This page acts almost as a virtual ballot for a bill as well as a community hub where fellow constituents can gather to express their support. Pasted below are some screenshots from the application:<b></b></p>
<p>Not using a mobile device? No problem! Simply point your browser to the addresses listed below: To get a list of representatives for the state of Virginia, use this address: </p>
<p>http://netizen.cloudapp.net/NetizenService.svc/<b>reps</b>/<b>VIRGINIA</b>/atom </p>
<p>To view the recent votes cast by the representative from Virginia 11th district, use this address: </p>
<p><a href="http://netizen.cloudapp.net/NetizenService.svc/vote/VIRGINIA-11th/atom">http://netizen.cloudapp.net/NetizenService.svc/vote/VIRGINIA-11th/atom</a></p>
<p>To view the Facebook page for the Bill H.R.4853 and Virginia 8th District, use this address: </p>
<p><a href="http://netizen.cloudapp.net/H.R.359/VIRGINIA-8TH/">http://netizen.cloudapp.net/H.R.359/VIRGINIA-8TH/</a></p>
<p>&#160;</p>
<p>Screenshot #1 – Select state</p>
<p><b></b></p>
<p><a href="http://vlele.files.wordpress.com/2011/01/clip_image003.gif"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="clip_image003" border="0" alt="clip_image003" src="http://vlele.files.wordpress.com/2011/01/clip_image003_thumb.gif?w=148&#038;h=244" width="148" height="244" /></a></p>
<p><u>Screenshot #2 – Select Representative</u></p>
<p><a href="http://vlele.files.wordpress.com/2011/01/clip_image005.gif"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="clip_image005" border="0" alt="clip_image005" src="http://vlele.files.wordpress.com/2011/01/clip_image005_thumb.gif?w=148&#038;h=244" width="148" height="244" /></a></p>
<p><u>Screenshot #3 – “Flick through” the most recent roll call votes</u><u></u></p>
<p><a href="http://vlele.files.wordpress.com/2011/01/clip_image007.gif"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="clip_image007" border="0" alt="clip_image007" src="http://vlele.files.wordpress.com/2011/01/clip_image007_thumb.gif?w=148&#038;h=244" width="148" height="244" /></a></p>
<p><u>Screenshot #4 –&#160; “<b>Virtual ballot</b>” – Dynamically generated Facebook page,</u><u></u></p>
<p><a href="http://vlele.files.wordpress.com/2011/01/clip_image009.gif"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="clip_image009" border="0" alt="clip_image009" src="http://vlele.files.wordpress.com/2011/01/clip_image009_thumb.gif?w=148&#038;h=244" width="148" height="244" /></a></p>
<h4>Technical Details</h4>
<p>Netizen combines the power of Windows Phone 7 &amp; Windows Azure. Here is how the application works</p>
<h5></h5>
<h5>WP7 App</h5>
<p>Windows Phone 7 app is designed to have a small footprint. As a result, the bulk of the functionality is located inside the Azure hosted service. Here are some of key highlights:</p>
<p>1) The main screen (display of votes) is based on Pivot Control. Pivot Control provides a quick way to manage views. Each view (PivotItem) displays the details associated with a vote. Pivot control makes it really convenient for switching between different vote views. The Pivot control employs lazy loading to conserve resources. In addition, in order to limit the resources used, we only display the ten most recent votes. </p>
<p>2) Some addition performance related items include:</p>
<p>· Invoking garbage collection explicitly after the rebinding the pivot control. </p>
<p>· Storing the state in the isolated storage in order to make application resumption quicker.</p>
<p>· Doing all the data transformation on the server, again in order to reduce the processing foot-print on WP7. </p>
<p>· Keeping a close watch on the overall size of the XAP file – the current version is under 150K.</p>
<p>The following link provides great performance related tips:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ff967560(v=VS.92).aspx">http://msdn.microsoft.com/en-us/library/ff967560(v=VS.92).aspx</a></p>
<p>3) Since it is important to support a disconnected mode of operation, we always store the most recent data obtained from the Azure service into isolated storage. Another possibility is use of Sync Framework 4.0. </p>
<p>4) We experimented with embedding the browser control for web-based logins. It is possible for the web page to callback into the Silverlight code.</p>
<p>5) All the Netizen Azure service methods are based on REST. This made it quite easy to use the <i>WebClient</i> class to access them. A better alternative would have been the use reactive extensions as it would have made the code a bit cleaner. </p>
<p>6) One gotcha that we ran into was based on our decision to use <i>SyndicationFeed</i> as the data format. This was based on our desire to allow users to access the voting records     <br />via their favorite feed readers (in addition to the WP7 app). In order to process the returned <i>SyndicationFeed</i> type, we had to explicitly add a reference to System.ServiceModel.Syndication. Here is the relevant code:</p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#039;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> XmlReader reader = XmlReader.Create(<span style="color:#0000ff;">new</span> StringReader(xmlContent));</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span> SyndicationFeed sFeed = SyndicationFeed.Load(reader);</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span>                    var entries = from en <span style="color:#0000ff;">in</span> sFeed.Items.Take(MaxNumberOfItemsPerFeed)</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span>                                  select en;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span>                    <span style="color:#0000ff;">foreach</span> (var en <span style="color:#0000ff;">in</span> entries)</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span>                    {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span>                        var x = en;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span>                        SyndicationContent sc = x.Content;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span>                        XmlSyndicationContent xsc;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span>                       <span style="color:#0000ff;">if</span> (x.Content.Type == <span style="color:#006080;">&quot;text/xml&quot;</span> || x.Content.Type == <span style="color:#006080;">&quot;xml&quot;</span>)</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span>                       {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span>                           xsc = (XmlSyndicationContent)x.Content;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span>                           VoteDetails vds = xsc.ReadContent&lt;VoteDetails&gt;();</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span>                           Votes.Add(vds);</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span>                       }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span>                 }</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p>Where the class VoteDetails is defined as shown below:</p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#039;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> [DataContract(Namespace = <span style="color:#006080;">&quot;http://schemas.datacontract.org/2004/07/Netizen.Service.Entities&quot;</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span>         <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> VoteDetails</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> BillID { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Date { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Democratic_AYEs { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Democratic_NAYs { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Description { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Question { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17">  17:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Republican_AYEs { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum18">  18:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum19">  19:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Republican_NAYs { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum20">  20:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum21">  21:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Result { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum22">  22:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum23">  23:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Roll { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum24">  24:</span>             [DataMember]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum25">  25:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Vote { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum26">  26:</span>         }</pre>
<p><!--CRLF--></div>
</div>
<h4>Azure Service </h4>
<p>As stated earlier, the bulk of processing resides within the Azure based service.</p>
<p>This includes the following:</p>
<p>· A WCF/ REST service hosted on Windows Azure (x-small instance) that exposes the voting record as an RSS/ATOM feed. Here is what the WCF contract looks like. </p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#039;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">namespace</span> Netizen.Contract</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span>     [ServiceContract]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span>     [ServiceKnownType(<span style="color:#0000ff;">typeof</span>(Atom10FeedFormatter))]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span>     [ServiceKnownType(<span style="color:#0000ff;">typeof</span>(Rss20FeedFormatter))]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">interface</span> INetizenService</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span>         [OperationContract]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span>         [WebGet(UriTemplate = <span style="color:#006080;">&quot;rep/{zip}-{zipFour}&quot;</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span>         <span style="color:#0000ff;">string</span> GetRepresentative(<span style="color:#0000ff;">string</span> zip, <span style="color:#0000ff;">string</span> zipFour);</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span>         [OperationContract]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span>         [WebGet(UriTemplate = <span style="color:#006080;">&quot;reps/{state}/{feedType}&quot;</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span>         SyndicationFeedFormatter GetRepresentatives(<span style="color:#0000ff;">string</span> state, </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span> ng feedType);</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17">  17:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum18">  18:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum19">  19:</span>         [OperationContract]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum20">  20:</span>         [WebGet(UriTemplate = <span style="color:#006080;">&quot;vote/{repID}/{feedType}&quot;</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum21">  21:</span>         SyndicationFeedFormatter GetVotes(<span style="color:#0000ff;">string</span> repID, <span style="color:#0000ff;">string</span> feedType);</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum22">  22:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum23">  23:</span>         [OperationContract]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum24">  24:</span>         [WebInvoke(UriTemplate =</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum25">  25:</span> bscribe/{state}/{district}/{notificationUri}&quot;)]</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum26">  26:</span>         <span style="color:#0000ff;">void</span> SetSubscription(<span style="color:#0000ff;">string</span> state, <span style="color:#0000ff;">string</span> district, </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum27">  27:</span> ng notificationUri);</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum28">  28:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum29">  29:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum30">  30:</span> }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum31">  31:</span>&#160; </pre>
<p><!--CRLF--></div>
</div>
<p>All the data is stored<a name="_GoBack"></a> in Azure tables. A batch program is used to obtain the congressional voting record from Office of the Clerk of the U.S. House of Representatives and stored in Azure Tables. Data is appropriately transformed to make sure that Azure Table queries are efficient. </p>
<p>· Since the batch job runs once a day, it did not make sense to have dedicated worker role just loading data. Instead, we rely on a concept of “<a href="http://channel9.msdn.com/Shows/Cloud+Cover/Cloud-Cover-Episode-25-Dynamic-Workers">dynamic worker</a>” within the web role job. We launch a console based data loader executable using the concept of <a href="http://msdn.microsoft.com/en-us/library/gg456327.aspx">startup tasks</a>. </p>
<p>2. A MVC2 based web application hosted on Windows Azure (co-located within the same worker) Is used to dynamically generate Open Graph API&#160; pages (that are deemed as Facebook Pages).</p>
<p><a href="http://netizen.cloudapp.net/H.R.359/VIRGINIA-8TH/">http://netizen.cloudapp.net/H.R.359/VIRGINIA-8TH/</a></p>
<hr align="left" size="1" width="33%" />
<p><a href="/Users/vishwas.lele/AppData/Local/Microsoft/Windows/Temporary Internet Files/Content.Outlook/EW5W2V8Y/#_ftnref1_2172" name="_ftn1_2172">[1]</a> A page hosted on our site that includes Open Graph tags, making it equivalent to a <a href="http://www.facebook.com/advertising/?pages">Facebook Page</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=230&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2011/01/29/introducing-netizen-a-windows-azure-windows-phone-7-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/01/clip_image001_thumb.gif" medium="image">
			<media:title type="html">clip_image001</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/01/clip_image003_thumb.gif" medium="image">
			<media:title type="html">clip_image003</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/01/clip_image005_thumb.gif" medium="image">
			<media:title type="html">clip_image005</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/01/clip_image007_thumb.gif" medium="image">
			<media:title type="html">clip_image007</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2011/01/clip_image009_thumb.gif" medium="image">
			<media:title type="html">clip_image009</media:title>
		</media:content>
	</item>
		<item>
		<title>Platform as a Service &#8211; When it comes to the cloud, PaaS is the point</title>
		<link>http://vlele.wordpress.com/2010/12/07/platform-as-a-service-when-it-comes-to-the-cloud-paas-is-the-point-2/</link>
		<comments>http://vlele.wordpress.com/2010/12/07/platform-as-a-service-when-it-comes-to-the-cloud-paas-is-the-point-2/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 22:12:30 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/2010/12/07/platform-as-a-service-when-it-comes-to-the-cloud-paas-is-the-point-2/</guid>
		<description><![CDATA[&#160; Today there is a lot of talk about the different cloud-based services including Infrastructure as a Service (IaaS), Software as a Service(SaaS), Platform as a Service (PaaS)and so on. While each of the aforementioned services has its unique place, in my opinion Platform as a Service (PaaS) stands out in this mix. This is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=219&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p><font size="2">Today there is a lot of talk about the different cloud-based services including Infrastructure as a Service (IaaS), Software as a Service(SaaS), Platform as a Service (PaaS)and so on. While each of the aforementioned services has its unique place, in my opinion Platform as a Service (PaaS) stands out in this mix. This is not to suggest that PaaS is somehow better than, say IaaS. This would be an improper comparison. In fact, as shown in the diagram below, PaaS builds on the capabilities offered by IaaS. </font></p>
<p><font size="2"></font></p>
<p><a href="http://vlele.files.wordpress.com/2010/12/diagram-1.png"><font size="2"><img style="display:inline;margin:5px;" title="Diagram 1" alt="Diagram 1" src="http://vlele.files.wordpress.com/2010/12/diagram-1_thumb.png?w=460&#038;h=144" width="460" height="144" /></font></a></p>
<p><font size="2">So here is my point: If you are a developer, IT shop or an ISV responsible for building, deploying and maintaining solutions, leveraging PaaS is where you reap the maximum benefits cloud computing has to offer. PaaS providers offer a comprehensive application development, runtime and hosting environment for cloud enabled applications.&#160; PaaS simplifies the IT aspects of creating software-as-a-service applications by offering a low cost of entry, easier maintenance,&#160; scalability and fault tolerance, enabling companies to focus on their business expertise. This is why, PaaS is seen as a game-changer in the IT world fueling innovation from the larger players including Microsoft (Windows Azure Platform), Google (Google App Engine), SalesForce (Force.com), as well as the smaller players such as </font><a href="http://www.bungeeconnect.com/"><font size="2">Bungee Labs</font></a><font size="2"> and </font><a href="http://heroku.com/"><font size="2">Heroku</font></a><font size="2"> .&#160;&#160; </font></p>
<p><font size="2">APPIRIO recently conducted a State of the Public Cloud </font><a href="http://thecloud.appirio.com/rs/appirio/images/State_of_the_Public_Cloud_Results_FINAL-102910.pdf"><font size="2">survey</font></a><font size="2">. What was interesting about this survey is that it focused on companies (150+ mid-to-large companies in North America) who have already adopted at least one cloud application. . The survey found that <b>68% </b>of these respondents planned to have a majority of their <u>applications</u> in the <u>public cloud</u> in three years. There are two concepts to note here in the key survey finding &#8211; <i><u>applications</u></i> and <i><u>public cloud</u></i> . Let us look at each one of these concepts and how they related to PaaS:</font></p>
<p><font size="2">· Public Cloud &#8211; As we will see shortly, in order to provide economies of scale and elasticity of resources at a price that is attractive to small and medium businesses, PaaS providers need to maintain a massive infrastructure. The cost of setting up and maintaining such an infrastructure can only be justified if there are a large number of tenants. So it is no coincidence that almost all the major PaaS providers (including Windows Azure Platform) are based on the public cloud.</font></p>
<p><font size="2">· Applications – The survey respondents also indicated that they are looking to move their <i>applications </i>to the cloud. This is different from taking their existing on-premise servers and moving them to a public (IaaS) or a private cloud. Doing so would not allow parts of the application to take advantage of elastic resources available in the cloud. Moving the server to IaaS platform has benefits in the form of availability of elastic virtualization. However, the benefits are limited because the various parts of the application (UI tier, business tier, etc.) cannot be individually scaled. This is why it is better to migrate the application to the cloud. In order to facilitate this migration, PaaS platforms offer application building blocks that are symmetrical to the ones available on-premise. In other words, when building cloud applications, developers can still use the same development tools and programming constructs as the ones they use when building on-premise applications. </font></p>
<p><font size="2">The diagram below illustrates this concept in the context of a traditional four tier ASP.NET based web application. This application is deployed as a single virtual machine image within the on-premise data center. Moving this image to IaaS is certainly useful. It opens up the possibility to take advantage of shared pool of infrastructure resources. However, it is the PaaS platform (Windows Azure Platform in this instance) that allows each tier to scale independently. And it is not just about the elasticity in scaling (perhaps your application does not have an immediate need for it). But by mapping parts of your application to a set of pre-built application services (such as AppFabric Caching, AppFabric storage etc.) can improve fault tolerance and lower maintenance costs. </font></p>
<p><a href="http://vlele.files.wordpress.com/2010/12/diagram-2.png"><font size="2"><img style="display:inline;margin:5px;" title="Diagram 2" alt="Diagram 2" src="http://vlele.files.wordpress.com/2010/12/diagram-2_thumb.png?w=476&#038;h=323" width="476" height="323" /></font></a></p>
<p><font size="2">As you can see PaaS providers are well-suited to support the two aforementioned concepts <i>(public cloud</i> and <i>applications</i>). This is why PaaS is increasingly seen as such an important development going forward. </font></p>
<p><font size="2">Let us take a deeper look at the benefits of PaaS with the aid of some concrete examples. Since I have hands-on experience with the Windows Azure Platform, I will reference its features to make the case for PaaS. </font></p>
<h4><font size="2">Server VM, Network, Storage</font></h4>
<p><font size="2">Even though organizations are benefiting from the advances in virtualization technology (live migration, virtualization assist processors, etc ), the overall management experience is not as seamless as they would like. These organizations have to continue to worry about creating and maintaining virtual machine images, and configuring the necessary storage and network before they can get to building and deploying their applications. </font></p>
<p><font size="2">By utilizing PaaS, virtual machines, storage and the network are pre-configured by the provider. Furthermore, the PaaS providers monitor the virtual machines for failures and initiate auto-recovery when needed.</font></p>
<p><font size="2">As far as the resources such as storage, compute and the network are concerned, PaaS-based applications can simply acquire them as needed and pay only for what they use,</font></p>
<p><font size="2">It is helpful to see the series of steps that Windows Azure platform undertakes in order to meet the needs of an application:</font></p>
<p><font size="2">· First, the application developer uploads the code (binaries) and resource requirements (# of web and middle-tier nodes, HW, memory, fire wall settings etc.);</font></p>
<p><font size="2">· Based on the resource requirements, compute and network resources are then allocated appropriately. Please refer to diagram below. Windows Azure will attempt to allocate the requested number of web-tier nodes based on the resources that are available. Furthermore, it will try to place the nodes across the different racks to improve the fault tolerance. </font></p>
<p><font size="2">· Then, Windows Azure creates appropriate virtual machine images by placing application specific code on top of base images and starts the virtual machines;</font></p>
<p><font size="2">· It then assigns dynamic IP (DIP) addresses to the machines;</font></p>
<p><font size="2">· Virtual IP addresses are allocated and mapped to DIPs; finally,</font></p>
<p><font size="2">· It sets up the load balancer to route incoming client traffic appropriately.</font></p>
<p><font size="2"></font></p>
<p> <a href="http://vlele.files.wordpress.com/2010/12/image.png"><font size="2"><img style="display:inline;margin:5px;" title="image" alt="image" src="http://vlele.files.wordpress.com/2010/12/image_thumb.png?w=439&#038;h=331" width="439" height="331" /></font></a>
<p><i><font size="2">The above diagram depicts a snapshot in time of available resources within a Windows Azure datacenter. Little blue boxes denote slots that are available. Windows Azure uses this information to dynamically allocate resources. </font></i></p>
<p><font size="2">As you can see from the above steps, Windows Azure intelligently pulls together resources to create a custom setup that meets application-specific needs (applications can operate under the impression that there is a limitless supply of resources). Note also that all through the steps above, application developers were not expected to setup the OS, log into the machines directly or worry about IP addresses, routers and storage. Instead, the application developers are free to focus on implementing the business logic. </font></p>
<h4><font size="2">Patch, Service Release, New Version</font></h4>
<p><font size="2">Whether they are utilizing virtualization or not, organizations have to deal with changes in the form of patches, OS upgrades, etc. This is commonly the case even if the servers are placed with a “hoster”. As we saw earlier, PaaS providers are responsible for providing the OS image. Since they are the ones providing the OS image in the first place, they are also responsible for keeping them up-to date.</font></p>
<p><font size="2">It is helpful to see how the Windows Azure platform performs OS upgrades:</font></p>
<p><font size="2">· Windows Azure team applies patches once each month.</font></p>
<p><font size="2">· In order to ensure that upgrades are performed without violating the SLA, Windows organizes the nodes that make up an application into virtual groupings called upgrade domains. Windows Azure upgrades one domain at a time &#8211; stopping all the nodes, applying the necessary patches and starting them back up. </font></p>
<p><font size="2">· By stopping only the nodes running within the current upgrade domain, Windows Azure ensures that an upgrade takes place with the least possible impact to the running service.</font></p>
<p><font size="2">· The underlying virtual machine image is not changed in this process thereby preserving any cached data.</font></p>
<p><font size="2">As a case in point, consider the recent publicly disclosed </font><a href="http://www.microsoft.com/technet/security/bulletin/MS10-070.mspx"><font size="2">vulnerability in ASP.NET</font></a><font size="2">. ASP.NET-based applications hosted on Windows Azure had the vulnerability patched for them when the Guest OS was automatically upgraded from version </font><a href="http://msdn.microsoft.com/en-us/library/gg248099.aspx"><font size="2">1.6 to version 1.7</font></a><font size="2">.</font></p>
<p><font size="2">Windows Azure platform recently introduced the notion of Virtual Machine (VM) role. As part of using the VM Role, users are allowed to bring their own custom virtual machine image to the cloud, instead of using an image provided by Windows Azure. This is a powerful capability that allows users to control how the virtual machine image is setup. In many ways this is akin to capability offered by IaaS platforms. But with great power comes great responsibility. Customers using the VM mode are expected to setup and maintain the OS themselves. Windows Azure does not automatically understand the health of applications running in a custom VM image. </font></p>
<h4><font size="2">No Assembly Required</font></h4>
<p><font size="2">Distributed applications by their very nature have a lot of moving parts and consequently a lot of steps are required to assemble the various components. For instance, assembly steps include installing and configuring caching components, access control components, database-tier components and so on. </font></p>
<p><font size="2">PaaS greatly simplifies the assembly by providing many of these application components as ready-made services. </font></p>
<p><font size="2">It is helpful to consider a few examples of application building block services offered by the Windows Azure platform:</font></p>
<p><font size="2"><u>Azure App Fabric Caching</u> – This is a distributed in-memory cache for applications running in Windows Azure. Application developers do not need to bother with configuration, deployment or management of their cache. Applications simply provision the cache based on their needs (with the ability to dynamically adjust capacity), and only pay for what they use. </font></p>
<p><font size="2"><u>AppFabric Access Control Service</u> &#8211; This service simplifies access control for applications hosted in Windows Azure. Instead of having to handle different access control schemes (OAuth, OpenID etc.), Windows Azure-based application can integrate with AppFabric Access Control. AppFabric Access Control service in turn brokers the integration with various access control schemes thereby greatly simplifying the task of application developers. </font></p>
<p><font size="2"><u>SQL Azure Service</u> – This is a cloud-based relational database service available to applications hosted on Windows Azure. Application developers do not have to install, setup, patch or manage any software. High availability and fault tolerance is built-in and no physical administration is required. </font></p>
<p><font size="2">There are two noteworthy things about the examples above. First, each of the aforementioned services has a corresponding on-premise equivalent. This is what makes it possible for developers to migrate their applications to the cloud. Second, even though these services are functionally and semantically equivalent, they exhibit the core characteristics of the cloud, namely elasticity and fault tolerance. To be specific, let us consider the SQL Azure service. SQL Azure supports most the T-SQL functionality available on SQL Server that is running on premise. However, SQL Azure has built-in fault tolerance (it keeps multiple copies of the database in the background) and elasticity (databases can be scaled out seamlessly). Additionally, there is no need to go though the typical setup steps such as installing the product, applying patches andsetting up back-up and recovery. Setting up a SQL Azure database is literally a matter of issuing a “<i>create database</i>” command.</font></p>
<h4><font size="2">Summary</font></h4>
<p><font size="2">In this post, we saw how PaaS providers offer a comprehensive application development, runtime and hosting environment for cloud enabled applications.&#160; This greatly simplifies the IT aspects of creating software-as-a-service applications enabling companies to focus on their business expertise.</font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/219/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=219&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2010/12/07/platform-as-a-service-when-it-comes-to-the-cloud-paas-is-the-point-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/12/diagram-1_thumb.png" medium="image">
			<media:title type="html">Diagram 1</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/12/diagram-2_thumb.png" medium="image">
			<media:title type="html">Diagram 2</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/12/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Application Server and Integration Server: Growing Closer Together</title>
		<link>http://vlele.wordpress.com/2010/09/24/application-server-and-integration-server-growing-closer-together/</link>
		<comments>http://vlele.wordpress.com/2010/09/24/application-server-and-integration-server-growing-closer-together/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 19:25:42 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/2010/09/24/application-server-and-integration-server-growing-closer-together/</guid>
		<description><![CDATA[&#160; This blog post is about the evolution of Microsoft’s application server – a collection of products including IIS and .NET framework libraries such as WCF and WF. Over the last few releases Microsoft has added 1) runtime container and activation service, via WAS; 2) multi-protocol support that goes beyond Http, via IIS 7.0; and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=196&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>This blog post is about the evolution of Microsoft’s application server – a collection of products including IIS and .NET framework libraries such as WCF and WF. Over the last few releases Microsoft has added 1) runtime container and activation service, via WAS; 2) multi-protocol support that goes beyond Http, via IIS 7.0; and 3) manageability extensions and caching, via AppFabric. Some of these enhancements <i>overlap</i> with the capabilities offered by Microsoft’s flagship integration server, BizTalk. BizTalk is well known for its robust hosting and integration capabilities. This <i>overlap</i> has stirred conversation in <a href="http://blogs.msdn.com/b/skaufman/archive/2009/11/23/appfabric-and-biztalk.aspx">blogs</a> and <a href="http://mobile.informationweek.com/10245/show/f069c073765fd4133d0c35d3511300b2&amp;t=6b09a6176ae8bb4f8c89e74bc7fafb90">news stories</a> over the last several months. </p>
<p>My goal in this post is to step back and look into some of the reasons causing application and integration servers to grow closer; we will do a side-by-side comparison of a scenario that is right in the middle of the <i>overlap which</i> I alluded to earlier. Additionally, as pure conjecture on my part, we will take a look at an approach to making them live together closely. </p>
<p><u>Application and Integration Server</u></p>
<p>Application servers are well known for the capabilities that enable hosting of application logic. As you would expect, they offer capabilities such as robust hosting – auto start, load balancing, fault tolerance etc. Integration servers are well known for enabling communication with external systems and, as you would expect, offer support for various message exchange patterns, guaranteed delivery, and family of adapters to connect to desperate systems and so on.</p>
<p><i>Note -as stated earlier, BizTalk is more than a typical integration server. The diagram below is intended to be more generic and depicts typical workloads of application and integration servers.</i><br />
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td></td>
<td width="94"></td>
<td width="35"></td>
<td width="129"></td>
<td width="67"></td>
<td width="129"></td>
</tr>
<tr>
<td></td>
<td valign="top"></td>
</tr>
<tr>
<td></td>
<td><a href="http://vlele.files.wordpress.com/2010/09/image8.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/09/image_thumb8.png?w=440&#038;h=330" width="440" height="330" /></a> </td>
<td valign="top"></td>
<td></td>
<td valign="top"></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td valign="top"></td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>With emphasis on composite applications, application designers are increasingly looking for ways to combine the best of the capabilities offered by application and integration server. For example, they want to deploy a business service (exposed as a SOAP endpoint) and at the same time, expose it as a service endpoint that is consumable as an external system via MSMQ. Conversely, they want to expose integration endpoints that have low latency requirements and don’t necessarily need features such as guaranteed delivery and business activity monitoring. </p>
<p>Another factor that is driving application and integration servers closer is the move towards the cloud. Traditional on-premise based application logic is being refactored to take advantage of cloud based services such as storage, compute and access services. This is also placing a demand for integration capabilities to be added to application servers. </p>
<p>Not surprisingly, Microsoft’s recent announcements suggest that the line between AppFabric and BizTalk is being blurred. For instance, the BizTalk team has stated publicly that they are looking to build the next generation of BizTalk on top of AppFabric &#8211; <a href="http://www.microsoftpdc.com/2009/SVR15">http://www.microsoftpdc.com/2009/SVR15</a>.</p>
<p><u>Current Dilemma </u></p>
<p>If you are architecting an enterprise application today, should you just move all your integration logic to AppFabric? There are a number of reasons why you would be tempted to do this, including 1) AppFabric is part of the OS; 2) most integration is now SOA/ WS based anyways, thus reducing the need for custom adapters; 3) operational setup and maintenance cost of running an AppFabric WebFarm is likely lower than a BizTalk farm; and 4) development of components is more approachable to a .NET developer who does not have prior knowledge of BizTalk. <u>However</u>, if you go down in this direction, be aware that there will be some features that will <u>not</u> be available. To better understand what is available and what is not available, let us use a scenario that is well supported by both – hosting a WCF endpoint. The following table compares the hosting a WCF endpoint in BizTalk and AppFabric.</p>
<p>&#160;</p>
<p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="355">
<p><b>WCF hosted Inside BizTalk</b></p>
</td>
<td valign="top" width="283">
<p><b>WCF hosted inside App Fabric </b></p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Binding flexibility &#8211; support for custom WCF </p>
<p>configuration</p>
<p><b></b></p>
</td>
<td valign="top" width="283">
<p>Binding flexibility &#8211; support for custom WCF configuration</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Load balanced, fault tolerant setup</p>
<p>· Central administration covers all aspects. For example, a change to the WCF binding needs to be applied to a single location (port setting dialog).</p>
</td>
<td valign="top" width="283">
<p>Load balanced, fault tolerant setup</p>
<p>· Central administration for tracking purposes only. A change to a WCF binding needs to be replicated to all nodes using tools such as msdeploy.</p>
<p><a href="http://download.microsoft.com/download/3/1/C/31CED722-2E5F-48D6-96B1-E73AAFD9873F/AppFabricWebFarm.docx">http://download.microsoft.com/download/3/1/C/31CED722-2E5F-48D6-96B1-E73AAFD9873F/AppFabricWebFarm.docx</a></p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Common tracking database</p>
</td>
<td valign="top" width="283">
<p>Common tracking database</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Tooling to review tracked instances</p>
<p>· Tooling is somewhat dated –BAM portal.</p>
</td>
<td valign="top" width="283">
<p>Tooling to review tracked instances</p>
<p>· More modern tooling. </p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Cross – cutting concerns – exception handling, BAM, pre and post processing (formatting etc.) </p>
<p>· Advanced support in the form of suspended message queue, BAM portal.</p>
</td>
<td valign="top" width="283">
<p>Cross – cutting concerns &#8211; exception handling, BAM, pre and post processing </p>
<p>(Formatting etc.) </p>
<p>· Not as advanced as BTS yet.</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Guaranteed delivery</p>
</td>
<td valign="top" width="283">
<p>No guaranteed delivery (except when provided by the transport such as msmq)</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Better suited for async message exchange. Request /Response for low latency scenarios are not easily handled.</p>
</td>
<td valign="top" width="283">
<p>Better support for different message exchange patterns &#8211; Request/Response, Asynchronous.</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Extensibility points for transforming incoming and outgoing messages</p>
<p>· Pipeline components (, EDI, AS2, MIME, etc.)</p>
<p>· Mapper </p>
<p>· Flat File Parser</p>
</td>
<td valign="top" width="283">
<p>Extensibility points for transforming incoming and outgoing messages as defined by WCF </p>
<p>· Custom Channels </p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Business logic is baked into a set of code and configuration components spread across the system</p>
<p>· Custom pipeline component</p>
<p>· Receive and send port definition</p>
<p>· Custom mapper</p>
<p>· Orchestration</p>
<p>This setup allows flexibility in handling changes. For example, a new message decoder can be added for incoming messages, by simply adding a custom decoder step in the receive pipeline. </p>
</td>
<td valign="top" width="283">
<p>Business logic is encapsulated into the body of method (of course, factored appropriately into a class libraries etc.). </p>
<p>This setup is makes it easy to single step through the code. But this also means that every aspect of the logic manifests itself as code. In essence, you need to roll out a new version of binary to make a change.</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Large message handling</p>
<p>· Every message in BizTalk by default is routed via the message box. This makes it a challenge to handle large messages. However, there are well known workarounds for this. One of them is described in detail by Paolo </p>
<p><b><a href="http://blogs.msdn.com/b/paolos/archive/2010/05/25/large-message-transfer-with-wcf-adapters-part-1.aspx">http://blogs.msdn.com/b/paolos/archive/2010/05/25/large-message-transfer-with-wcf-adapters-part-1.aspx</a></b>. </p>
</td>
<td valign="top" width="283">
<p>Large message handling</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Type safety</p>
<p>· WCF adapters use un<b>-</b>typed contracts for receiving messages. This allows it to receive any type of message.<b></b></p>
</td>
<td valign="top" width="283">
<p>Type safety</p>
<p>· Contracts can be typed and un-typed</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>No built-in caching</p>
</td>
<td valign="top" width="283">
<p>Caching</p>
</td>
</tr>
<tr>
<td valign="top" width="355">
<p>Secure Storage Service(SSS) to secure store credentials</p>
</td>
<td valign="top" width="283">
<p>No equivalent capability</p>
</td>
</tr>
</tbody>
</table>
<p><u></u></p>
<p><u>What can we expect next?</u></p>
<p>The latest release of BizTalk 2010 is already bridging the gap between the two products. For instance, AppFabric connect feature of BizTalk 2010 offers ways to leverage BizTalk capabilities inside AppFabric hosted programs. Specifically:</p>
<p>1) Ability to leverage the BizTalk mapping capability inside a WF program using the Mapper activity.</p>
<p>2) Ability to generate WF activities that invoke operations on WCF LOB adapters provided by BizTalk. </p>
<p>For more information see &#8211; <a href="http://blogs.msdn.com/b/biztalk_server_team_blog/archive/2010/06/09/biztalk-appfabric-an-introduction.aspx">http://blogs.msdn.com/b/biztalk_server_team_blog/archive/2010/06/09/biztalk-appfabric-an-introduction.aspx</a></p>
<p>I expect this trend to continue, in fact, I envision that a future version of App Fabric would look something like the diagram below (again, this is pure conjecture on my part). As you can see, the BizTalk provided capabilities will be moved into AppFabric (shown in red). This will allow WCF endpoints to take advantage of guaranteed delivery, as well as, the configuration flexibility offered by BizTalk ports (pipeline components, mapper etc.).</p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2010/09/image9.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/09/image_thumb9.png?w=637&#038;h=480" width="637" height="480" /></a> </p>
<h3></h3>
<p>&#160;</p>
<p>&#160;</p>
<h3><u>Call to Action</u></h3>
<p>It is clear that AppFabric and BizTalk are moving closer together. In future, we can expect to have access to capabilities offered by both, rather than choosing between them. </p>
<p>Messaging, with its defining characteristics including adapters, reliable communication and mediation, is generally accepted as the preferred way to connect disparate systems (look no further than Gregor Hohpe’s seminal book on Enterprise Integration Patterns for more on messaging). As we have seen in this post, BizTalk has built-in support for messaging. This is why it is recommended that BizTalk be considered for most integration scenarios </p>
<p>AppFabric should be considered for hosting most of the application logic. Microsoft is making strategic investment in AppFabric to not only to bring advanced management and robust hosting capabilities but also as a way to seamlessly enable application migration between on-premise and the cloud based deployments (commonly referred to as Server / Service symmetry). </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=196&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2010/09/24/application-server-and-integration-server-growing-closer-together/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/09/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/09/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint as a services platform</title>
		<link>http://vlele.wordpress.com/2010/09/08/sharepoint-as-a-services-platform/</link>
		<comments>http://vlele.wordpress.com/2010/09/08/sharepoint-as-a-services-platform/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 20:35:00 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint 2010 Services SAF SOA]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/?p=173</guid>
		<description><![CDATA[Introduction Over the last two years, SharePoint has increasingly been established as an enterprise platform&#160; in organizations worldwide. Now, with the advent of SharePoint 2010, organizations have the ability to develop, host and manage custom services (as in SOA services) within SharePoint. This new capability in SharePoint 2010 is&#160; part of Service Application Framework (SAF) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=173&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>Over the last two years, SharePoint has increasingly been established as an enterprise platform&#160; in organizations worldwide. Now, with the advent of SharePoint 2010, organizations have the ability to develop, host and manage custom services (as in SOA services) within SharePoint.</p>
<p>This new capability in SharePoint 2010 is&#160; part of Service Application Framework (SAF) .&#160; SAF&#160; allows out of the box services ( such as search and managed metadata), as well as, custom developed services to be hosted on the SharePoint infrastructure. In this post, we will take a deeper look at SAF, explore the benefits it offers and discuss examples of services that can take advantage SAF. </p>
<p><em>Note – While SAF is new in SharePoint 2010, the Excel Services capability in MOSS is similar in concept. Excel Services introduced the notion of moving the processing out to a different application pool ( possibly to different machine altogether )</em></p>
<p><strong>Services&#160; Platform</strong></p>
<p>SOA done right can bring a number of benefits to an organization including software reuse, better alignment with business processes and lower cost and&#160; agile development cycles. However, achieving these benefits requires building on top of a platform that provides a number of capabilities including: </p>
<p>1) Governance and Registry – Capability to catalog and publish access to the available services. </p>
<p>2) Load Balancing and High Availability – Capability to make the services fault tolerant and resilient to varying loads. </p>
<p>3) Administration -&#160; Capability to centrally manage services including configuration, security, leverage backup and restore functionality.</p>
<p>4) Security – Capability to secure services and set the security context.</p>
<p>5) Tooling&#160; &#8211; Capability to author business logic by orchestrating different services through mashups and workflows.</p>
<p>For more information on&#160; SOA terms and concepts please refer&#160; to OASIS Reference Model for Service Oriented&#160; Architecture at&#160; <a title="http://docs.oasis-open.org/soa-rm/v1.0/ " href="http://docs.oasisopen.org/soa-rm/v1.0/">http://docs.oasisopen.org/soa-rm/v1.0/ </a></p>
<p>&#160;</p>
<p><strong>Services Application Framework (SAF)</strong></p>
<p>As stated earlier, the latest version of SharePoint introduces the notion of Service Application Framework (SAF). SAF allows creation of custom services that can be hosted within SharePoint. These services can then be consumed by applications within&#160; SharePoint. In fact, SAF forms the basis for all the core SharePoint services including Search, Managed Metadata and Excel Services. </p>
<p>Let us take a detailed look at SAF Object Model.</p>
<p>The diagram below depicts the overall SAF object model. <em>SPFarm</em> and <em>SPServer</em> classes have been available in the previous versions as well &#8211; SPFarm represents a SharePoint server farm while <em>SPServer</em> represents a server within the farm. SAF adds a few new classes to the mix. <em>SPService</em> represents a service (such as the Search service ) that is registered within a SharePoint farm. <em>SPServiceInstance</em> represents an instance of the service installed on an application server ( think of a service that is installed on more than one application server within the SharePoint farm). <em>SPServiceApplication</em> and <em>SPServiceApplicationProxy</em> represent logical endpoints (logical because they abstract the notion of multiple services instances from the consumers of the service). The fact that service is broken into distinct <em>Application</em> and <em>ApplicationProxy</em> classes, is a key concept that allows&#160; services to take advantage of a flexible deployment , auto load-balancing and fault-tolerance. </p>
<p><a href="http://vlele.files.wordpress.com/2010/09/image.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/09/image_thumb.png?w=400&#038;h=215" width="400" height="215" /></a> </p>
<p>Now that we have seen the key classes in the SAF object model we are ready to look into the various pieces required for creating a custom service.&#160; The diagram below depicts the different pieces involved.&#160; </p>
<p><a href="http://vlele.files.wordpress.com/2010/09/image1.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" border="0" alt="image" align="left" src="http://vlele.files.wordpress.com/2010/09/image_thumb1.png?w=300&#038;h=355" width="300" height="355" /></a> </p>
<p>Let us start from the bottom of the stack and look at the SQL Server tier.&#160; Services rely on SharePoint configuration database for storing any settings. Additionally, it is possible to provision&#160; a custom database ( separate from the content DB) as a persistence store.&#160; Next is the application server tier. This is where the all the components that make up the service are installed. For instance, executables, Windows services and class libraries etc.&#160; A WCF contract is the easiest way to expose the service endpoint. While SAF does not preclude the use of non-WCF stacks, using WCF offers a number of advantages such as the built-in service context, load balancer etc. Finally, let us look at the Web Front End. As stated earlier, a custom service is typically consumed by SharePoint Web Front End (WFE) such as a WebPart. WFE is where you would typically install the ServiceApplication proxy. The proxy abstracts the fact that a service can be installed on multiple application servers. Service consumers invoke the service via the proxy. The proxy, in turn,&#160; figures out which application server to go to, by leveraging the built-in load balancer. </p>
<p>More concretely, implementing a custom service involves following high level steps:</p>
<p>1) Define the WCF endpoint (address, contract and binding) where the custom service will be hosted within the SharePoint farm. </p>
<p>2) Implement&#160; the business logic and package them in the form of class libraries, executables, windows services. </p>
<p>3) Implement the SAF classes</p>
<blockquote><p>Let us assume that we are building a service called Custom Service. Let us further assume that this service utilizes the WCF as its&#160; communication stack and is hosted in IIS (note again that we are not required to use WCF/IIS)</p>
<p>Building Custom Service will require that we implement the following SAF classes:</p>
</blockquote>
<blockquote><p><em>CustomService</em> &#8211; This class inherits from the <em>SPIisWebService</em> and is used to register the service with the farm. As part of inheriting from <em>SPIisWebService</em> we are required to provide installation steps, links to ASPX pages that are surfaced within the SharePoint central administration. </p>
<p><em>CustomServiceInstance</em>- This class inherits from the <em>SPIisWebServiceInstance</em> <em>and is used to register the service with an application server.</em></p>
<p><em>CustomServiceApplication- This class inherits from the SPIisWebServiceApplication</em> and is used to register a logical endpoint. This class also encapsulated all the configuration settings associated with a service. For instance,&#160;&#160; as part of inheriting from <em>SPIisWebServiceApplication</em> , we are required to implement a properties such as VirtualPath that tells SharePoint the URI of the service endpoint. </p>
<p><em>CustomServiceApplicationProxy- This class inherits from the </em>SPIisWebServiceApplicationProxy and represents a connection to CustomServiceApplication. </p>
</blockquote>
<p>4) Determine if a custom persistence store is required or not. If a custom persistence store is needed, we can have it&#160; created as part of&#160; the service application provisioning step and include it in backup and restore operation.</p>
<p>For more information on steps involved in building a custom service, including sample code, please refer DTaylor’s excellent SAF blog at <a title="http://blogs.msdn.com/b/dtaylor/" href="http://blogs.msdn.com/b/dtaylor/">http://blogs.msdn.com/b/dtaylor/</a></p>
<p><strong>SharePoint as a Services&#160; Platform</strong></p>
<p>Now, armed with an understanding of&#160; SAF, we are ready to look at how SAF enables SharePoint to be leveraged as a services platform. </p>
<p>&#160;</p>
<p>1) <u>Administration</u> &#8211; Once the service has been registered with the farm, it can be managed via the SharePoint Central Administration. The following diagram depicts the central administration screen to add a new service&#160; and manage an existing service. </p>
<p><a href="http://vlele.files.wordpress.com/2010/09/image6.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/09/image_thumb6.png?w=356&#038;h=224" width="356" height="224" /></a> </p>
<p>2) <u>Governance and Registry</u> – SharePoint provides a topology service that allows SharePoint administrators to discover published services available within a farm. Typically, it is used by administrators to connect to services from remote farms. The following diagram depicts the UI for publishing an existing service via the topology service. </p>
<p><a href="http://vlele.files.wordpress.com/2010/09/image7.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/09/image_thumb7.png?w=322&#038;h=258" width="322" height="258" /></a> </p>
<p>&#160;</p>
<p>3) <u>Load Balancing and High Availability</u> – SAF allows multiple service deployment topologies to meet high load and availability requirements. The following diagrams depicts two different topologies. </p>
<p><a href="http://vlele.files.wordpress.com/2010/09/image4.png"><img style="border-bottom:0;border-left:0;display:inline;margin-left:0;border-top:0;margin-right:0;border-right:0;" title="image" border="0" alt="image" align="left" src="http://vlele.files.wordpress.com/2010/09/image_thumb4.png?w=240&#038;h=137" width="240" height="137" /></a>&#160; </p>
<p>This setup relies on a dedicated services farm (Farm 2)topology. Farm1 and Farm 3 subscribe to service offered by Farm 2.&#160; </p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2010/09/image5.png"><img style="border-bottom:0;border-left:0;display:inline;margin-left:0;border-top:0;margin-right:0;border-right:0;" title="image" border="0" alt="image" align="left" src="http://vlele.files.wordpress.com/2010/09/image_thumb5.png?w=115&#038;h=137" width="115" height="137" /></a></p>
<p>&#160;</p>
<p>This setup depicts a single farm configuration. For load balancing purposes, the custom service is installed on three out of the four application servers in the farm. The service proxy is installed on both the WFEs.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>4) <u>Security</u> – SharePoint supports claims-based authentication using Windows Identity Foundation (WIF). Custom services can take advantage of this capability to delegate user permissions to services. In other words, custom services can make authorization decisions based on delegated identity of the user involved( even if the communication is over multiple hops – across farms, for instance)&#160; </p>
<p>5) <u>Tooling</u> – Tools such as SharePoint Designer,&#160; Visio and third party tools such as Nyntex make it easy to create mashups by utilizing&#160; OOB and custom services.</p>
<p><strong>Custom Service Scenarios</strong></p>
<p>Let us look at a couple of scenarios where developing custom services would be beneficial. </p>
<p><strong>Integrate external applications into SharePoint</strong></p>
<p>In this scenario, a customer has an existing proprietary .NET based task tracking application that they would like to&#160; integrate into their SharePoint farm. In doing so, they are seeking to leverage the collaboration, maintenance and provisioning capabilities offered by SharePoint. </p>
<p>Using SAF they could package the backend code as a ServiceApplication that can be installed on one or more application servers. In addition, they would need to develop an application proxy that will be installed on WFEs. </p>
<p>The benefit of packaging the task tracking system as a custom SharePoint service is that the users can seamlessly use it in conjunction with other SharePoint capabilities such as authentication. In addition, the task tracking system is now managed within the unified governance model for the SharePoint farm and can thereby leverage its fault tolerance, backup and restore capabilities. </p>
<p><strong></strong></p>
<p><strong>Externalize compute intensive processing </strong></p>
<p> In this scenario, a customer requires elastic computing capability to handle high volumes of calculation requests. Rather than perform these calculations within the SharePoint infrastructure ( by adding application servers), it may make sense to take advantage of a cloud platform such as Windows Azure. </p>
<p>Using SAF, they could develop just the ServiceApplicationProxy that&#160; simply forwards the incoming requests to Windows Azure. Note that ServiceApplication is not needed since the backend computation is happening within Windows Azure. </p>
<p>The benefit of abstracting the invocation of Windows Azure hosted calculations, as custom service is that customers can now seamlessly access it, not unlike how they would access the out of the box services such as search. So, for instance, consumers&#160; can continue to use claims based scheme to invoke the service. Another benefit of this approach is that the configuration information, such as Windows Azure project details, can be maintained in the SharePoint configuration database.&#160;&#160; </p>
<p><strong>Summary </strong></p>
<p>In this post, we have seen how SharePoint Service Framework (SAF) enables custom services to be developed, hosted and managed within SharePoint 2010. By taking advantage of this capability, organizations can develop new functionality and expose&#160; existing software assets, as services that are managed within the SharePoint infrastructure. It is also expected that&#160; ISVs will take advantage of this capability to expose their offerings as services within SharePoint. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=173&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2010/09/08/sharepoint-as-a-services-platform/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/09/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/09/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/09/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/09/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/09/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/09/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Public, Private, Hybrid or On-Premise &#8211; which cloud model is right for you?</title>
		<link>http://vlele.wordpress.com/2010/05/31/public-private-hybrid-or-on-premise-which-cloud-model-is-right-for-you/</link>
		<comments>http://vlele.wordpress.com/2010/05/31/public-private-hybrid-or-on-premise-which-cloud-model-is-right-for-you/#comments</comments>
		<pubDate>Mon, 31 May 2010 16:30:58 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/?p=167</guid>
		<description><![CDATA[you are about to embark on a distributed application development project and are wondering how you can leverage the Windows Azure Platform. Should&#160; you invest in private cloud, move your application to the public cloud, choose a hydrid approach or keep the application on-premise?&#160;&#160; In this blog post, I will try to briefly describe each [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=167&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><b></b></p>
<p><font size="7">y</font>ou are about to embark on a distributed application development project and are wondering how you can leverage the Windows Azure Platform. Should&#160; you invest in private cloud, move your application to the public cloud, choose a hydrid approach or keep the application on-premise?&#160;&#160; In this blog post, I will try to briefly describe each model and provide some commentary on the impact each of the aforementioned model can have on development and operations.</p>
<p>Before we begin, let us sketch a fairly common&#160; multi-tier application architecture. We will use it through the course of this post.&#160; Along the name of each layer, I have appended, in parenthesis, a few implementation choices. For instance the data layer may be implemented using SQL, Analysis Service, and Master Data Services (MDS).</p>
<p>&#160;</p>
<p><a href="http://vlele.files.wordpress.com/2010/05/image1.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/05/image_thumb1.png?w=369&#038;h=277" width="369" height="277" /></a>&#160; </p>
<p><b><u></u></b></p>
<p><b><u></u></b></p>
<h2>Private Cloud</h2>
<p>The term private cloud has been used to describe two very different models. The first is the ability to run a variant of Windows Azure in a customer’s datacenter. While at least one Microsoft executive has <a href="http://www.zdnet.com/blog/microsoft/private-cloud-just-another-buzzword-for-on-premise-datacenter/2610">hinted</a> at this possibility, it is highly unlikely that we will see this anytime soon. </p>
<p>The second model refers to the techniques like virtualization, automated management, and utility-billing models, within their own data centers. Microsoft has been increasingly talking about toolkits such Dynamic Datacenter Toolkit&#160; that will allow IT managers to implement the aforementioned cloud computing concepts, in their data centers. This is different from running a cloud OS on-premise.&#160; </p>
<p>In addition to the two private cloud models described above, there is also the notion of <em>Virtual Private Cloud</em> wherein a cloud provider will segregate a bunch of machines in its data center and dedicate them for a given customer. While vendors such as Amazon have talked about this option quite a bit, Microsoft has not announced anything significant in this area.</p>
<p><u></u></p>
<h3>Impact on Development and Operations</h3>
<p>1) Development and operational impact will depend on the degree to which an organization commits to building a private cloud. If the private cloud is primarily designed to offer Infrastructure as a Service (IaaS), the impact on development is minimal. In other words, the development effort is not very different from a traditional on-premise development.</p>
<p>2) Setting up a private cloud requires significant investment and careful planning and is therefore only recommended for very large enterprises with special security needs. </p>
<p>&#160;</p>
<h2>Public Cloud </h2>
<p>Public cloud refers to the approach wherein the entire application is hosted on the Windows Azure platform. For our candidate architecture it would mean that all layers of architecture are in the cloud. While this is the most cost effective model, there are a number of limitations associated with it. The ability to install custom software is limited unless one can use xcopy to deploy third-party applications. All of the Azure compute instances&#160; run the same base image (64 bit Windows Server, .NET 3.5 SP1). Microsoft has announced that future versions of the Azure platform will allow customers to create their own base images. Another limitation is the SQL Server functionality that is available as part of SQL Azure. For instance, MDS is not available with SQL Azure today. Additionally, SQL Azure databases are limited to a&#160; maximum size of 50 GB. </p>
<p>&#160;</p>
<h3><a href="http://vlele.files.wordpress.com/2010/05/image2.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/05/image_thumb2.png?w=369&#038;h=277" width="369" height="277" /></a> </h3>
<h3>Impact on Development and Operations</h3>
<p>1) The design should adhere to a patterns including multi-tenancy, statelessness, and ability to dynamically handle the changes to the configuration (adding web front end nodes with increase in load).<u></u> </p>
<p>2) Limits imposed by the Windows Azure Platform must be taken into account. For example, the data layer will need to utilize some sort of sharding&#160; scheme to get around SQL Azure max size limits.</p>
<p>3) Public cloud option offers other significant advantages such as&#160; automated service management, fault detection and notification that can potentially reduce the operational cost.<u></u> </p>
<p>4) Upfront capital expenditure is replaced with ongoing operational expenditure based on the resource used. <u></u></p>
<h2>Hybrid Cloud</h2>
<p>Hybrid cloud refers to a style of cloud computing that combines functionality available in the cloud with the resources based on on-premise. Such an arrangement could be motivated by special security requirement (such as the Payment Card Industry security standards)for data.&#160;&#160; For our proposed architecture, one scenario would be to have the UI and business services layer hosted in the cloud, while the data layer resides on-premise. Technologies such as Azure AppFabric ServiceBus and Project Sydney can be used to bridge the connection between cloud and on-premise datacenter.</p>
<p><a href="http://vlele.files.wordpress.com/2010/05/image3.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/05/image_thumb3.png?w=369&#038;h=277" width="369" height="277" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<h3>Impact on Development and Operations</h3>
<p><u></u></p>
<p>1)The design should adhere to a patterns including multi-tenancy, statelessness, and the ability to&#160; handle changes to the configuration dynamically(i.e., ability to add additional web front ends to handle higher load).<u></u></p>
<p>2) Application design will need to compensate for the latency as a result of the data layer being remote. For instance, a caching layer may need to be introduced. <u></u></p>
<p>3) The operations team will need to plan, review, and setup adequate trust between the Azure and the on-premise data center. <u></u></p>
<p>4) A scalable / robust connected infrastructure between Windows Azure and the on-premise data center needs to be available.<u></u></p>
<p>5) IT will need to evaluate the impact on security, compliance, and availability. <u></u></p>
<p><u></u></p>
<p><u></u></p>
<h2>Cloud Ready Design </h2>
<p><u></u></p>
<p>Perhaps you are not ready for any of the aforementioned cloud options. In this instance, you can consider designing your application in a manner that will allow you to leverage the cloud in the future.&#160; The “server-services&quot; symmetry depicted in the diagram below exemplifies this approach. It illustrates how Microsoft plans to align the building blocks across its server OS (Windows Server 2008 and beyond) with the “Azure OS”. A good example of the overlap between server and services is AppFabric Caching -&#160; According to Gopal Kavivaya[1], the underlying architecture of velocity is based on data fabric technology that powers SQL Azure.</p>
<p><a href="http://vlele.files.wordpress.com/2010/05/clip_image014.jpg"><img style="display:inline;border-width:0;" title="clip_image014" border="0" alt="clip_image014" src="http://vlele.files.wordpress.com/2010/05/clip_image014_thumb.jpg?w=478&#038;h=374" width="478" height="374" /></a></p>
<p>&#160;</p>
<h3>Impact on Development and Operations</h3>
<p>1) Utilize existing management tools such as System Center that are being refactored to work with the on-premise, as well as, Azure based applications. </p>
<p>2) Understand and leverage the App Fabric as new services become available. </p>
<p>3) Be cognizant of the differences between the SQL Azure and SQL Server running on-premise and avoid large monolithic database instances, as well as, features such as CLR and Service Broker that may not be immediately available in SQL Azure.</p>
<p>4) Avoid relying on special security privileges, file system or registry access etc. that will not be available when executing on Windows Azure. </p>
</p>
</p>
</p>
</p>
<p>[1] <a title="http://channel9.msdn.com/pdc2008/BB03/" href="http://channel9.msdn.com/pdc2008/BB03/">http://channel9.msdn.com/pdc2008/BB03/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=167&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2010/05/31/public-private-hybrid-or-on-premise-which-cloud-model-is-right-for-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/clip_image014_thumb.jpg" medium="image">
			<media:title type="html">clip_image014</media:title>
		</media:content>
	</item>
		<item>
		<title>Monte Carlo Simulation on Azure</title>
		<link>http://vlele.wordpress.com/2010/05/01/monte-carlo-simulation-on-azure/</link>
		<comments>http://vlele.wordpress.com/2010/05/01/monte-carlo-simulation-on-azure/#comments</comments>
		<pubDate>Sat, 01 May 2010 18:49:47 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://vlele.wordpress.com/2010/05/01/monte-carlo-simulation-on-azure/</guid>
		<description><![CDATA[&#160; Live Demo&#160; http://ais.cloudapp.net&#160; ** ** To limit&#160; the cost of hosting this demo application, the availability is limited to&#160; regular business hours -&#160; 9:00 am to 5:00 pm EST. An on-premise&#160; utility, based on Windows Azure Service Management cmdlets, is used automate the creation and removal&#160; of this application. &#160;[ Readers who are not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=157&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="left"><font size="2">&#160;</font></p>
<p align="left"><font size="2"><u>Live Demo</u>&#160; </font><a href="http://ais.cloudapp.net"><font size="2">http://ais.cloudapp.net</font></a><font size="2">&#160; **</font></p>
<p align="left"><em><font size="2">** To limit&#160; the cost of hosting this demo application, the availability is limited to&#160; regular business hours -&#160; 9:00 am to 5:00 pm EST. An on-premise&#160; utility, based on </font></em><a href="http://code.msdn.microsoft.com/azurecmdlets"><em><font size="2">Windows Azure Service Management cmdlets</font></em></a><em><font size="2">, is used automate the creation and removal&#160; of this application.</font></em></p>
<p align="left"><font size="2">&#160;<em>[ Readers who are not already familiar with Windows Azure concepts may find it useful to review </em></font><a href="http://msdn.microsoft.com/en-us/library/dd179341.aspx"><strong><em><font size="2">this</font></em></strong></a><em><font size="2"><strong> </strong>first ]</font></em></p>
<p align="left"><font size="2">This project was motivated by an </font><a href="http://blogs.msdn.com/excel/archive/2007/08/14/christian-stich-on-excel-services-financial-option-valuation-implemented-with-monte-carlo-simulation-using-multithreaded-user-defined-functions-udfs.aspx"><font size="2">article</font></a><font size="2"> by Christian Stitch:&#160;&#160; In his article, Christian Stitch describes an approach for financial option valuation implemented with Monte Carlo simulation using Excel Services. Of course, with Windows Azure, we have now&#160; easy access to&#160; highly elastic computational capability. This prompted me to take&#160; Christian’s idea and refactor the code to run on the Windows Azure Platform. </font></p>
<p align="left"><strong><font size="2">Monte Carlo Simulations</font></strong></p>
<p align="left"><font size="2">You can read more about Monte Carlo Simulation on the Wikipedia page </font><a href="http://en.wikipedia.org/wiki/Monte_Carlo_method"><font size="2">here</font></a><font size="2">.&#160; But here is an explanation from Christian’s article that I found succinct and useful:&#160; </font></p>
<p align="left"><font size="2">“Monte Carlo simulations are extremely useful in those cases where no closed form solutions to a problem exist. In some of those cases approximations to the solution exist; however, often the approximations do not have sufficient accuracy over the entire range. The power of Monte Carlo simulations becomes obvious when the underlying distributions do not have an analytical solution. Monte Carlo simulations are extensively used in the physical and life sciences, engineering, financial modeling and many other areas.” </font></p>
<p align="left"><font size="2">It is also important to note that there is no single Monte Carlo method of algorithm.&#160; For this project I follow these steps:</font></p>
<li><font size="2">Ask the user to define a domain of possible inputs (Mean, StdDev, Distribution, MinVal and MaxVal). </font></li>
<li><font size="2">Generate inputs using&#160; </font><a href="http://en.wikipedia.org/wiki/Box-Muller_transform"><font size="2">Box-Muller transform</font></a><font size="2">. </font></li>
<li><font size="2">Perform a deterministic computation using the inputs for number of iteration requested. </font></li>
<li><font size="2">Aggregate the results of the individual computations into the final result. </font>
<p align="left"><strong><font size="2">Why use the Windows Azure Platform?</font></strong></p>
<p align="left"><font size="2">Monte Carlo simulation results require a very large number of iterations to get the desired accuracy. As a result, access to elastic, cheap computational resources is a key requirement. This is where the Windows Azure Platform comes in. It is possible to dynamically add compute instances as needed (as you would imagine, you only pay for what you use). Furthermore, it is also possible to select from a set of small (2 cores), medium (4 cores) and large (6 cores) compute instances. </font></p>
<p align="left"><font size="2">As part of my testing, I ran a simulation involving a billion iterations. In an unscientific test, running this simulation using 2 small compute instances took more than four hours.&#160; I was able to run the same simulation in minutes ( &lt; 20 minutes ) by provisioning four large compute instances.&#160; </font></p>
<p align="left"><font size="2">In addition, to the elastic computation resources, Windows Azure also offers a variety of persistence options including Queues, Blobs and Tables that can be used to store any amount of data&#160; for any length of time. </font></p>
<p align="left"><font size="2">Last but not the least, as a .NET/ C# developer, I was able to port the existing C# code with multi-threading, ASP.NET and other constructs, easily to Windows Azure.&#160; </font></p>
<p align="left"><strong><font size="2">Architecture </font></strong></p>
<p align="left"><font size="2">Let us take a brief look at the architecture of this application. I will follow&#160; Philip Krutchen’s </font><a href="http://en.wikipedia.org/wiki/4%2B1"><font size="2">“4+1” view model</font></a><font size="2"> to describe the architecture of this application. Philip Krutchen’s approach uses different viewpoints such as logical, development, process and physical view to describe the system. </font></p>
<p align="left"><strong><font size="2">Functional View</font></strong></p>
<p align="left"><font size="2">There is&#160; a single use case for this application. Users can submit a Monte Carlo simulation request by providing domain inputs such as Mean, StdDev, Distribution, MinVal and MaxVals. Users also have to specify the number of iterations. Once the request has been successfully submitted, a unique task identifier is assigned. Users can then monitor the completion status of their tasks by clicking on the Monitor tab. Upon completion of the task, users can&#160; analyze the calculation results using&#160; two charts that depict the density curve based on the results of the calculation.</font></p>
<p align="left"><a href="http://vlele.files.wordpress.com/2010/05/clip_image002.jpg"><img style="display:inline;border-width:0;" title="clip_image002" border="0" alt="clip_image002" src="http://vlele.files.wordpress.com/2010/05/clip_image002_thumb.jpg?w=340&#038;h=180" width="340" height="180" /></a><a href="http://vlele.files.wordpress.com/2010/05/clip_image0024.jpg"><img style="display:inline;border-width:0;" title="clip_image002[4]" border="0" alt="clip_image002[4]" src="http://vlele.files.wordpress.com/2010/05/clip_image0024_thumb.jpg?w=538&#038;h=184" width="538" height="184" /></a></p>
</li>
<li>
<p align="left"><strong><font size="2">Logical View </font></strong></p>
<p align="left"><font size="2">Overall, the system follows a&#160; simple, yet powerful, asynchronous pattern&#160; wherein the&#160; Web role(s) place a request for calculations to an Azure Queue. A set of Worker roles then retrieve these requests, perform the necessary calculations and store the results in the Azure table storage.&#160; </font><a href="http://vlele.files.wordpress.com/2010/05/image.png"><font size="2"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://vlele.files.wordpress.com/2010/05/image_thumb.png?w=340&#038;h=204" width="340" height="204" /></font></a></p>
<p align="left"><font size="2">Worker and Web roles are stateless and completely decoupled. In fact, Web and Worker roles are packaged as two distinct Azure services. As a result, it is possible to scale this application up and down as needed. For instance,&#160; if a large number of calculation requests were to come in at the same time, it is&#160; possible to add&#160; Web and Worker roles in real time. At the same time, it is&#160; also possible to completely tear down the Worker roles during periods of inactivity (thereby incurring no Windows Azure hosting charge)</font></p>
<p align="left"><strong><font size="2"></font></strong></p>
<p align="left"><strong><font size="2">Development View</font></strong></p>
<p align="left"><font size="2">As indicated earlier, the code is broken up into two Azure services. </font></p>
<p align="left"><u><font size="2">UI Service </font></u></p>
<p align="left"><font size="2">As the name suggests, this service is responsible for the UI.&#160; It is based on&#160; a MVC Web Role. This service&#160; accepts the calculation task details&#160; from the user, chops it up into smaller subsets (referred to as jobs) and&#160; writes them to the queue. There is one message for each subset (interestingly, the worker roles, in turn, further subdivides this subset based on the number of VM cores ). <em><font face="Lucida Console">&#160;</font></em></font></p>
<p align="left"><font size="2">The&#160; Submit and Monitor tabs (described in the functional view) are built using&#160; straightforward MVC code. The “Analyze” tab has some rich charts built using </font><a href="http://silverlighttoolkit.codeplex.com/"><font size="2">Silverlight Control Toolkit</font></a><font size="2">. The two charts depict the density curve based on the results of calculation (cumulative&#160; normal and inverse cumulative respectively).</font></p>
<p align="left"><font size="2">The Silverlight application uses a WCF service hosted within the web role to&#160; retrieve the calculation results from the Azure Table storage. The WCF service acts as an intermediary since the Silverlight application cannot make a cross-domain call to the Azure Table storage directly ( it is possible to access the Azure Blob storage directly by placing a ClientAccessPolicy.xml in the root container). </font></p>
<p align="left"><strong><font size="2"></font></strong></p>
<p align="left"><u><font size="2">Calc Service</font></u></p>
<p align="left"><font size="2">Again, as the name suggests, this service is responsible for performing the calculations. Each worker role periodically checks for any new requests. Once it retrieves a new request, it distributes the calculation across a number of threads ( number of threads equals the number of available cores within a VM). Once the calculation is complete, each worker marks the appropriate <em>job</em> as complete and stores the results of the calculations&#160; in a Azure table.</font></p>
<p align="left"><font size="2">Azure Queue has semantics to ensure that every message in the queue will have the chance to be processed to completion at least once.&#160; So if the worker role instance crashes after it dequeues a message and before it completes the calculation, the request will re-appear in the queue after the VisibilityTimeout. This allows another worker role to come along and process the request to completion. </font></p>
</li>
<li>
<p align="left"><font size="2">&#160;<strong>Physical View</strong></font></p>
<p align="left"><font size="2">As stated earlier, each calculation task is chopped up into a bunch of jobs. Details about the&#160; calculation are stored in a single&#160; Azure table. The combination of TaskId and JobId&#160;&#160; serve as the partition and row key. The following snapshot ( created using Cerebrata’s excellent <a href="http://cloudstoragestudio.com/">Cloud Storage Studio</a> tool) depicts the remaining elements of the schema. </font><a href="http://vlele.files.wordpress.com/2010/05/clip_image00210.jpg"><img style="display:inline;border-width:0;" title="clip_image002[10]" border="0" alt="clip_image002[10]" src="http://vlele.files.wordpress.com/2010/05/clip_image00210_thumb.jpg?w=433&#038;h=188" width="433" height="188" /></a></p>
<p align="left"><font size="2">The results of the calculation are stored in a separate Azure table . The following snapshot depicts the schema for that table where results are stored </font></p>
<p align="left"><a href="http://vlele.files.wordpress.com/2010/05/clip_image00212.jpg"><img style="display:inline;border-width:0;" title="clip_image002[12]" border="0" alt="clip_image002[12]" src="http://vlele.files.wordpress.com/2010/05/clip_image00212_thumb.jpg?w=438&#038;h=77" width="438" height="77" /></a></p>
<p align="left"><font size="2">&#160;</font></p>
<p align="left"><strong><font size="2"></font></strong></p>
<p align="left"><font size="2">&#160;<strong>Summary </strong></font></p>
<p align="left"><font size="2">Windows Azure Platform is a good fit for applications such as the Monte Carlo method that require elastic computational and storage resources.&#160; Azure Queue provides a simple scheme for implementing the asynchronous pattern. Finally, moving existing C# code – calculation algorithm, multithreading and other constructs to Azure is straightforward.</font></p>
<p><font size="2"></font></p>
<p><font size="2"></font></p>
</p>
</li>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=157&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2010/05/01/monte-carlo-simulation-on-azure/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/clip_image002_thumb.jpg" medium="image">
			<media:title type="html">clip_image002</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/clip_image0024_thumb.jpg" medium="image">
			<media:title type="html">clip_image002[4]</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/clip_image00210_thumb.jpg" medium="image">
			<media:title type="html">clip_image002[10]</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/05/clip_image00212_thumb.jpg" medium="image">
			<media:title type="html">clip_image002[12]</media:title>
		</media:content>
	</item>
		<item>
		<title>Higher Order Software Development</title>
		<link>http://vlele.wordpress.com/2010/01/14/higher-order-software-development/</link>
		<comments>http://vlele.wordpress.com/2010/01/14/higher-order-software-development/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 22:35:13 +0000</pubDate>
		<dc:creator>vlele</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://vlele.wordpress.com/2010/01/14/higher-order-software-development/</guid>
		<description><![CDATA[Higher Order Software Development I cannot claim it to be an act of volition, but, over the last three years I have found myself involved with building software designed to allow the business users to create the programs they need. I now have a somewhat presumptuous name for this approach &#8211; Higher Order Software Development. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=146&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><u>Higher Order Software Development</u></p>
<p>I cannot claim it to be an act of volition, but, over the last three years I have found myself involved with building software designed to allow the business users to create the programs they need. I now have a somewhat presumptuous name for this approach &#8211; <i>Higher Order Software Development</i>. This approach is similar to the composite application site wherein applications are assembled using existing software assets. The difference, however, is that composite applications such as mashups are about assembling assets that have been built independently. Higher order software development is about software building blocks, designed from the ground-up, to allow business users to “develop”. In the last few years, many approaches including BPM (business process management) have espoused empowering the end-users. Even though BPM systems have been successful in improving the process agility, they have fallen short of making software development end-user ready. This is mainly because the BPM tools are designed to address a broad set of application scenarios, and in most instances, BPM offerings represent a collection of tools (workflow designer, rules engines, modeling, and so on). This has inadvertently raised the level of complexity, thus making it harder for end-users to participate. On the other hand, higher order software development has a much narrower focus &#8212; it is about solving a specific business problem within a given business domain. This approach has been made possible because of the rise in the level of abstractions available within the development platform itself. As we will discuss shortly, platforms such as SharePoint have served as a catalyst for higher order software development.&#160; </p>
<p>Why is this important?&#160; <b>First,</b> business users know the requirements the best. Unfortunately, most business users are not very good at communicating them – hence the famous phrase “I will not know what I want until I see it working”. Furthermore, a portion of the requirements are invariably lost in translation, as they are conveyed to development teams. <b>Second</b>, rather than learn new interfaces, business users want to continue to work with the tools they are already familiar with. What could be better than enabling the business users to create programs using familiar tools like Microsoft Office?<b> Third</b>, IT departments, already backed up in supporting existing operational systems, seldom have the resources to take on new application development projects.&#160; Thus, empowering the business users to build their own software may be the only real way to scale and enable the business to adapt/react quickly to external market forces.&#160; Since business users are directly involved in building, the cost and scope of development can be more efficiently managed. Business users are in a much better position to respond to questions such as &#8211; “Do we really need this feature? Is the customization really needed, or will the out-of-the box functionality do?”&#160; <b>Last, </b>but not least, unlocking the true potential of IT and effectively competing in the next generation of business cycles will require a greater ability to adjust and change software systems cost effectively. By evolving how programs are put together, businesses can implement a process of continuous improvement over time. </p>
<p>For the remaining portion of this post, I will describe four concrete examples of applications to which we have applied this paradigm. </p>
<p><b>Example #1: Custom Calculation Engine in the Professional Services Industry</b></p>
<p>A common requirement in this domain is to implement calculations/reports that adhere to the Financial Accounting Standards Board (FASB) standards. These types of reports are often large and complex. The calculations in the reports are specific to a geographical region, so a multi-national company needs to implement different versions of these calculations.&#160; Furthermore, over time these calculations have to be adjusted to comply with changing laws. Traditionally these calculations have been implemented using custom code, and, as a result, suffer from the challenges outlined above, including: the high cost of development and maintenance, requirements being lost in translation, the lack of traceability, and the lack of a robust mechanism for making a quick change to a calculation in response to&#160; a change in a standard. In a nutshell, the analysts needed a flexible calculation engine tool that makes it easy to develop and maintain the calculations, and at the same time, provides the necessary robustness and scalability. </p>
<p>Here is a quick overview of the Excel Services based solution we developed. For an introduction to Excel Services please refer to the MSDN Magazine article &#8211; <a href="http://msdn.microsoft.com/en-us/magazine/cc163374.aspx">http://msdn.microsoft.com/en-us/magazine/cc163374.aspx</a>. We used XSDs to capture all the input and output data elements needed for implementing a given calculation.&#160; Using a custom Excel pre-compiler, we translated the XSD into named ranges. For example, the generated template workbook has three sheets – one each for input, output, and calculation. Analysts could then use the generated template workbooks to develop the algorithms.&#160; As long as they worked within the contract – as defined in input, output and calculation sheets – they could use any Excel functions. Once the workbook was developed and tested, they placed the workbook into an Excel Services trusted folder for execution. To support high scalability, we used a cluster of Excel Services nodes. The following figure shows the basic architecture:</p>
<p><a href="http://vlele.files.wordpress.com/2010/01/clip_image0014.gif"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="clip_image001[4]" border="0" alt="clip_image001[4]" src="http://vlele.files.wordpress.com/2010/01/clip_image0014_thumb.gif?w=240&#038;h=70" width="240" height="70" /></a></p>
<p><a href="http://vlele.files.wordpress.com/2010/01/clip_image0034.gif"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="clip_image003[4]" border="0" alt="clip_image003[4]" src="http://vlele.files.wordpress.com/2010/01/clip_image0034_thumb.gif?w=240&#038;h=148" width="240" height="148" /></a><br />
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638">
<p><b><i>Who built what</i></b></p>
</td>
</tr>
<tr>
<td valign="top" width="638">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="200">
<p>Development Team </p>
</td>
<td valign="top" width="232">
<p>Built a framework based Excel Services </p>
</td>
</tr>
<tr>
<td valign="top" width="200">
<p>Business Users </p>
</td>
<td valign="top" width="232">
<p>Developed the calculation logic using Excel </p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p> As you can see from above example, we built the software building blocks using Excel Services, which in turn enabled the analysts to implement the calculations as needed.&#160; </p>
<p><b>Example #2: Incident Management System for Law Enforcement Agencies </b></p>
<p>Law enforcement agencies are looking for ways to improve the processes surrounding incident reporting and management. Managing an incident entails gathering a variety of information to aid in the investigation, including documentation about the case (date, location, type of incident, summaries from eye witnesses, photographs, and evidence), as well as information about contacts and sources who can provide more information. In addition to providing an intuitive repository for this information, the system should enable an agency-wide collaborative work amongst the law enforcement personnel assigned to work on the cases. This requires the ability to assign and track tasks, initiate process steps such as review and approval, provide access to a group calendar and messaging, record the status of the case (open, active, closed, and archived), and generate centralized reports (such as the status of all cases or assignments). Information about cases also needs to be searchable and shareable with extra-agency organizations as necessary.</p>
<p>In addition to the high-level functional requirements, incident management systems need to be highly secure and be able to protect confidential information. This typically implies a number of requirements to control access to information based on the role, organization, and level of data sensitivity. There are also typically requirements for these types of systems to support auditing and policy compliance monitoring, tracking of email correspondence, support of e-discovery requests, and enforcement of agency governance rules. </p>
<p>The above requirements highlight the need to store large and variable amount of information about the case in one “container.”&#160; The different document types that make up the case can have unique metadata and lifecycles associated with them. Law enforcement personnel working on the case need the flexibility to add notes to cases, include ad hoc documents, and store different versions of a document. They also need to be able to initiate a number of workflows such as approval and disposition for individual documents or a group of documents.&#160; These workflows can be pre-defined or dynamic in nature.&#160; </p>
<p>We decided to build this system on the SharePoint platform. We provisioned the appropriate container (site collection, site, document library) for a case. The provisioned container is based on a pre-defined blueprint we built. The blueprint includes document types, folder structure, web parts and workflows. Users are then able to customize the provisioned container as needed, including changing the folder structure, adding new ad hoc workflows, and installing additional web parts for reports and data visualization. A nice side-benefit of using a SharePoint based container is the built-in support for archival and restoration of cases. </p>
<p><a href="http://vlele.files.wordpress.com/2010/01/clip_image0054.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="clip_image005[4]" border="0" alt="clip_image005[4]" src="http://vlele.files.wordpress.com/2010/01/clip_image0054_thumb.jpg?w=240&#038;h=121" width="240" height="121" /></a></p>
<p><i>Snapshot of SharePoint based Incident Reporting System</i><br />
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638">
<p><b><i>Who built what</i></b></p>
</td>
</tr>
<tr>
<td valign="top" width="638">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="200">
<p>Development Team </p>
</td>
<td valign="top" width="286">
<p>Built SharePoint artifacts including site definitions, web parts, VS.NET based workflows</p>
</td>
</tr>
<tr>
<td valign="top" width="200">
<p>Business Users </p>
</td>
<td valign="top" width="286">
<p>Provisioned the site, customized the site, content types, adhoc workflows, custom lists and views </p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p> As you can see from above example, we built the software building blocks using the SharePoint platform that in turn enabled the law enforcement officials to effectively manage the incidents. </p>
<p><b>Example #3: Data Analysis Tool for the Telecommunication Industry</b></p>
<p>Network optimization engineers often need to convert vast amount of raw network performance data into useful data visualizations and data products that can assist them in identifying network performance bottlenecks. The goal is to allow non-programmers (in this instance, network engineers) to visually define complex multi-step algorithms&#160; that specify the steps and control dependencies for analysis of raw data.&#160;&#160; </p>
<p>The key requirement is that of flexibility and ease of use needed by network engineer to define custom data processing workflow steps. A solution that is completely built by IT would be too expensive and at the same time not be able to accord the flexibility needed in this instance. </p>
<p>We decided to build the solution using Windows Workflow Foundation (WF). The WF Designer tools provides the network engineers with useful and flexible way to author the data processing algorithms.&#160; To make it easier for network engineers to author the workflows, we developed a set of custom domain specific activities. A lot of attention was devoted to making the workflow authoring experience as simple as possible. </p>
<p>Once the workflows are defined, they are executed asynchronously and results are made available for further analysis. The following diagram depicts the user interface for authoring the workflows. </p>
<p><a href="http://vlele.files.wordpress.com/2010/01/clip_image0074.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="clip_image007[4]" border="0" alt="clip_image007[4]" src="http://vlele.files.wordpress.com/2010/01/clip_image0074_thumb.jpg?w=240&#038;h=146" width="240" height="146" /></a></p>
<p><i>Snapshot of Workflow Foundation based designer used by network engineers</i><br />
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638">
<p><b><i>Who built what</i></b></p>
</td>
</tr>
<tr>
<td valign="top" width="638">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="200">
<p>Development Team </p>
</td>
<td valign="top" width="376">
<p>Built a framework to host WF programs, developed domain specific WF activities, customized the WF designer to make it business-user ready</p>
</td>
</tr>
<tr>
<td valign="top" width="200">
<p>Business Users </p>
</td>
<td valign="top" width="376">
<p>Developed custom workflows</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>As you can see from above example, by building a set of building blocks in the form of custom workflow activities,&#160; we were able allow network engineers to develop the programs that allowed them to analyze vast amounts of raw data.</p>
<p><b>Example #4: Management of Policy Data in the Insurance Domain</b></p>
<p>A common requirement in the property and casualty (P&amp;C) Insurance industry is to store and retrieve “snapshots” of a customer policy or contract, such as an automobile policy or a homeowners policy, as it existed at any given point in time in the past.&#160; Clearly, there are a number of ways to implement this functionality. However, a key requirement is to be able to retrieve the policy snapshot very quickly – typically a sub-second response time is expected. Given the millions of rows worth of historical data that is common for such systems, it would be hard to retrieve a specific version of the policy data dynamically. An alternative approach is to pre-generate templates for the snapshots and tradeoff disk space in favor of response time. In other words, accept the additional cost of storing the entire policy snapshot for every change to the policy.&#160;&#160; In addition to the response time requirement, there are two other&#160; distinct requirements related to the historical data.&#160; The first requirement is to generate reports for verification of compliance with various state laws. As you can imagine, compliance based reports tend to vary quite a bit, based on the laws of each state (within the US). The second requirement is to allow end-users to mine the historical data for interesting patterns, for instance: Why is there a higher rate of customer attrition in a given county over others?&#160; What types of changes are more common in a given state? </p>
<p>The key aspect of this scenario is that while there is a need to support high performing historical queries, there is also a competing need for flexibility in reporting and data mining. In short, the system needs to allow self-service business intelligence (BI) for the end-users.</p>
<p>Let us now take a look at the solution we decided to build:&#160; We used SQL Server Analysis Services (SSAS) based OLAP (online analytic processing) cube as an application building block.&#160;&#160; To store the policy data snapshots we populated a OLAP cube in real time. The OLAP model we developed is depicted in the diagram below.&#160; The dimensions (dimensions are reference information about the data) are obvious ones including customer, geography, and time. The interesting aspect of this model are the fact tables (facts are generally the numeric aspects of the transaction data). Since we are dealing with events (change in policy address, for example) as opposed to a classic business transaction that involves numbers, we ended up creating a “factless” that captures a log of all events on a policy. Additionally, to be able to retrieve the policy as of a certain date quickly, we maintain another “factless” table that captures the snapshot a given policy following any change to it. </p>
<p>:</p>
<p><a href="\Users\Vishwas%20lele\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles3F095\clip_image002"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="clip_image009[4]" border="0" alt="clip_image009[4]" src="http://vlele.files.wordpress.com/2010/01/clip_image0094.jpg?w=240&#038;h=187" width="240" height="187" /></a></p>
<p> Once the OLAP cube is in place, analysts are able to perform queries using a tool such as Excel, as shown in the diagram below. </p>
<p><a href="\Users\Vishwas%20lele\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles3F095\image"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="clip_image011[4]" border="0" alt="clip_image011[4]" src="http://vlele.files.wordpress.com/2010/01/clip_image0114.gif?w=240&#038;h=224" width="240" height="224" /></a><br />
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638">
<p><b><i>Who built what</i></b></p>
</td>
</tr>
<tr>
<td valign="top" width="638">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="200">
<p>Development Team </p>
</td>
<td valign="top" width="274">
<p>Organized the data in OLAP structure, developed a scheme to populate the OLAP structure in real time</p>
</td>
</tr>
<tr>
<td valign="top" width="200">
<p>Business Users </p>
</td>
<td valign="top" width="274">
<p>Developed the queries to respond to historization related requests, built adhoc reports to meet compliance and regulatory needs</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>Readers who are familiar with BI (business intelligence) systems are probably wondering how the solution described above is different from a traditional BI solution. Furthermore, why do I see this as an example of higher order solution development? While this is indeed a BI-based solution, it is a different from a traditional BI Data Warehouse / Data Mart in several important ways. First, the dimensional model, with the factless and snapshot tables, is different from a traditional BI data warehouse. In this instance, the data model has been designed in a manner to promote “assembly” by business users. Secondly, the OLAP cube is very much part of the application architecture in the sense that&#160; queries from the UI (user interface) layer are serviced by the OLAP cube in near real-time. This also unlike a traditional BI system which is usually a distinct system designed to serve as&#160; a decision support system. Finally, by combining a traditional relational database with the OLAP cube, we are able to offer the notion of a composeable data services layer.</p>
<p>As you can see from above example, the OLAP based building blocks built by the development team enabled business users to perform dynamic queries to respond to historization requests from the client and build adhoc reports to meet compliance and regulatory needs.</p>
<p><b>In summary</b>, with all of the above examples, we built the software tools that allowed the business-users to create the program they need.&#160; This approach has a number of benefits including reduced cost of development and increased agility to adjust and change software systems. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vlele.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vlele.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vlele.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vlele.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vlele.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vlele.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vlele.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vlele.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vlele.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vlele.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vlele.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vlele.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vlele.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vlele.wordpress.com/146/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vlele.wordpress.com&amp;blog=271680&amp;post=146&amp;subd=vlele&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vlele.wordpress.com/2010/01/14/higher-order-software-development/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ae43c20c0f5d552cd08ced6c49931722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vlele</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/01/clip_image0014_thumb.gif" medium="image">
			<media:title type="html">clip_image001[4]</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/01/clip_image0034_thumb.gif" medium="image">
			<media:title type="html">clip_image003[4]</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/01/clip_image0054_thumb.jpg" medium="image">
			<media:title type="html">clip_image005[4]</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/01/clip_image0074_thumb.jpg" medium="image">
			<media:title type="html">clip_image007[4]</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/01/clip_image0094.jpg" medium="image">
			<media:title type="html">clip_image009[4]</media:title>
		</media:content>

		<media:content url="http://vlele.files.wordpress.com/2010/01/clip_image0114.gif" medium="image">
			<media:title type="html">clip_image011[4]</media:title>
		</media:content>
	</item>
	</channel>
</rss>
