Distributed architecture--logical architecture and physical architecture

Source: Internet
Author: User
Tags enterprise integration patterns

Original: Http://blog.csdn.net/dinglang_2009/article/details/38636151?utm_source=tuicool

In the actual development process and work, we often hear "architecture design" and "architect" such nouns, it is not mysterious, but few people have a comprehensive understanding of the "architecture", let alone grasp. In fact, only a handful of people can become or be dubbed the title "architect". Therefore, the author summarizes some understandings of architecture in practice, hoping to supplement many people's understanding on this problem and correct some misunderstandings.

    • Classification of schemas

In terms of architecture, 5 architectural views are theoretically divided: logical architecture, development architecture, operational architecture, physical architecture , and data architecture . According to the name, we can probably guess the focus and meaning.

Here first with the popular text simple introduction, easy to understand, we can not have to tangle with concepts and these theories. We usually focus on "logical architecture" and "Physical architecture".

Logical architecture: The logical architecture focuses on functionality, features that are directly visible to the user, and features that are implied in the system. Or more commonly described, the logical architecture is more inclined to our daily understanding of the "layering", a project into the "presentation layer, business logic layer, data access layer" such a classic "three-tier architecture."

Development architecture: The development architecture focuses more on the package, not just the programs we write ourselves, but also the SDK that the application relies on, the third-party class library, the median price, and so on. Especially the current mainstream Java,. NET depends on the language and platform of the virtual machine, as well as the mainstream database-based application, will be more concerned. is closely related to the logical architecture.

Run the schema: as the name implies, more attention is paid to some of the problems that may arise in the application's operation. For example, problems with concurrency, more common thread synchronization issues, deadlock issues, object creation and destruction (lifecycle management) issues, and more. Development architecture, more concerned about the pre-takeoff of some of the preparatory work, in a static state can be planned to do well, and the operation of the architecture, more consideration is the plane after takeoff some of the problems may occur.

Physical Architecture: Physical architecture, more attention to the system, network, server and other infrastructure. For example, how to deploy and configure the network environment through the server to achieve "scalability, high Availability" of the application. Or to give a practical example, how to design infrastructure to ensure that the site can support the 10W people online, 24x7 service, when more than 10W people or less than 10W people online, can easily adjust the deployment architecture to support.

Data architecture: Data architecture, more focused on data persistence and storage-level issues, may also include data distribution, replication, synchronization and other issues. More closely, how to choose the required relational database, popular NoSQL, how to protect the data storage level performance, high availability, disaster preparedness and so on. Many times, the physical architecture is closely related, but it is more concerned about the data storage layer, the physical architecture is more concerned about the entire infrastructure deployment level.

Above said so much, I believe that few companies in the country are strictly in accordance with these five kinds of views to the Division of labor and Design. In fact, in the eyes of the author, the architecture is broadly divided into two types: software architecture, System architecture . The first three views can be summarized into software architecture, and the latter two architectures are classified as system architectures. This is also more in line with most of the domestic small and medium-sized Internet companies division and layout.

Depending on the application characteristics, the focus may be different. For example, some portal classes of Internet applications, read more write less and relatively simple business, then pay more attention to " high performance, scalability, availability ," and so on. For more complex applications, such as e-commerce, such as large-scale transaction-oriented applications, for each level and each link will be more concerned. For business-like systems, such as ERP used by some production enterprises, or some MIS and OA applications that are only used internally by enterprises, they tend to focus more on functionality and complex business and implementation, expansion, and rarely on performance and so on, which are more concerned with the pure software architecture level. Here, do not start a concrete discussion.

    • What is architecture design?

In the long-term technical recruitment interview, I found that in many people's eyes, architecture is layered, architecture design is "three-layer architecture" (or four-layer, five-layer ...) The more layered it is, the more complex the project is and the more the architecture is.

Perhaps it is affected by a sample project such as PetShop, here is not to investigate the reason for the moment, first correct a lot of people misunderstanding it. First of all, the author's understanding:

Architecture is a practical and elegant design, it does not lie in the number of layers, or the number of design patterns applied. Should be to meet user needs and developers generally acceptable as the fundamental, and to meet the system characteristics and business development needs, from the point of view of software design, can achieve the level and structure of clear, maintainable, reusable, extensible ... is very good, do not have to deliberately to tangled up the number of layers, whether the use of what mode and so on. In the case of object-oriented, the basic goal is "high cohesion, low coupling", so we may follow some common design principles (such as the classic solid design principles). Finally, to correct a point, usually we say that the pattern is actually divided into many kinds, not only refers to the "design pattern." It typically includes: Enterprise architecture patterns, design patterns, SOA patterns, enterprise integration patterns, and so on.

Emphasize that the architecture should be "practical", and the developers generally acceptable, otherwise "elegant" design, will become a high cost of "showy", mechanically will only make the project "abortion".

    • About tier and layer

For this reason, I have seen several debates on Tier and Layer in some technical communities and forums. In fact, the most widely recognized and accepted understanding is that tier typically refers to a physical hierarchy, defined by a single (or set) of servers that perform the same function. Layers, in general, refer to logical hierarchies, for the organization of code, such as the "Business logic layer, the presentation layer," which we typically refer to.

Tier refers to where the code runs, and multiple layers can be run on the same tier or extended to another tier (provided that the application supports it, typically RPC, network traffic, and so on).

As shown in the following:

    • The classification of architects

Architects tend to be a career that many developers aspire to, and it's not mysterious or as many people imagine (drawing PowerPoint or UML sketches, then handing it over to programmers and then going free on their own). Many companies in the country are not defined as architects, usually by highly skilled and experienced developers, and are not uncommon (many are in charge, systems analysts, project managers, architects, and core developers ...) and more. )。 What is worth correcting is that, unlike architects and system analysts, system analysts are more focused on early-stage requirements analysis. Architects, generally throughout the software development cycle, are complementary to the project manager. For architects, Microsoft is divided into: Software architects, system architects, solution Architects, Enterprise Architects, and so on. Other vendors may also be divided into: technical architects, business architects, network architects, security architects, SOA architects ... You don't have to be too tangled up with these concepts. According to the author's understanding, the major Internet companies in China, the architect will generally only in 2-3 directions: Software Architects and system architects (some enterprises called operations architects), some enterprises for the comparison of senior DBA and understand the entire system architecture, but also to distinguish the so-called "data architect." As for the specific title, can not be tangled, only in the understanding of the general development of positioning, and then work towards that direction. For programmers, first write high-quality code, in the actual combat gradually improve their design thinking can be.

    • Benefits of logical layering and physical tiering

Benefits of Logical tiering:

    1. More clarity in Code organization
    2. Easier to maintain
    3. Better code re-usability
    4. Better team Development experience
    5. Higher code Clarity

Benefits of Physical Layering:

    1. Performance
    2. Scalability
    3. Fault tolerance
    4. Security

Distributed architecture--logical architecture and physical architecture

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.