Understanding of Windows Azure's Managed Services

Source: Internet
Author: User
Keywords Azure Applications

The first applications that are designed and developed for Windows Azure's managed services consist of two parts:

1, managed code

2,XM L configuration file

Managed code corresponds to a different role

The XML file corresponds to a different configuration setting

We describe in detail what components are primarily included in Windows Azure applications:

Note: This is a picture in the Windows Azure SDK.

Next, we will carefully analyze each of the components mentioned in the above picture.

First, the character.

There are three types of roles

1,web role

2,worker role

3,VM role

Web role

1, this is a custom-defined role for IIS.

2, if we choose this type of role, IIS will be automatically configured.

3, this role is primarily used to get input.

4, this role has been configured appropriately for HTTP requests.

5, which contains Web sites or other code that is supported by IIS.

6, it will contain some ASPX pages, or it may contain some WCF services. Any application that is supported by IIS can be used as a web role.

7, any application can be used as a web role, as long as it supports the HTTP protocol.

8, when we use the WCF service as a Web role in Windows Azure, we need to make sure that the bindings used in the WCF service are "BasicHttpBinding". Using WCF services as a Web role, we cannot use other bindings.

Web role improvements in Windows Azure SDK 1.3

1, all IIS features are supported.

2,web applications and sites are fully operational under IIS.

The 3,web role uses application domains in exactly the same way as IIS.

The biggest improvement is that now we can think of multiple sites or applications as a web role.

When creating an azure project, we can choose the type of Web role that we want to add for this application. The templates that are already installed include:

1,asp.net Web Role

2,asp.net MVC Web Role

3,WCF Service Web Role

4,cgi Web Role

In the Windows Azure project you just created, you can see that the wizard will automatically create two types of profiles for you.

In the Serviceconfiguration.cscfg file, we can specify the number of instances of the Web role:

Worker role

It is mainly used for background tasks. It is noteworthy that the worker role does not support IIS. Therefore, it can handle any type of application, including unmanaged code. The worker role does not have to interact directly with the user, so it can be a hit when it comes to processing tasks that are asynchronous and take a long time to complete.

Main uses of the worker role

1 for tasks that do not require a user to wait.

2 for those asynchronous tasks.

3, for running non-HTTP services (for example, TCP services).

4, hosting applications that do not require user input.

Differences between worker roles and web roles

Let's understand the difference between web roles and worker roles:

The 1,web role is a Web application that obtains HTTP input from the user and is supported by IIS. The worker role does not support IIS. This is the main difference between the web role and the worker role.

The 2,web role is user-oriented, and the worker role acquires input from the Web role, primarily for performing bulk operations asynchronously.

3, in web roles, threads are managed through IIS, and in the worker role, threads are managed by developers or by ourselves.

4, in the worker role, we must provide the Run method to start the process.

The security parameters for the 5,web role and the worker role are not the same.

6, for IIS and network services, the default is to support certificate-based ACLs (Access control List), which in the worker role must be managed by the developer themselves.

In the Csdef file, the worker role is defined as follows, in the following configuration file, the name of the worker role is "WokerRole1":

<workerrole name= "WorkerRole11" >

<Imports>

<import modulename= "Diagnostics"/>

</Imports>

</WorkerRole>

The worker role class consists primarily of two methods:

VM role

The third type of role is the VM role. This is a very special role that is primarily used for operating system upgrades in virtual machines.

Web roles and worker roles run on a virtual machine, and the VM role is a virtual machine that can fully control the various operations on the virtual machine.

We can use VM roles to control operating systems and upgrades in virtual machines, while operating systems are instances of VM roles. This role is best suited for migrating applications that run as managed services in Windows Azure.

A VM role is defined as follows:

<virtualmachinerole name= "Machinerole" vmsize= "Medium" >

<Imports>

<import modulename= "RemoteAccess"/>

<import modulename= "Remoteforwarder"/>

</Imports>

</VirtualMachineRole>

Original name: Windows Azure for Developers Task 3:understanding Windows Azure Creator Author: Dhananjay Kumar

"Azure Developer Task Three: Understanding Azure Apps (Next)"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.