Know what is architecture

Table of contents

​edit 

1. What is the structure

 1.1 System and Subsystem

 1.1.1 System

1.1.1.1 Association

 1.1.1.2 Rules

 1.1.1.3 Capabilities

1.1.2 Subsystems

 1.2 Modules and Components

 1.2.1 Modules

 1.2.2 Components

 1.3 Framework and Architecture

 1.3.1 Framework

 1.3.2 Architecture

 1.3.2.1 Architecture Definition

 1.3.2.2 Architecture Composition

 1.3.2.2.1 Elements

 1.3.2.2.2 Structure

1.3.2.2.3 Connection

 1.3.2.3 Summary

 1.3.2.4 My understanding of architecture

 1.3.2.4.1 Systematic Thinking for Rational Decision-Making

 1.3.2.4.2 Structure

1.3.2.4.3 Connection

1.3.2.4.4 Specifications

 Second, the purpose of architecture design

 2.1 Problems caused by no architecture design

 2.1.1 The boundaries of application services are not very clear

 2.1.2 The application service level is not clear and the system coupling is serious

 2.1.3 System application service tracking problem

 2.1.4 System service monitoring issues

2.1.5 Technology system out of control

 2.2 The role of architecture design

 2.2.1 Systematic Thinking for Rational Decision-Making

 2.2.2 Clear System Skeleton

 2.2.3 System collaboration relationship

 2.2.4 Constraint Specifications and Guiding Principles

 2.3 Purpose of architecture design

 2.3.1 Managing Complexity

 2.3.2 Improve efficiency

 2.4 Prerequisites for architecture design

 2.4.1 Relatively complex requirements

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

 2.4.3 The system has a long life cycle and has scalability requirements

 2.4.4 The system is based on the needs of components or integration

 2.4.5 The need for business process reengineering


1. What is the structure

In the software industry, there are many debates about what is architecture, and everyone has their own understanding. In different books, different authors have different definitions of architecture, with different perspectives and different definitions. The structure of what you say is not necessarily the same as the structure that you understand. Therefore, before we discuss the architecture, we first discuss the concept definition of the architecture, because the concept is the basis for people to understand the world and the means for communication. If the understanding of the architecture concept is different, then the communication will naturally not be smooth.

Linux has an architecture, MySQL has an architecture, JVM also has an architecture, and business systems that use Java development, MySQL storage, and running on Linux also have an architecture. Which one should we focus on? To clarify the above issues, it is necessary to sort out several related and similar concepts: system and subsystem, module and component, framework and architecture.

 1.1 System and Subsystem

 1.1.1 System

It generally refers to a group composed of a group of related individuals, operating according to certain rules, and able to complete the work ability of individual components that cannot be completed independently.

Keywords: association, rule, ability

1.1.1.1 Association

A system is composed of a group of related individuals, and unrelated individuals cannot form a system. For example, putting together an engine and a PC cannot be called a system, but only a combination of the engine, chassis, tires, and frame can become a car.

 1.1.1.2 Rules

Individuals in the system need to operate according to the specified rules, rather than a single individual acting independently. The rules stipulate the way of individual division of labor and cooperation in the system. For example, a car engine is responsible for generating power, which is then output to the wheels through the transmission and drive shaft to drive the car forward.

 1.1.1.3 Capabilities

There is an essential difference between system capability and individual capability. System capability is not the sum of individual capabilities, but a new capability. For example, a car can carry a load forward, but the engine, transmission, drive shaft, and wheels themselves do not have this ability.

1.1.2 Subsystems

Also a system consisting of a group of related individuals, probably part of a larger system.

 1.2 Modules and Components

They are all part of the system, just disassemble the system from different angles. Modules are logical units and components are physical units.

 1.2.1 Modules

The module is to logically decompose the system, that is, divide and conquer, and simplify complex problems. The granularity of a module can be large or small, and it can be a system, several subsystems, a service, function, class, method, function block, and so on. The main purpose of dividing modules is separation of duties.

 1.2.2 Components

Components can include application services, databases, networks, physical machines, and technical components such as MQ, containers, and Nginx. The main purpose of partitioning components is unit reuse. The English word Component of "component" corresponds to the Chinese word "part", and "part" is easier to understand. "Part" is a physical concept, and has the characteristics of "independent and replaceable".

 1.3 Framework and Architecture

 1.3.1 Framework

A framework usually refers to a software component specification to implement a certain industry standard or complete a specific basic task, and also refers to a software product that provides the basic functions required by the specification to implement a certain software component specification.

A framework is a specification for component implementation, such as MVC, MVP, MVVM, etc. It is a product that provides basic functions, such as an open source framework: Ruby on Rails, Spring, Laravel, Django, etc., which can be used directly or based on this secondary development. For another example, SpringMVC is an MVC development framework. In addition to meeting the MVC specification, Spring provides many basic functions to help us realize functions, including annotations (@Controller, etc.), Spring Security, SpringJPA and many other basic functions.

 1.3.2 Architecture

 1.3.2.1 Architecture Definition

In TOGAF9, it is defined as follows: the basic components of a system (subsystem, module, component), reflected in its various components, the relationship between components, the relationship between components and the environment, and the principles of governance for system design and evolution middle. Two meanings:

* A formal description of a system, or a detailed plan at the component level to guide the implementation of the system;
* The structure of a set of components, the interrelationships between components, and some principles and principles governing the design and evolution of these components over time guide strategy.

Architecture, literally, is an architectural term derived from ancient times. Split the structure into two words "frame" and "structure". "Frame" is the combination of "plus" and "wood". The wood is added and connected to form a frame. "Construction" means structure. Therefore, "architecture" is to connect "wood" according to a certain structure.

 1.3.2.2 Architecture Composition

 1.3.2.2.1 Elements

Corresponding to software architecture, "wood" represents components (elements), and "structure" represents the product of architecture:

Wood is the elements in the system, we call them architectural components (elements). Architecture elements can be **subsystems, modules, application services, components**.

 1.3.2.2.2 Structure

**Structure** is a product of architecture. Different software systems will have different structures, which are designed to solve different scenarios.

1.3.2.2.3 Connection

**Connection** realizes the connection between architectural elements by defining the interface, interaction relationship and integration mechanism between architectural elements. Connections can be distributed calls, inter-process calls, interactions between components, etc.

 1.3.2.3 Summary

Summarize the composition of the architecture = elements + structure + connection, and connect and interact system elements according to a specific structure.

 1.3.2.4 My understanding of architecture

I am redefining the architecture here (different opinions, independent thinking): software architecture refers to the top-level structural design of software systems. Architecture is the most reasonable decision under the constraints of existing resources after systematic thinking and weighing the pros and cons, and finally a clear system skeleton: including subsystems, modules, and components. As well as the collaborative relationship between them, constraint specifications, and guiding principles. And it guides the design of all aspects of the system and guides everyone in the team to agree on the ideological level.

 1.3.2.4.1 Systematic Thinking for Rational Decision-Making

For example, technology selection, solution implementation plan (including implementation target plan), cost evaluation, cost performance evaluation and so on.

 1.3.2.4.2 Structure

Clear system skeleton (structure): It is clear which components the system consists of.

1.3.2.4.3 Connection

System collaboration relationship: how the various components cooperate to realize the business request.

1.3.2.4.4 Specifications

Constraint norms and guiding principles: ensure orderly, efficient and stable operation of the system, including norms, principles, processes, etc.

 Second, the purpose of architecture design

 2.1 Problems caused by no architecture design

If there is no architectural design, it means that your system is not complex enough. As the business grows, the system gradually evolves from a single application to distributed and micro-service. The overall complexity of the system is getting higher and higher, and the technical team may change from one team to multiple specialized teams. If there is no architectural design, the system will be in a state of disorder and out of control.

 2.1.1 The boundaries of application services are not very clear

There is no clear principle on how to split. R&D personnel split for the so-called micro-service, rather than considering the current business. It leads to a disordered state of the system and low development efficiency.

 2.1.2 The application service level is not clear and the system coupling is serious

This leads to a network-like dependency structure of service dependencies, which affects the whole body and makes subsequent modification and expansion difficult.

 2.1.3 System application service tracking problem

Due to the complex logic of the system after micro-service, it is difficult for you to quickly locate and fix the problem after a problem occurs in the service. For example, we have stepped on a lot of pitfalls before. We use dubbo as a service. Once there is a problem with the system, people will be in a hurry.

 2.1.4 System service monitoring issues

Since R&D personnel basically have no awareness of service monitoring, they always try to find a way to add a service monitoring interface after a problem occurs.

2.1.5 Technology system out of control

Different development teams use different technology stacks or components, causing the company's internal technology architecture to get out of control. Even R&D personnel use application projects to test new technologies in pursuit of fashionable and trendy technologies.

 2.2 The role of architecture design

The purpose of architecture design is to solve the problems caused by the complexity of the system. Its essence is to reconstruct the system in an orderly manner so as to conform to the current business development and allow rapid expansion.

 2.2.1 Systematic Thinking for Rational Decision-Making

 2.2.2 Clear System Skeleton

 2.2.3 System collaboration relationship

 2.2.4 Constraint Specifications and Guiding Principles

 2.3 Purpose of architecture design

The essence of architecture is to manage and solve the complexity of the system and improve efficiency.

 2.3.1 Managing Complexity

Restructure the system in an orderly manner, continuously reduce the "entropy" of the system, make the system continuously evolve, and improve the internal structural changes for the purpose of software quality

 2.3.2 Improve efficiency

Restructure the system in an orderly manner to meet the current business development and allow for rapid expansion.

 2.4 Prerequisites for architecture design

No matter what kind of change, the architect understands the business, controls the overall situation, weighs the business needs and technology implementation, selects the appropriate technology, solves key problems, guides the implementation of research and development, promotes business development, and improves efficiency. So what kind of system should be considered for architecture design? Technology will not come out and develop self-driven for no reason, but the development and requirements of architecture are driven by business.

 2.4.1 Relatively complex requirements

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

 2.4.3 The system has a long life cycle and has scalability requirements

 2.4.4 The system is based on the needs of components or integration

 2.4.5 The need for business process reengineering

If you think it is helpful to you, welcome to like + bookmark + follow!

Guess you like

Origin blog.csdn.net/qq_25409421/article/details/131990890