Introduction: This article aims to provide a brief introduction to cloud programming using Visual Studio 2010.
Definitions
Windows Azure: Microsoft Cloud Computing Platform.
Role: Element or individually scalable component running in the cloud.Each instance corresponds to a Virtual Machine in the cloud.
Web Role: Web application running on IIS. Is accessible via http or https endpoint.
Worker Role: Background processing application. Can expose internet facing and internal endpoints.
Scalability in the cloud: To handle additional load, number of instances can be increased.
Storage Services: scalable storage solutions to provide support to sustain scaling in load. Blob, queue and table storage services in Microsoft Azure storage.
Details
Visual Studio 2010 provides support for programming cloud based services.
- Development and configuration tool
- Local testing environment
- Deployment
Install Windows Azure tools for Visual Studio to get started with cloud programming.
To create a new Role, you can create a new Project and use one of the templates such as such as ASP.Net Web Role template, WCF Service Role template, ASP.Net MVC role template.
The cloud service project is a deployment project that defines which roles are included, their definition and configuration files.
A simulation environment is provided locally through IIS to develop and test cloud-based services. Development Fabric provides a local test environment enabling developers to develop and test cloud based applications on local machines.
Process
- First Develop and build the application locally using Windows Azure Development Fabric and using local storage.
- Once the application is tested locally, run in mixed mode – run the application locally using a Windows Azure Storage Account.
- After everything is validated in mixed mode, deploy and test your application on Windows Azure using a Windows Azure storage account and id.
- Each Windows Azure Hosted Service has a private staging deployment area and a public Production deployment area. Windows Azure account id can be provisioned online on windows.azure.com.The provisioning process provides options to set a friendly account name, select affinity groups etc. Affinity groups indicate tight coupling for storage and hosted services, where possible. When you deploy the application to Staging on Windows Azure, the Role is in Allocated state. Once you click Run, the Role is in Initializing state. When the Role is ready, it moves to the Started State.For testing your application in the staging environment, you can navigate to the staging URL which is a URL starting with a guid.
- Once everything is tested, the Role can be promoted to Production area. From this stage, the Role is available to end users.
- For on-going changes/fixes, you can modify the development environment. In order to maintain separate storage for staging and production, separate storage bindings for the deployment and staging. When you expect the load to increase, the instance count can be increased by modifying and re-deploying the service configuration file.
References: MSDN
Conclusion
In this article, we took an introductory look at the world of building cloud-based applications. I hope this article provides you enough information to generate an interest in further pursuing this choice of solutions.
Filed under: Azure
