Thinking about the nature of software architecture

What is the architecture?

Architecture originated from the field of construction, such as building bridges, building houses, and laying foundations.
The ancient working people full of wisdom decomposed complex buildings into common structural components according to their characteristics. The
same is true for software.
As long as people subjectively decompose and assemble them, the concept of architecture is used.
Insert image description here

Let’s talk about software architecture

Software architecture is a scientific method for software engineers to define the system architecture when designing a software system.
It refers to the way a software system is organized with software engineers focusing on functionality, performance, and security quality attributes.
In other words, software architecture is a technical means of dividing a software system into modules to achieve specific functions.
Insert image description here

1: Software architecture is mainly composed of three elements.
Module structure : Module structure is a structure that divides the software system into different modules to achieve specific functions.

Framework structure : The framework structure is a structure that organizes the various modules of the software system according to a certain organizational form to achieve specific functions.

Component structure : Component structure is a structure in which a software system is composed of different components
to achieve specific functions.

2: Architecture layering
2.1: Business architecture
includes business planning, business modules, business processes, business splitting of the entire system, involving domain models, and transforming real businesses into abstract objects

There is no optimal architecture, only the most appropriate architecture. The design principles of all systems must be to solve business problems as the ultimate goal. Technical and emotional architecture that is divorced from actual business will often bring big pitfalls to the system.

It is necessary to understand how big the business volume is and what the growth trend is, and the process of solving high concurrency must be a step-by-step process.
Insert image description here

2.3: Application architecture
Abstraction from hardware to application, including abstraction layer and programming interface. Application architecture and business architecture are complementary to each other. Each part of the business architecture has an application architecture.
Insert image description here
As an independently deployed unit, the application architecture defines a clear boundary for the system, which profoundly affects the system's functional organization, code development, deployment and operation and maintenance. The application architecture defines what applications the system has, and How applications divide labor and cooperate

2.3: Data architecture
Data architecture guides the design of the database. Not only the database and entity model involved in development must be considered, but also the design of data storage in the physical architecture must be considered.

Insert image description here

2.4: Code architecture

①. Code unit

Configuration design

Frameworks and class libraries.

②. Code unit organization

Coding standards, coding conventions.

Project module division

Top-level file structure design, such as mvc design.

Dependencies

Insert image description here
2.5. Technical architecture

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

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

The design of system architecture requires architects to have excellent knowledge of the functions and performance of software and hardware. This is also the most difficult task in architecture design.

2.6. Deployment topology architecture diagram (actual physical architecture diagram)

The topological architecture, including how many nodes are deployed in the architecture, the relationship between nodes, the high availability of servers, network interfaces and protocols, etc., determines how the application runs, the performance, maintainability, and scalability of all architectures. Foundation. This diagram is mainly the main focus of operation and maintenance engineers.
Insert image description here
The physical architecture mainly considers hardware selection and topology, software-to-hardware mapping, and the mutual influence of software and hardware.

3: Levels of architecture
System level: that is, the relationship between various parts of the entire system and how to govern it: layered

Application level: that is, the overall architecture of a single application and its relationship with individual applications in the system.

Module level: that is, the module architecture within the application, such as code modularization, data and status management, etc.

Code level: that is, ensuring architecture implementation from the code level.

4: Strategic design and tactical design

Based on the architecture pyramid, we have the perfect combination of strategic design and tactical design of system architecture:

Strategic design: Business architecture is used to guide architects on how to design system architecture.

Tactical design: The application architecture should be designed according to the business architecture.

Tactical implementation: After the application architecture is determined, it is time to select the technology.

Architecture is systematic thinking , weighing the pros and cons to make the most reasonable decision under existing resource constraints, and finally clarify the system skeleton: including subsystems, modules, components and the collaborative relationship between them, constraint specifications,
up to principles, involving 4 aspects :
01: Reasonable decisions based on systematic thinking: such as technology selection, solutions, etc.

02: Clear system skeleton: clarify what parts the system consists of.

03: System collaboration relationship: how each component collaborates to achieve business requests

04: Constraint specifications and guiding principles: ensure the orderly, efficient and stable operation of the system.

Guess you like

Origin blog.csdn.net/weixin_49543015/article/details/131244258