Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to establish the architect's three-dimensional thinking?

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

On the way from programmer to architect, the "four-dimensional Architecture Design Methodology" summarized by teacher Cai Xueyong is very helpful to me, which gives me a more three-dimensional and systematic understanding of architecture design. I will now share the learning experience for the reference of the children in need.

This set of methodology divides and treats the problem domain into small squares that can be easily dealt with through the three dimensions of space (X, Y, Z) and time T dimension. At the same time, the three dimensions of space (X, Y, Z) work together to provide solutions for problems that can not be solved by a single dimension. The time T dimension decomposes the problem into a time range and solves it step by step according to the rhythm. Multi-dimensional, three-dimensional, hierarchical, dynamic evolution, this is my summary of the characteristics of this set of methodology. Next, let's go into this four-dimensional architecture and take a look at it!

Fig. 1 four-dimensional coordinate system

Front and back dimension (X1 … X7)

The front and back-end dimensions are divided into four layers: interaction, business, domain and resources, in which the business can be subdivided into application X2 and framework X3, the domain can be subdivided into service X4 and core X5, and resources can be subdivided into proxy X6 and data X7, which is divided into seven levels. Service X4 can implement API and, if exposed, is an open interface that invokes the interface of the service layer, usually requiring authorization. Agent X6 can implement SPI, isolate coupling, and prevent core X5 from relying on specific external systems or databases. Each layer achieves high cohesion and low coupling between layers.

Fig. 2 X-axis hierarchical structure

In the process of system implementation, we can comprehensively consider the current situation, X2 application and X3 framework can not be split, X4 service and X5 core can not be split, and then the layering can be reconstructed when the time is ripe, so that the scope of change is only internal.

Table 2 X-axis seven-tier architecture model and its positioning

Stratification type

Hierarchical name

Color

Code name

Hierarchical positioning

Interaction

Interface layer

Red

X1

The interface is more like an extension of the user than an extension of the application. The interface can be treated as a user agent. Develop various user interfaces according to user preferences, language, platform (mobile phone, computer, tablet, etc.).

Business

Application layer

Orange

X2

An application can have multiple interfaces, according to market requirements, develop a variety of applications, and display in the way of interfaces.

Frame floor

Yellow

X3

The commonly used application process is designed into a framework, and when the same type of application is developed later, the application can be easily customized and the development cost can be reduced as long as the parameters or DSL are used. The framework can also be open to external calls in the form of interfaces.

Domain

Service layer

Green

X4

The service layer operates on domain objects and provides flexible invocation interfaces. The number of service layer interfaces is usually small, but each interface usually has a considerable number of parameters. The service layer has no state and no caching.

Core layer

Blue

X5

The core layer reflects the domain model, and the interface of the core layer is basically to operate this domain model. Establish a domain model, on the one hand, help interface design, on the other hand, help data storage design, sort out the flexible storage mode.

Resources

Agent layer

Indigo

X6

It has the following functions: data proxy, representing external system or database; caching, for efficiency or improving availability (when external system is offline); data module, supporting read-write separation; transfer or forwarding, transfer to external system, forward to log system; data backup system (through event hook); hot backup system access.

Data layer

Purple

X7

Data is the most important asset of the company. Depending on the characteristics of the data, the database can be: relational database; column database; Associative DB; Key-Value; file database; log.

Business dimension (Y1. Yn)

It is divided from the business dimension, and the system is classified according to the business type. The division of business systems depends more on business domain knowledge, and the most commonly used methodology for this dimension design is domain-driven design (DDD).

When a business system on the Y-axis needs to call another business system on the Y-axis, taking into account efficiency and coupling, this set of architecture design methodology gives specific architectural principles:

When the public system is invoked, the invocation is treated as an internal call, that is, the service can invoke the service directly. Considering that the public system is relatively stable and will not change often, direct call can reduce the calling link and ensure the efficiency. When the non-public system is called, the call will be regarded as an external call, that is, the external service interface of the called system will be called through the proxy layer. This is equivalent to connecting the two systems in series, reducing the coupling between the systems, the subsequent changes in the called system, and the impact on the calling system can also be isolated through its proxy layer.

Figure 3 invocation relationship between different business systems on the Y axis

System Dimension (Z1...Zn)

This dimension focuses on the architecture of business-independent systems such as software, containers, runtime, operating systems, virtual machines, and hardware. Z-axis system can be used for front-end optimization, application optimization, platform optimization, resource optimization and other aspects.

Fig. 4 hierarchical structure of Z axis

Time dimension (T1 … Tn)

For a new product, the architecture is not formed at once, and it has to go through a process of continuous evolution from initial to mature. For an existing product, the optimization of the architecture should also be implemented step by step according to the actual situation. In addition to technical considerations, we also need to consider the market and investment.

Usually, in the early stage of research and development, the positioning of the product itself is not very clear, and it is necessary to quickly iterate into the market to gain first-mover advantages, verify ideas, and constantly define the positioning of the product. At this stage, product demand changes very frequently, and the drivers of many architectures are not yet clear. if you pay too much attention to the architecture, the product will be introduced to the market in the distant future. With the gradual clarity of product positioning, the drivers and constraints of architecture have gradually surfaced, at this time the importance of architecture design has emerged. In addition, we also need to adjust the architecture design according to the investment budget. If the investment is abundant, then we can invest more manpower to study the architectural drivers in advance, and even provide multiple sets of options for uncertain constraints.

So much for sharing here, and then I will continue to share the architectural design experience of various dimensions. Please remember to follow if you are interested. Originality is not easy, if you think it is valuable, please move your fingers to click "like", veteran brother will be more motivated. In addition, I will continue to share career planning, job interviews, skills improvement, influence building and other experiences, pay attention to "IT veterans", empower the process of life!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report