Windows Azure cloud computing study Note 2-Windows Azure in-depth observation

Source: Internet
Author: User

The previous Windows Azure cloud computing study Note 1-Windows Azure introduction is a general overview of Azure, which will be discussed in depth in this article.

 

Create a Windows Azure Application

-----------------------------------------------------------------------

For developers, creating a Windows Azure application is similar to developing a traditional windows application, and Visual Studio provides a template for developing cloud applications. In order to develop a model cloud environment on the machine, Microsoft provides the development fabric, which can be simulated on a local computer, including web role, worker role, VM role, and three Azure cloud storage methods. Developers can create Azure applications locally and then test the application on the Local development fabric, just like in a real cloud environment.

After the local test, you can release it to windows Azure. Generally, there are two processes for release: First, release to the rehearsal Area (Staging Area), and then release to the production environment (production). If problems are found, you can also switch from the production environment to the rehearsal environment.

Rehearsal status applications include domain names similar to <GUID> .cloudapp.net, which can be used for internal testing. After being published to the production environment, you can use your own domain name yourapp.cloudapp.net, or all of them are your own domain names, such as www.newmgdn.com.

 

Compute)

-----------------------------------------------------------------------

In the past, both Web Role and Worker Role can only run in user mode, and some functions are limited. Now both roles can run in admin mode, and you can do what you want, for example, install a COM component.

However, these operations start from a clean image, so every time you start an instance, your COM components have to be reinstalled. If there are many, efficiency becomes a problem. The solution to this problem is VM role. You can get a virtual machine image VHD. In the future, it will be much faster for new instances to start from the configured VHD. In addition, this method (VM Role) also supports user interaction during the installation process.

In addition, Azure allows users to specify the data center on which their data is stored. Currently, there are three data centers in the United States, Europe and Asia.

 

Storage)

-----------------------------------------------------------------------

To use the Azure storage service, you must create a storage account.

Blob-Binary large objects can meet the needs of most applications, such as videos, audios, and other data. When using Blob, developers need to create a container. Each container can protect one or more blobs.

To specify a specific blog, you can use the following URI:

Http: // <StorageAccount> .blob.core.windows.net/<Container>/<BlobName>

There are two forms of blob:

Block Blob: a maximum of 200 GB each. To improve the transmission efficiency, the block blob is divided into blocks. If the transmission fails, you only need to pass the failed block again, instead of re-transmitting the entire blob.

Page blob: up to 1 Tb (1024 GB). The entire page blob is divided into 512 bytes. Applications can randomly access any page in blob.

 

Blob is relatively easy to understand, and tables are more complex. Is the Table structure.

 

Each table contains a series of entity. entity can contain (or does not contain) attributes, which consist of names, types, and values. Azure supports Binary, Bool, Datetime, Double, GUID, int, int64, and string types. Based on the value, the same attribute can have a type that is not allowed at different times, and an entity can also contain any type of entity.

No matter what attributes are contained, entity is regarded as a read/write unit, and can be up to 1 MB.

It can be seen that the Table stored in Azure is different from that stored in RDBMS. This structure is more scalable and simpler than RDBMS.

Like other objects in Azure, Table can also be accessed in REST mode, and. net applications can be accessed using the WCF data service. Other types of applications, including. net, can also be directly accessed using the REST method, for example, using a URI similar to the following:

Http: // <StorageAccount> .table.core.windows.net/<TableName>? $ Filter = <Query>

If <query> More Than One result is returned, the programmer can get a subsequent token to continue the repeated query until the unique one is found. Recursive query.

 

Queue)

The Queue is mainly designed for data exchange. It can also be accessed in the REST mode. See the URI in the following format:

Http: // <StorageAccount> .queue.core.windows.net/<QueueName>

However, the queue in Azure is a bit interesting. It is slightly different from the first-in-first-out queue that we generally understand. refer to the following workflow:

 

Generally, a queue contains two operations, one queue, one dequeue, and one output. However, the queue in Azure also has a message deletion operation. Why?

In the above process, the web role first receives the user's request, and then inserts computing-intensive tasks into the queue for worker role to process. The worker role extracts one from the queue and marks the message as den for a period of time. Then, it starts to process the message. If the processing is complete, delete the message in the queue and proceed to the next step. But what if the worker role fails during the processing? If a common queue is used, this message will be missed. The Mechanism in Azure queue is that worker role does not delete a message during Dequeue message, but marks it as hidden within a certain period of time (5 minutes), and then processes it. If the processing fails, after 5 minutes, other worker role instances can see the message again, so that the message can be processed by other worker role instances. This mechanism ensures that each message can be correctly processed once, thus ensuring system reliability.

 

Fabric controler

----------------------------------------------------------------------

For cloud applications, technical services and storage services are of course the most important. However, without the unified scheduling management of fabric controler, they cannot do anything. Fabric controler owns all the resources of the data center and is responsible for allocating user applications to physical computers for execution.

 

For example, a user has five web role instances and four worker role instances. If you specify a task to a specific instance, your application will be suspended when an error occurs in the instance. Fabric controler combines these resources into a fault-tolerant domain. Each fault-Tolerant domain contains computing and storage instances and distributes cloud applications to different fault-tolerant domains. When an instance fails, it does not cause an error in the entire application.

 

In addition, the Update Domian domain is used to shut down the system for Update operations, and migrate cloud applications to the updated system.

 

Before the end of today, some links:

-----------------------------------------------------------------------

Windows Azure Platform Home Page
Http://www.microsoft.com/windowsazure
Introducing the Windows Azure Platform, David Chappell
Http://go.microsoft.com/fwlink? LinkId = 158011
Windows Azure Blobs: Programming Blob Storage
Http://go.microsoft.com/fwlink? LinkId = 153400
Windows Azure Tables: Programming Table Storage
Http://go.microsoft.com/fwlink? LinkId = 153401
Windows Azure Queues: Programming Queue Storage
Http://go.microsoft.com/fwlink? LinkId = 153402

 

 

So far today, we will continue to study in the next lesson.

Related Article

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.