Sunday, April 22, 2012

Developing applications for Windows Azure.


Today I begin a series of articles that try to tell about the features of advanced application development platform, Windows Azure.
design.
And should start first thing in the design. At the design stage is necessary in general to understand whether you need an application or a cloud still possible to do using standard. You can grow long discussion about the pros and cons of hosting applications in the cloud. My personal opinion: if you are going to develop an application that will run on a single server and turn the simplest way, perhaps it's not a cloud for you. If you require the following features like:.



  1. reliability.



  2. scalability.



  3. availability.


, Then a better solution than the cloud you will not find. Улыбка
So, we decided to write an application for the cloud. Immediately encounter the following problems:.



  1. First you develop a highly scalable cloud applications, and this in turn imposes certain limitations and peculiarities of the process itself.



  2. Second to consider the very model of development Windows Azure, which involves the design and choice of roles (and you can select either Web- role or the role of Worker- or VM- role).



  3. In the end, should consider a mechanism of communication between the roles, good, Windows Azure provides you with stunning features (Windows Azure Queues, for example).


Do not forget that Azure is amazing flexible platform. You do not necessarily make the entire application to the cloud. With the help of these wonderful technologies as Windows Azure AppFabric and Windows Azure Connect can be combined cloud application with an application on your own servers, and it will work as a whole ( for example, can make data storage on your own server, while processing of the place in .
All the same basic design in the cloud application - it is scalable. I see that the main objective of the project Azure - this is an incredible opportunity to scale your application, so you as a developer, need to think in the context of this advantage and to develop the application, taking into account the fact that maybe it will work on a set of physical machines.
Well, another feature - a development with regard to the cost. Here is a whole new dimension to most modern programmers, never before have we thought about the fact that the characteristics of the design may depend on the cost of support and maintenance. In the context of Windows Azure is a mega topical.
development.
The first thing to note in the development - is that real estate development in the process you use the same tools you use your experience in developing and debugging applications. In fact, for the development you need to install Windows Azure SDK and Windows Azure Visual Studio Tools, and then you get a new template in VS2010. By the way, promised in the near future to integrate the Windows Azure templates and Visual Studio without the need for additional installation. Also at the last PDC was announced IntelliTrace support in the cloud, it means that you can collect debugging information directly from the cloud.
So, create a project, press F5 and see how our application is compiled using the utility CSPack formed package is loaded into the local environment - emulation of the clouds, the so-called Development Fabric. In parallel, we have started a local emulation of Windows Azure Storage, entitled Development Storage.




Dev Storage And Dev Fabric


I will not go into much features of Dev Fabric and Dev Storage, because I think most of you are familiar with this.
At the last PDC was significantly expanded Server Explorer, were added to the possibility of monitoring the status of your application in the cloud as well as a convenient viewer for your Windows Azure Storage.

Server Explorer

So, we wrote, tested our application. It's time zadeploit it to the cloud. The first option is to create a package and manually load it on the dev- portal.

Creating New Hosted Service
Here we specify the formal parameters such as service name, the label deploymenta. As well as the package itself, the configuration file, url to be used for access to the application, the geographical location of your service, and a slot where you download the package ( either immediately or on a test Productions slot). In general, I would recommend the following approach to the development and unfolding of your application:.



Stages Of Service Deployment


If you follow this sequence, the first thing we develop and test the application on the local emulators: Development Fabric and Development Storage. As soon as we can see that the application works correctly excluded from the process of trying to Development Storage. and work directly with the cloud version of Windows Azure Storage. If at this stage there is no malfunction of the system is fully translate the project into a cloud, first deploying to a test slot (Staging Slot). At this stage, carried out a final check of the application before it is translated to the stage Productions - in fact the system to boot slot Productions.
So, after successfully downloading the package, we patiently wait for 12-15 minutes and get a working cloud application output:.



Hosted Service on Development Portal


















This is the first version of the deployment of applications and to me very out of date in terms of the availability of better and more progressive way of. I mean automatically build the project in the package and automatically fill in this package directly from the studio. All this is done by Windows Azure Service Management API. To begin with, we need a certificate. Sorry, wrong 2 Certificate. Let's start with the first, which must be added to the dev- site in the section Management Certificates.

Certificate Management

As you can see I have already installed the certificate in this section. I created it on your local machine using standard IIS. Further more, we need a 2nd certificate, which is set for each service in Azure. To do this, I went to the menu Publish your project and added a new user-friendly wizard by kridenshialy.
Automatic Cloud Publishing

In the process of adding new kridenshialov You can generate a certificate that is installed in the certificate store of the local user. It is from this store we have in the next step will be to export the newly created certificate as a pfx- file.

Certificate Exporting

And to fill this pfx- file on the dev- portal.

Certificate Importing on Development Portal

The installation process is a trusted relationship between Visual Studio and Windows Azure is over. As a result, we get this box set, which indicates a successful operation.

Publish Cloud Service

Click OK, if we are satisfied with the target slot, and the label deploymenta and see how the studio and build it all for us deploit.

Windows Azure Activity Log

During the process of unfolding can monitor both the Windows Azure Activity Log, and from the Server Explorer, well, actually from the dev- portal.
At this point I would like to conclude this post, dedicated to design, develop and expand the applications for the Windows Azure platform. In subsequent posts will try to tell you about the peculiarities of working with Windows Azure Storage, Windows Azure AppFabric and other interesting cloud technologies. Thank you for your attention!. Улыбка

No comments:

Post a Comment