Knocking on doors leading architect

Recently we learned some knowledge about the architecture of the wanted everyone to share. As the saying goes, I do not want to architect programmer not a good cook. So how do you become an architect do? Next to chat with some of my thoughts.

What is the architect

Before the students asked me to do a few years technology, management should turn or turn architects? For the students, I gave him the answer is that you have to get down to do the work now. Because, he raised the issue of view, it should be soon joined the line or be enrolled in school.

Concentrate on technology, wants to be an architect. But the architect did not mean that technology can be transferred in a long time. As knowledge increases your depth and breadth of the work will play a more important role, greater responsibility, and ultimately will naturally come into contact with the architectural design work.

The main architect of the work, in fact, is the use of architectural design knowledge and a wealth of experience in the design of architecture, combined with the actual situation, make a choice at different options.

The real purpose of architecture design?

Why should architecture design? Because the architecture is very important? But why is it important? It seems to say.

Because it can improve the efficiency of development? Not necessarily because only simple design will enable greater development efficiency. The architecture design for many reasons, will be forced to introduce some complexity, so the architecture does not necessarily enhance the development efficiency.

For most of the population of "high availability", "high performance", "extensible" it? In fact, no. Our system may not necessarily need them.

What the real purpose of architecture is it? I think the real purpose of architecture is to fight with the complexity of the system.

The complexity of the source systems are: high performance, high availability, scalability, low cost, safety, scale .

Earlier we talked to some systems may not require high availability, high performance. Some students may not understand that software development is it not the most basic requirements? This argument is there is a certain bias. We give a simple example to explain.

If you could design a student information management system as a school. For the above-mentioned several sources of complexity, you will make a choice? Let's analyze one by one.

The first is the high-performance, school students up to tens of thousands of people also, but usually it is impossible to tens of thousands of people at a time system. So we do not need to consider high performance. CRUD data directly relational database is sufficient.

Then is high availability, systems for students, even a few hours of downtime, the impact will not be much. However, to ensure the reliability of the data or, if a large amount of data is lost but no backup, data recovery will be a lot of work. So here we need to do some high data reliability design.

Next is the scalability, student management system is generally more stable, the situation does not appear to be expanded. So we did not quite need to consider scalability.

At this point, we are in the design of highly available systems used to be considered, performance and scalability, in this system do not require too much attention. Let us look at the few remaining sources of complexity.

About low cost, since we do not need high availability and high performance design, so the cost of several servers for schools is also cause for concern.

In terms of security, student information requires a certain security guarantees, but also do not have to do the level of financial security. So only need to do database rights management, password management is sufficient.

Finally, the size of the system, student management systems are often not very complex. Many iterations will not function. So the scale is relatively fixed and relatively small, it will not bring a lot of complexity.

As can be seen from our analysis, student management system is not a complex system, we really need to focus on consideration only high data reliability and data security in two ways. The face of complex systems, we should follow this step to think about and design a reasonable framework. In justified cases, to minimize the complexity of the system.

Architecture design principles

We mentioned earlier, the architect of the work is actually to make a reasonable choice in a variety of options, choose no right or wrong, only the appropriateness of a say. For better choice, architecture design should follow three principles: the right principle, simple principle, the principle of evolution . Let me introduce one by one these three principles.

Suitable principle

We have been saying, architecture design architect to make a choice, choose the right architecture. The reason has always stressed the right, because we need the actual situation in the architecture design process to consider.

So from the actual situation of the design is usually what happens then? I do not know if you have not encountered such a demand in the development: "We decided to do an electricity supplier website to do exactly the same as a right in accordance with Taobao." Then you must be developed as a black question mark face, my heart will be Wan horses galloping.

The same is true in the architecture design, the most taboo is regardless of the actual situation, blindly using industry best architecture design. Some students may not understand, what's wrong with using the optimal design of it?

Here we are talking about the actual situation is your business. Imagine if your business has just started, QPS just over one hundred, then, you design the architecture is capable of supporting 1000QPS or 3000QPS no difference for the system. But for the development costs for the upgrading of more than 3 times. And for such a body volume of business, the development team is generally only a dozen people or so the size of dozens of people. Want this team to develop it, a large probability can not be completed.

The principle of evolution

Talk over the right principle, let us chat with the principles of evolution. Like Beijing's urban planning, as it must be to have a second ring, and slowly expanded outward, and eventually had three four five six rings. Most software we use today, are also through many iterations versions only now functions.

For a qualified architect, we first have to follow the right principles, then gradually evolved. We must not think of one step, resulting in over-designed. When a business develops to a certain stage, we will inevitably need to extend the schema, reconstruction and even rewrite. In this process, we should keep under good design, bad design to perfect. Like Taobao architecture, which is experiencing a number of "double-October" After that, only now this can support hundreds of billions of daily turnover architecture.

Therefore, the second principle is the principle of gradual evolution in the design of our architecture to be followed, rather than pursuing one step.

Simple Principles

Finally, the principle is simple. Earlier we also said, in fact, is in architecture design and complexity of the system to fight. Why have a simple principle? I think there are two main reasons.

First, more complex architecture development costs. In the case of limited development resources, if our architecture design is very complex, it is bound to enhance the development costs. As for today's fast-growing market, time is life. If you design the architecture development cycle is very long, then the company might have to abandon the project, the architecture there is no meaning of existence of.

Second, complex architectures tend to bring more failure. For chestnuts, electric toothbrushes and toothbrush compared to ordinary, bad probability will be higher, the electric toothbrush head wear, electrical problems, etc. charging failure may occur, and the situation will only ordinary toothbrush brush wear occurs. In other words, the more the components of the system, the greater the probability of system failure. On this basis, there is a problem is that, once a fault, locate the problem in terms of speed, compared to the complex system simple system also has a great advantage.

So far, the three principles of architecture we have talked over. Observant students may have noticed, I'm not in the same order and the order mentioned at the beginning of detail. This is not my attention to detail. But I was in detail, the importance of these three principles in a row sequence. This is also the architect as a choice, when three kinds of principles can not be met at the same time, which should be as the most important? Here is my answer proper> evolution> simple .

About architecture, I already have a general awareness, I do not know if after reading this article you have the same feeling. If there is any confusion, and I welcome the discussion of the exchange.

Finally, the architect is the need for deep technical accumulation, and I have not done enough in this regard. So the back or to the accumulation of technology-based, but also try to design the architecture of knowledge into the daily work. What follow-up to a new experience and I will continue to share.

Guess you like

Origin www.cnblogs.com/Jackeyzhe/p/11862917.html