DCSIMG
July 2011 - Posts - Manu Cohen-Yashar's Blog

Manu Cohen-Yashar's Blog

July 2011 - Posts

How to Deploy Web Roles Quickly.

One of the most common complains about Azure roles is the time it takes to spin out a new role. When thinking about it, creating a new role has two stages:
1. Create a new VM with Windows Server 2008 installed
2. Install your application on it.

The long part is the first one but the interesting part is the second. So why not spilt the two?

Web-Deploy allow us to do exactly that. We create an empty web role (with the OS only) and then inject our site to it.

 

Windows Azure Accelerator For Web Roles which was just released  help us to run Web-Deploy and deploy our sites within 30 sec (would you believe that)
In the codeplex site you will find detailed instruction how to deploy your application.


Windows Azure Accelerator For Web Roles helps also to deploy multiple sites on one web role. The accelerator installs a simple "portal" on your web role with which you will create and configure your sites. (Think of it like the IIS home page)
When you browse to the DNS provided by the Azure portal (i.e. HostedServiceName.cloudapp.net) you will see this simple portal.
 

In the portal you create "sites" (similar to sites on IIS). You have to configure a hostname for each site that will be used to browse to your application.

clip_image002[4]

 
To direct the host name to your web role you have to create a CName DNS entry with the mapping: "mydns.com" -> the VIP from the Azure management portal. This can be easily done by updating the hosts file in "\Windows\System32\drivers\etc"

 

Now you can deploy your web application to the new site and after 30 sec you can start Now browsing to http://mydns.com and see your new application.

 

clip_image004[4]

 

Enjoy

 

Manu

 

SQL Management Studio Must be Updated !!!

If you are using SQL Management Studio to connect to your SQL Azure database you have to install the new version of the management studio. You can find it here.

The reason is that major updates were done to the SQL Azure engine and the version number was incremented. If you do not upgrade you can expect errors in connectivity.

Some of the immediate upgrades we can see is the support for co-administrator that will enable customers to specify multiple database administrators.

Another important update is the support for spatial data types, that will help the cloud database to hold the data of location-aware cloud and mobile applications.

This is just the beginning. More important updates are coming….

The idea is to be as compliant as possible with the upcoming release of SQL Server Code Name “Denali”. The new versions of SQL will support "Big Data" , federation and much more…

Manu

Workflow in the Cloud

One of the major missing parts in windows azure was the support for workflow. You could install a workflow on a web role but when multiple instances of the web role try to persist and load the same workflow instance an exception is thrown. Workflow was designed to run by a single host that persist its state to a single database. This concept does not fit to the cloud that uses multiple computing instances by design.

Azure AppFabric provides the solution. A whole new host was developed especially for the cloud. We as developers do not have to deal with the host yet we should know what happens under the cover, what is supported and what is not.

AppFabric released a CTP-1 in June 2011. This is only the first release of this new workflow engine. A lot has to be done. Many features are missing and Microsoft is waiting for feedback.

Persistence

I think that major concept that was changed concerns persistence and tracking. Unlike on-premises deployments we do not have to supply a database to persist and track the workflow. Persistence is done inside the service bus and not in SQL. The idea is that the host instance has to be stateless as possible. All messages to hosts running workflow services are sent through service bus. With a message (to a receive activity in a particular workflow instance) service bus attach all the workflow instance state required to continue and run the workflow. Unlike on-premises deployments the hosts do not own the workflow instance, they just run it according to the information they get from service bus.

clip_image002[4]

Tracking

Tracking is not supported currently but another new interesting feature does the job.

All workflow services expose a special endpoint called IWorkflowManagement . Clients can create a reference to this endpoint and get query interesting information about the workflow such as its status or the name of the bookmark it is waiting on. Concerning status it is possible to write additional custom information with a new activity called SetUserStatus. I cannot claim that IWorkflowManagement substitute tracking services (Microsoft says that tracking will be supported in the future) but it provides answer for many use cases we implemented with tracking in the past. It is simple and easy.

 

Workflow to workflow communication

When crating a reference from one "service" to another in AppFabric composite application Visual studio generates code to create a proxy. In workflow Visual studio simple generates a custom activity that can be used to call another workflow.

 

Transactions

Distributed transactions are not supported in the cloud. There is just no Distributed transactions coordinator. It means that all the transaction activities we use on-premises will just not work in the cloud. 

Summary

AppFabric provides the ability to run and manage workflow in the cloud in massive scale.

We are now in CTP-1 a lot has to be done, but we can see where we are going and it looks great.

I recommend watching the session about workflow in AppFabric-TV