Architecture design from entry to proficient-software architecture professional vocabulary explanation

1. What is architecture and its essence

In the software industry, there are many debates about what architecture is, and everyone has their own understanding. The structure said by this king and the structure understood by him are not necessarily the same. Therefore, before we discuss the architecture, we first discuss the conceptual definition of the architecture. The concept is the basis for people to understand the world and the means of communication. If the understanding of the architecture concept is different, the communication will naturally not be smooth.

Linux has an architecture, MySQL has an architecture, and JVM also has an architecture. Business systems that use Java development, MySQL storage, and run on Linux also have architectures. Which one should I pay attention to? To clarify the above problems, you need to sort out several related and similar concepts: system and subsystems, modules and components, framework and architecture:

1. System and Subsystem

System: refers to a group consisting of a group of related individuals, operating according to certain rules, and capable of completing tasks that individual components cannot independently complete.

Subsystem: It is also a system composed of a group of related individuals, mostly part of a larger system.

Two, modules and components

They are all part of the system, which is just to split the system from different angles. Modules are logical units, and components are physical units.

Module is to decompose the system logically, that is, divide and conquer, simplifying complex problems. The granularity of the module can be large or small, and it can be a system, several subsystems, a certain service, function, class, method, function block, and so on.

Components can include application services, databases, networks, physical machines, and technical components such as MQ, containers, and Nginx.

Three, framework and architecture

Framework is the specification of component implementation, such as: MVC, MVP, MVVM, etc., are products that provide basic functions, such as open source frameworks: Ruby on Rails, Spring, Laravel, Django, etc., which can be used directly or based on this Secondary development.

The framework is the norm, and the architecture is the structure.

I am redefining the architecture here: software architecture refers to the top-level structure of a software system.

The architecture is the most reasonable decision under the constraints of existing resources after systematic thinking, weighing the pros and cons, and the final clear system skeleton: including subsystems, modules, components. As well as their collaboration relationships, constraint specifications, and guiding principles. And It will guide everyone in the team to agree on the ideological level.

Four aspects are involved:

1. Reasonable decisions based on systematic thinking: such as technology selection, solutions, etc.

2. A clear system skeleton: clear the components of the system.

3. System cooperation relationship: how each component cooperates to realize business requests.

4. Constraint norms and guiding principles: to ensure the orderly, efficient and stable operation of the system.

Therefore, the architect has the ability to understand the business, control the overall situation, select the appropriate technology, solve key problems, and guide the implementation of R&D.

The essence of the architecture is to reconstruct the system in an orderly manner so as to conform to the current business development and be able to expand rapidly.

So what kind of system should be considered for architecture design? Technology will not be developed and driven for no reason. The development and demand of architecture are driven by business.

The architecture design is entirely for business,

1. The requirements are relatively complex.

2. Non-functional requirements occupy an important position in the entire system.

3. The system has a long life cycle and scalability requirements.

4. The system is based on component or integration needs.

5. The need for business process reengineering.

2. Architecture layering and classification

Architecture classification can be subdivided into business architecture, application architecture, technical architecture, code architecture, deployment architecture,

Business architecture is strategy, application architecture is tactics, and technical architecture is equipment. Among them, the application architecture connects the past and the next, on the one hand, it undertakes the implementation of the business architecture, and on the other hand affects the selection of technology.

Familiar with the business, form a business architecture, make a corresponding application architecture based on the business architecture, and finally implement the technical architecture.

How to choose a suitable application architecture for the current needs and how to face the future to ensure a smooth transition of the architecture is a question that software developers, especially architects, need to think deeply.

1. Business architecture (overview architecture):

Including business planning, business modules, business processes, splitting the business of the entire system, designing the domain model, and transforming real business into abstract objects.

There is no optimal architecture, only the most appropriate architecture. All system design principles must be based on solving business problems as the ultimate goal. Technical sentiment architecture that is out of the actual business will often bring the system into a big hole. Any architecture that is not based on business whimsical They are all hooligans.

The prerequisite for all problems is to figure out how big the business volume we are facing today, what is the growth trend, and the process of solving high concurrency must be a step-by-step process. A reasonable structure can predict business development 1 to 2 years in advance. In this way, a reasonable price can be paid in exchange for the effect of technology leading business growth.

Take a look at the Jingdong business structure (online sharing diagram):

2. Application architecture (profile architecture, also called logical architecture diagram):

The abstraction from hardware to application, including abstraction layer and programming interface. Application architecture and business architecture are in a complementary relationship. Every part of the business architecture has an application architecture.

similar:

Application architecture: As an independent deployable unit, an application defines a clear boundary for the system, which profoundly affects system function organization, code development, deployment, and operation and maintenance. The application architecture defines what applications the system has and how the applications are divided. And cooperation. The so-called application here is each logic module or subsystem.

There are two key points in the application architecture diagram:

1. Responsibilities: Clarify the application (each logic module or subsystem) boundary

1) Logical layering

2) Subsystem and module definition.

3) Key categories.

2. Collaboration between responsibilities:

1) Interface protocol: the interface for external output of the application.

2) Collaboration relationship: the calling relationship between applications.

There are two ways to apply layering:

There are two ways to apply layering:

One is horizontal division (horizontal), which divides applications according to functional processing order, such as dividing the system into web front-end/intermediate services/back-end tasks, which is a division of business depth.

The other is vertical division (vertical), which divides applications according to different business types. For example, the invoicing system can be divided into three independent applications, which is a division for business breadth.

The combination of applications reflects how applications work together to complete complex business cases, which is mainly reflected in the communication mechanism and data format between applications. The communication mechanism can be synchronous call/asynchronous message/shared DB access, etc. The data format can be text /XML/JSON/Binary etc.

The division of the application is biased towards the business and reflects the business architecture, and the bias of the application is towards the technology, which affects the technical architecture. The division reduces the business complexity, the system is more orderly, and the technical complexity is increased, and the system is more disorderly.

The essence of application architecture is to balance the complexity of business and technology through system splitting, and to ensure that the system is not scattered.

What kind of application architecture the system adopts is affected by business complexity, including enterprise development stage and business characteristics; at the same time, it is affected by technical complexity, including IT technology development stage and the level of internal technical personnel. Business complexity (including large business volume) will inevitably bring about technical complexity. The goal of application architecture is to solve business complexity while avoiding technical complexity and ensuring the implementation of business architecture.

Three, data architecture

The data architecture guides the design of the database. It is not only necessary to consider the database and entity model involved in the development, but also the design of the data storage in the physical architecture.

Four, code architecture (also called development architecture):

The subsystem code architecture mainly provides practical guidance for developers. If the code architecture is not designed enough, it will affect the overall architecture design. For example, different development teams in the company use different technology stacks or components, and as a result, the company's overall architecture design will get out of control.

The main definition of the code architecture:

1. Code unit:

1. Configuration design

2. Framework and class library.

2. Code unit organization:

1. Coding standards, coding conventions.

2. Project module division

3. Top file structure design, such as mvc design.

4. Dependency

Five, technical architecture

Technical architecture: Determine the actual operating components (lvs, nginx, tomcat, php-fpm, etc.) that make up the application system, the relationship between these operating components, and the strategy to deploy to the hardware.

The technical architecture mainly considers the non-functional characteristics of the system, and has a system-level grasp of the system's high availability, high performance, expansion, security, scalability, and simplicity.

The design of the system architecture requires the architect to have excellent knowledge of the functions and performance of the software and hardware, which is also the most difficult task in the architecture design work.

Guess you like

Origin blog.csdn.net/wxb880114/article/details/112850865