Overview of the Windows Azure Platform
UPDATE 2013-04-30 - Windows Azure has changed a lot since this documentation was originally created. Therefore some of the documentation may not be up to date. Specifically there now exists a new feature called Azure Websites which is now the recommended way to host mojoPortal on Windows Azure. It is much more simple than the Web Roles approach documented below and is more like traditional hosting scenarios in that the file system is persistent and you can install and upgrade to new versions of mojoPortal using FTP to transfer the files. If setting up a new site on Windows Azure Websites you can install mojoPortal directly from the Web App Gallery, though for subsequent upgrades you would typically use FTP. The video below is a walk through of installing mojoPortal on Windows Azure Websites and creating some initial content. The video was originally produced for a marketing opportunity and was played in between sessions at the Microsoft 2013 AzureConf online conference.
Windows Azure is the cloud hosting environment from Microsoft. It consists of a number of related components. There is SqlAzure for the database, Azure Blob Storage for storage of files as well as storage of objects in tables like other NoSql databases, Azure Web Roles and Worker Roles, as well as facilities for AppFabric Caching and Service Busses.
Understanding Web Roles
You can think of a Web Role as being a VM (Virtual Machine) with IIS running on it and with your web application installed in it. When you deploy your application as a Web Role the application is part of the virtual machine image. It allows scaling because more copies of the VM can be brought online and the load of traffic can be spread among the different instances of the Web Role by load balancing. However, an important thing to understand is that when a VM is taken offline or brought online it is exactly as it was when you first deployed it as a web role. That means if you uploaded any files using your web application those files won't be part of the image and therefore will not be there when the VM is rebooted nor will new instances of the VM have the file. So when you make file changes to your web application, even simple things like changing settings in Web.config you have to redeploy the entire app to the web role again (which is basically like re-defining the VM Image). To make it easier to manage Azure Web Role deployments, there are various Azure Accelerators that have been posted to codeplex. I would describe them as Synchronization frameworks, that make things a bit easier. We've modified one of these Azure Accelerators to be more generic so it can be used with mojoPortal. See Using a Synchronization Framework to Run mojoPortal on Azure.
Understanding Worker Roles
Worker Roles are also virtual machines but they are not meant for running IIS, they are more akin to Windows Services. They are not the same thing as Windows Services but are very similar in concept and their use in cloud hosting would be for things that you would typically think of using a Windows Service for. See this article which presents an example of migrating a Windows Service to an Azure Worker role.
Understanding SqlAzure
SqlAzure works very much like SQL Server though there are a few limitations on the maximum size of a database and other compatibility issues. The mojoPortal data layer for SQL Server works just fine with SqlAzure, so you just set your connection string to the SQLAzure database and it should just work.
Azure Pricing
Azure is a high end hosting environment, it is rather expensive and not something to use for the average web site. In my experience having a test site setup with a database and a storage account was running about $3-4/day even when it was not being used and getting zero traffic. There is an Azure Pricing Calculator that can help you estimate the costs of Azure hosting, and you can find some more details in this blog post.
Created 2011-09-27 by Joe Audette