Architecture choice: enjoying the Microsoft SQL cloud platform is like eating roast duck

Source: Internet
Author: User
Tags sql 2008 sql client
Let's talk about the nature of cloud computing SQL azure. We can start with the design model from another perspective. One important purpose of design pattern is "communication". When people talk about the design pattern, what appears in their minds should be a similar view, for example: towering and pointed architecture, a complex appearance portal ......, This is the architect's design model. Of course, it is also successfully integrated into the public's life level, which can be called the "design model ".

The design pattern in the software field breaks through the language gap. The design pattern concept of Gamma was introduced to software computer science by Erich Gamma and others in the field of architectural design in 1990. Since its publication, the Chinese software industry has been developing applicationsProgramIt has been seldom applied to the design pattern theory. There are many reasons for the bottom-up, and communication should be one of the culprit. It is not easy for us to feel the purpose or spirit of this design model literally, but we can understand it after repeated studies. This kind of labor and financial loss is totally different from the principle that the design model was originally promoted. Therefore, it cannot take root here, and of course the program designer has not benefited much from it.

Here, I think Beijing roast duck, a famous roast duck, is something that everyone is familiar! We will use "Beijing Roast Duck" to talk about "a clear facade design model ". Facad (appearance mode) design mode is a structural mode. It mainly solves the problem of excessive coupling between component customers and various complicated subsystems in components, with the evolution of external customer programs and subsystems, this excessive coupling is faced with many changing challenges. It aims to add a layer of messy or poorly-designed application programming interfaces (APIS) to package it and provide a new interface that is easy to understand, the root cause is to provide a simple interface to hide complicated and large program interfaces.

We can use Beijing Roast Duck as an example. Imagine what comes to mind when you hear "Beijing Roast Duck? Is the panorama of a roast duck fragrant? If it was an intuitive and natural reaction, it would be right. So I tried to replace the facade design pattern with a clear idiom. 1.

 

As shown in, we can give an example of the fa c Ade mode. For example, if we (customer program) want to start a car, then we need to start the engine (subsystem 1) and turn four wheels (subsystem 2. But in reality, we don't need to push the wheel by hand to make it turn. We step on the accelerator, and then the car rotates the wheel according to some other operations. The accelerator is like the interface left by the system. No matter how the car rotates the wheel or the wheel changes to a certain brand, what we need to do to drive the car is to step on the accelerator.

As mentioned above, readers will surely ask, what is the relationship between Beijing roast duck and SQL azure? The answer is "same purpose", that is, to provide a user-friendly application programming interface. Microsoft's SQL azure development team is thinking about whether to package the entire SQL database on the cloud and give it a complete and simple application programming interface, so that users can easily get started.

Another option is to let the SQL database be placed on the cloud in the original style, taking into account the practices that can be easily applied by existing programs, then, the standard access protocol is used to make existing programs ready to use immediately. This kind of choice has also appeared in general IT departments. its foothold is to consider whether to hide complex table information in those databases and replace it with simple and easy-to-use APIs, provide a program environment that is easier for programmers to get started. Today's SQL Azure is the result of this kind of selection, that is, a good example of deciding not to adopt the design pattern packaging technology to make this choice.

In addition, you need to consider whether to provide efficient data reading options on the cloud. The ability to quickly read and write data in the database has always been regarded as an essential skill in the Enterprise Information Center. At the beginning of reporting to the Information Unit, programmers often have to familiarize themselves with the database tables first, it is also possible to start production capacity only after you gradually become familiar with the layout of database tables. Therefore, many information departments have developed a database access application programming interface for this purpose, and then named it "quick database access API" in order to make it easier and easier for program designers to get started. From then on, new recruits can quickly get started with this API with a short lead time. The above paragraph seems very reasonable, and there are many people doing this, but in fact it implies some bad sequelae. For example, as the number of people and business types increases, once the application interface (API) is insufficient, the maintenance personnel will begin to complain and request it; A new quick database access API is required, and then the API starts to increase. As the number of people and business types increases, the API starts to increase, this situation will continue until you can't stand it. Finally, you provide an API that can directly send SQL scripts to the database for execution (this is directly used by the program to call the database without using the API, in the sense, it is completely the same, so this API is also named and actually saved ).

The choice of the SQL team. This is an interesting topic. When Microsoft's database team is facing the need to put SQL servers on the cloud, it has encountered the same problems as the above, is it necessary to provide a variety of service interfaces for users to easily access, relying on powerful and easy-to-use service interfaces to thoroughly hide the SQL server? Or can the SQL server directly face external program interfaces by removing this abstract layer for convenient access?

The final result is that Microsoft chose to let the SQL server directly face the external program interface, that is, let the program can use the T-SQL to directly access the database action.
 

 

The SQL azure Development Team enables the SQL Server to directly face program developers and communicate with the SQL server on the cloud using the traditional tabular data stream in the client program, however, based on the consideration of security and the number of Horizontally scalable servers, a gateway layer is specially designed in the middle. The security boundary shown in 2 refers to the gateway layer.

As shown in figure 2, we can vaguely see that SQL Azure is divided into several layers. If we look at Figure 3 together, we can see that it can actually be divided into four layers. The bottom is the infrastructure (infrastructure) this is the underlying service program of the architecture. It is mixed with hardware and software I/O, that is, processing a large number of CPU groups. It is responsible for horizontal multi-architecture jobs (fabric), failover, replication, and load balancing ), of course, it also includes automatic update and maintenance of the software version (it is also responsible for real-time detection of exceptions caused by software or hardware and can automatically take relative measures) and other operations, this is the basic layer of a general cloud architecture. For cloud applications, it provides some self-management mechanisms, which are still mysterious and not open to the outside world. However, some basic APIs will be made public in the near future.

 
Figure 3 SQL azure Architecture

The SQL Server layer is based on SQL 2008 and is modified to a database layer suitable for cloud jobs. The so-called "cloud work" refers to high availability and fast replication. It can accept traditional Transact-SQL (T-SQL) commands, but the data transmitted from the network side does not directly go into the SQL server, but is passed through the gateway layer of a higher layer.

The more complete name of the gateway layer should be the TDS gateway. When the program comes online with SQL Azure, it actually goes online to the gateway layer. After the firewall and security verification are planned here, online will truly enter the SQL Server and establish online (all malicious attacks or illegal Login Attempts rely on the gateway layer to block filtering ). However, once the gateway is established online, another universal pipeline will be responsible for subsequent transfer operations. The purpose of this operation is to reduce unnecessary delays in communication.

In addition, the LB block is shown below the cloud at the entrance of the Internet, which is the only part of SQL azure facing the internet, that is, the only part of the program that can understand the URL address. It stores the relative address in the gateway under the network. It is responsible for balanced allocation of access points to each gateway layer. If your program is called in by Windows Azure, it follows the same endpoint. 2. The top part is your application. Of course, you can use SQL client libraries or ADO. NET data service or other higher-level programming languages, such as PHP. This is because the development team decided to use the traditional tabular data stream as the intermediate transmission protocol, resulting in the use of many of the original or standard public tools for connection work, it is even an error or monitoring action.

SQL azure uses traditional TDS as the transmission protocol instead of packaging a large number of SQL Server services, which makes it easy for programmers to continue the development of SQL Server, this is the first step for Microsoft's success. Of course, SQL azure has also removed some unsuitable functions, including security, absolute path, and other API functions, to suit the cloud environment, see the upper half of Figure 2 to see ODBC and ADO. net is a standard entry, therefore, originally in ASP. most of the functions of net can be used smoothly here, making windows Azure A relational database service that truly executes cloud computing (cloud computing). This is a cloud storage) network-type application data storage services are successfully provided, allowing many existing programs to access cloud data resources with only a few modifications.

The facade design mode adds a layer of messy or poorly-designed application programming interfaces (APIS) to package them and provides a new interface that is easy to understand. Simple interfaces can hide complex and large program interfaces. The common relationship between the schema and SQL Azure is "the same purpose", that is, to provide users with an easy-to-read and easy-to-write application programming interface, so that Microsoft is evolving from the database platform architecture, get more reasonable design choices.

For the it168 text, original: http://tech.it168.com/a2010/0706/1074/000001074190_all.shtml

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.