Distributed architecture-logical architecture and physical architecture

Source: Internet
Author: User

In the real development process and work, we often hear the terms "Architecture Design" and "architect", which are not mysterious, however, few people have a comprehensive understanding and understanding of the "architecture", let alone grasp it. In fact, only a few people can become or be labeled as architects. To this end, I have summarized some understanding of the architecture in practice, hoping to supplement many people's lack of understanding and correct some misunderstandings.

  • Architecture Classification

In terms of architecture, five architecture views are divided theoretically:Logical architecture, development architecture, Operation architecture, physical architecture,Data Architecture. According to the name, you may probably be able to guess its focus and meaning.

The following is a simple introduction in plain text to help you understand the concepts and theories. We usually focus on "logical architecture" and "physical architecture ".

Logical architecture: the logical architecture focuses on functions that can be directly visible to users and hidden functions in the system. Or, it is more common to describe, and the logical architecture is more inclined to the "hierarchy" that we understand on a daily basis ", A project is divided into a classic "three-tier architecture" such as "presentation layer, business logic layer, and data access layer ".

Development architecture: the development architecture focuses more on the packages, not only the programs we write, but also the sdks, third-party class libraries, and medium prices that the applications depend on. Especially for mainstream Java and. NET languages and platforms that rely on virtual machines, as well as mainstream database-based applications. It is closely related to the logical architecture.

Running architecture: as the name suggests, it focuses more on some problems that may occur during the application running. For example, concurrency issues, common "thread synchronization" issues, deadlock issues, object creation and destruction (lifecycle management) issues, and so on. The development architecture is more concerned with some preparations before the plane takes off, so that it can be well planned and run in a static state, it is more important to consider some possible problems after the plane takes off.

Physical architecture: a physical architecture that focuses more on infrastructure such as systems, networks, and servers. For example, how to deploy and configure the network environment on servers to achieve "scalability and high availability" of applications ". For example, how to design the infrastructure architecture to ensure that the website can provide services for 10 million online users and 7x24 hours at the same time, when more than people or less than people are online, you can easily adjust the deployment architecture to support it.

Data Architecture: data architecture focuses more on data persistence and storage, and may also include data distribution, replication, synchronization, and other issues. More specifically, how should we choose the desired relational database, popular nosql, and how to ensure the performance, high availability, and disaster recovery at the data storage level. Most of the time, it is closely related to the physical architecture, but it focuses more on the data storage layer, and the physical architecture focuses more on the overall infrastructure deployment layer.

As mentioned above, I believe that few companies in China strictly divide their work and design according to these five views. In my opinion, the architecture is roughly divided into two types:Software Architecture and system architecture. The first three views can be summarized into the software architecture, and the last two views are classified as the system architecture. This is also in line with the division of labor and layout of most small and medium-sized Internet companies in China.

Depending on the application features, the focus may be different. For example, for some portal Internet applications, reading, writing, and business operations are relatively simple.High performance, scalability, and availability. For more complex applications, such as e-commerce large-scale transaction applications, we will pay more attention to each layer and each link. For business-type systems, such as ERP used by some production enterprises, or MIS and OA applications used only within the enterprise, more attention is usually paid to functions and complex business and implementation and expansion, few require too much performance, and such applications focus more on pure software architecture. Here, we will not discuss it in detail.


  • What is architecture design?

During the long-term technical recruitment interview, I found that in the eyes of many people, the architecture is layered, And the architecture design is a "three-tier architecture" (or four or five layers... the more layers there are, the more complicated the project and the better the architecture ),

It may be affected by sample projects such as petshop. We will not investigate the cause for the moment. correct some misunderstandings of many people first. Let me first explain my understanding:

An architecture is a practical and elegant design. It consists of no more layers or the number of design modes applied. It should be based on meeting user needs and the general acceptability of developers, and must meet the system characteristics and business development needs, from the perspective of software design, it can achieve clear layers and structures, maintenance, reuse, and scalability... it is very good. You don't have to worry about how many layers are divided and whether or not the mode is used. Taking object-oriented as an example, the basic goal is "High Cohesion and low coupling". Therefore, we may follow some common design principles (such as the typical solid design principles ). The last correction point is that the pattern we usually call is actually divided into many types, not just the "Design Pattern ". It usually includes: Enterprise Architecture mode, design mode, SOA mode, enterprise integration mode, and so on.

It should be emphasized that the architecture should be "practical", and developers generally accept it. Otherwise, the "elegant" design will become a high-cost "Flower frame ", the hard work will only make the project "aborted ".


  • About tier and Layer

For this reason, I have seen some information aboutTierAndLayer. In fact, the most widely accepted and accepted understanding is:A tier is a physical layer defined by one (or a group) server that executes the same function. The layer usually refers to the logical hierarchy. For the Code Organization, for example, we usually refer to the "business logic layer, presentation layer ".

Tier refers to the location where the code runs, and multiple layers can run on the same tier, and can also be extended to another tier (provided that the application supports, RPC and network communication are usually required ).

As shown in:


  • Architect category

Architects are often a profession that many developers yearn for. They are not mysterious, or as many people think (draw a PPT or UML sketch and hand it over to programmers for implementation, and then you are free to go ). Many companies in China do not have such positions as architects. They are usually led by developers with excellent technologies and rich experience, it is not uncommon to have multiple roles (many people are both supervisors, system analysts, project managers, architects, and core developers ...). What is worth correcting is that, unlike system analysts, system analysts focus more on Demand Analysis in the early stages of the project. Architects generally run through the entire software development cycle and complement the project manager. Microsoft has two types of Architects: Software Architect, System Architect, Solution Architect, and enterprise architect. Other vendors may be divided into technical architects, business architects, network architects, security architects, and SOA architects ......You don't have to worry too much about these concepts. According to my understanding, architects in large Internet companies in China generally only have two or three directions: Software architects and System Architects (some enterprises are called O & M architects ), some enterprises that are familiar with the entire system architecture of relatively senior DBAs also refer to the so-called "Data architect ". As for the specific title, you don't have to worry about it. You only need to know the general development position and then work hard in this direction. For programmers, write high-quality code first, and gradually improve their design thinking in practice.


  • Benefits of logical and physical layers

Advantages of logical hierarchy:

  1. Clearer Code Organization
  2. Easier maintenance
  3. Better code reusability
  4. Better team development experience
  5. Higher Code definition
Advantages of physical layering:
  1. Performance
  2. Scalability
  3. Fault Tolerance
  4. Security










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.