当前位置:网站首页>Capabilities required by architects

Capabilities required by architects

2022-06-25 12:56:00 Wenxiaowu

Preface   

         Everything needs architecture , For example, the functional departments of the state , There is the State Council / Industrial and Commercial Bureau / Education Bureau, etc . The organizational structure of the enterprise , There is a research and development department / The Marketing Department / Product department, etc .

         Every department under the organizational structure , There will be many roles , For example, the R & D department , There is the director of Technology Department , technology Leader, Technical architect , R & D Engineer, etc , Each role plays its own role value .

         The ability of architects in Internet enterprises will determine the quality of software systems , This is reflected in maintainability , Extensibility , cost , Business support efficiency, etc .

         Today, let's talk about the core competencies needed to do a good job as an architect , This capability includes an architect's mindset , The architectural principles that architects have , Architects are well aware of the quality attributes of architecture and the importance of programming SOLID principle . Of course, when doing architecture design, you also need to know the architecture CAP Theorem .

01 The thinking pattern of architects

     The core job of an architect is to manage complexity , Solve complex problems . To solve complexity, we need to use abstraction 、 layered 、 Divide and evolve 4 Xiang thinking .

    1.  abstract : Architects need to look at the big picture , Hidden details , The abstraction ability of architects , Determine the complexity and scale of the problem to be solved . When doing Architecture , You need to form abstract concepts first , In the process of module detail design , First macro then micro .

    2.  layered : Layering and splitting is one of the architectural patterns that architects need to master , The key is to reduce the coupling between systems , Improve team cooperation efficiency .

    3.  Divide and conquer : The architect needs to decompose the problem , Big problems are decomposed into small problems , Small problems are decomposing small problems , Solve the core problem first , Issues that affect the quality elements of the architecture .

    4.  Evolution : Architecture is designed , Also evolved , The third part depends on design , Seven points depend on evolution , Architects need to design the architecture according to the evolution of business development , Avoid cutting corners .

02 The architectural principles that architects have  

     Architects need to know 6 This architecture principle , They are hierarchical splitting 、 asynchronous 、 Usability 、 automation 、 Security 、 Distributed .

    1.  Layered splitting : Reduce the coupling of the system by layering , Through the three-tier architecture , Each layer focuses on its own responsibilities ; Improve the efficiency of collaborative development through splitting , Generally, the system is divided according to team responsibilities .

    2.  asynchronous : Improve system availability and response speed through asynchronous peak shaving , Especially in case of instantaneous flow , Ensure system availability when the system cannot be expanded immediately .

    3.  Distributed : By abstracting common modules , Achieve distributed services , So as to improve the horizontal telescopic capacity , For example, distributed applications , Distributed database , Distributed storage .

    4.  Cluster redundancy : The core challenge of the Internet is high concurrency 、 Large flow , The network is complex , Safety environment, etc , Through cluster redundancy , Active and standby disaster recovery can be performed in case of failure ,IDC Disaster recovery, etc .

    5.  automation : The core challenge of distributed systems is complexity , The operation and maintenance cost is high , Improve the automation of architecture governance , Automate problem discovery , location , Call the police , Fail over , Current limiting and degradation can improve the stability of the system .

    6.  Safety prevention and control : The Internet is safe , But because someone studies security, it becomes unsafe , So the architecture also needs some technical security measures , such as HTTPS, Storage encryption ,Web Safety risk control ,DDoS Defense and other means to improve the security of the system .

03 Architecture quality attributes that architects know well

     Architects are building software systems , Besides knowing 6 Item architecture principle , You also need to transform the schema into an architecture quality attribute , Enhance the customer experience , Organizational efficiency , Specific mapping to performance 、 Usability 、 Security 、 cost 、 Scalability 、 Extensibility .

    1. performance : Performance is the user's first experience when accessing the system , Performance is too slow , It will gradually reduce the patience of users , Finally leave . Optimizing performance requires from the client - The Internet - Server side - Data layer by layer optimization , Improve the response time of the system , throughput , Concurrency number .

    2. Usability : In case of traffic peak , fault , In case of network problems , Be able to quickly discover 、 Rapid positioning , Rapid recovery capability . Common methods include load balancing , Master slave backup , Current limiting the drop , Multi machine room disaster recovery deployment .

    3. Scalability : In the past, the hardware capability was improved by purchasing minicomputers , So as to improve the system capacity , But the high concurrency of the Internet , No matter how the vertical hardware capability is improved , Eventually it will touch the ceiling , The Internet improves its scalability mainly through distributed deployment , Through the load balancing algorithm to achieve balanced distribution of traffic .

    4. Extensibility : Mainly from the later maintenance cost , And new business support efficiency , Close by opening and modifying extensions , Avoid the impact of new requirements on old businesses .

    5. Security : The core is to ensure the integrity of user data in network transmission , Avoid being tampered with . In case of an attack, the system can be as stable as Mount Tai , No system downtime . Over the Internet , Ensure confidentiality when storing data , For example, passwords cannot be transmitted in clear text .

    6. cost : Large Internet traffic , Means bandwidth , machine , Storage ,CDN Resources all require huge costs , How to reduce the cost of various resources , Labor cost , The necessary work to become an architect .

04 Programming SOLID principle

      Architects do software architecture , According to the architectural principles 、 Guiding principles such as architecture quality attributes improve the scalability of the system , Maintainability, etc , You also need to have the ability to program SOLID principle , In guiding R & D students ,CR, Give specific guidance during scheme review , Avoid leaving the architecture on paper .SOLID Each letter represents a principle .

    1. Opening and closing principle : Open to expansion , Turn off for changes .

    2. Interface isolation principle : Interfaces are kept to a minimum of simplification and granularity , Avoid client dependencies on unwanted interfaces , Simply understand that you only need to expose the necessary interfaces .

    3. Li substitution principle : After the child class replaces the parent class , The function operates normally .

    4. Principle of single responsibility : A class has only one responsibility , If you change a class for a variety of reasons , It does not belong to the principle of single responsibility .

    5. The principle of Dependence Inversion : Upper module ( Users ) And lower modules ( By the user ) All depend on the middle abstraction layer , The upper modules rely on abstract injection capabilities , Lower level modules implement abstract business logic .

05 framework CAP Theorem

    C It's consistency ,A It's usability ,P It's partition fault tolerance . However, in software architecture design, it is generally impossible to meet CAP Theorem .

     For example, the financial system requires high consistency , In order to achieve consistency , Availability may be sacrificed . Software design , Generally, the availability of the system will be improved through backup redundancy , But backup redundancy will cause data synchronization ( Data needs to be synchronized between different replicas ), There must be a delay in the data , So the high consistency of the financial system , Behind this is the reduced availability . But with the development of the system , Reduced availability does not mean that the system is completely unavailable , When there is a problem , Achieve basic availability , Or the core link service is available , Other functions are degraded .

     In turn, , Internet companies are more concerned about high availability , Sacrifice consistency , But with the development of the system , Consistency is not a real sacrifice , Just a brief inconsistency , Eventually, there will be final consistency , For example, by parsing mysql binglog Complete replica data synchronization to achieve final consistency .

06 summary

     The above is a simple and concise introduction to the capabilities of architects , Each concept under each category is a very big topic , It is worth studying carefully , Improve your architecture ability .

     Recommended reading :《 Distributed architecture of large websites 》

原网站

版权声明
本文为[Wenxiaowu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206251209320297.html