当前位置:网站首页>Software architecture
Software architecture
2022-06-22 14:46:00 【Tcoder-l3est】
Chapter 5 Software architecture
design process
• Design is a creative process , It considers how to meet the needs of all customers ; The plan produced by design is also called design
• Early designs focused on the architecture of the system
• The subsequent design focuses on how to implement a single unit
• Most of the design work is routine design (routine design), Solve current problems by reusing and adjusting solutions to similar problems hhh It's real
• Software architecture also has general solutions , It's called architectural style
A variety of tools for understanding decisions and evaluating selected architectures : Design patterns 、 Design Convention 、 Innovative design 、 Design principles
Concept
Architecture Architecture: A software solution , Used to explain how to decompose a system into units , And how the units relate to each other , It also includes all the external features of these units .
Design patterns design pattern: A general solution for a single software module or a small number of modules , It provides lower level design decisions . It is a key aspect of a common design structure , Include objects and instances , Roles and collaboration , Allocation of responsibilities .
Design Convention Design Convention: A collection of design decisions and recommendations , It is used to improve the design quality of some aspect of the system . When a design convention matures , Will be encapsulated in design patterns or architectural styles , Finally can Can be embedded into a programming language structure .
Software architecture development process

modeling : Try possible decomposition
analysis : Analyze the preliminary architecture
Documentation : Document architectural decisions
review : Check that the architecture meets the requirements
And then form SAD Software architecture documentation
Exploded and views
• Popular design methods :
– Function oriented decomposition
– Feature oriented decomposition
– Data oriented decomposition
– Process oriented decomposition
– Event oriented decomposition
– Object oriented design
• When each activity of the system is only realized by the corresponding software unit , And the input and output of each software unit have been clearly defined , Design can be said to be modularization Of
• If the interface of a software unit can accurately specify the externally visible behavior of the unit , The software unit is called Well defined
modularization as well as Well defined concepts ?
• Common architectural views :
– Break down the view
– Dependent view
– Pan China view
– Execution view
– Implementation view
– Deployment view
– Assignment view
Architecture style
• Architecture style reflects the common structure and semantic characteristics of many systems in the domain , And guide how to effectively organize each module and subsystem into a complete system .
Definition : The software architecture style has been established 、 Large scale system structure pattern .
Six architectural styles :
Pipes and filters 、 Client and server 、 Peer-to-peer networks 、 Release - subscribe 、 Information base and layering

Data flow style
Pipes and filters , When the input and output data are transformed into a series of data components , This architecture can be applied .
The Conduit / filter 、 Batch sequences belong to the data stream style

• The system task is divided into several independent functional modules . These function modules are connected by data flow through the system .
• In the pipe - Filter style , Each functional module has a set of inputs and outputs . The functional modules are called filters (filters); function Connections between modules can be viewed as inputs 、 The path between output data streams , So it's called a pipe (pipes).
• The Conduit - Filter style characteristic One is the relative independence of the filter , That is, the filter completes its own functions independently , There is no need to interact with each other .

advantage
• The designer can input the whole system 、 The output characteristic is simply understood as the synthesis of various filter functions .
• Based on the pipeline - The filter style system has strong maintainability and scalability
• Support some specific analysis , Such as throughput calculation and deadlock detection
• The Conduit - The filter style has concurrency 、
shortcoming :
• Weak interactive processing capability
• The specific implementation is more complex
– Data stream synchronization problem
– Data encryption and analysis
Compiler pipeline filter style

Call return style
No textbooks
• Hierarchy style
The whole system is organized into a hierarchical structure , Each layer serves the upper layer , And as the next tier of customers .

example :ISO Network architecture
• advantage :
– The hierarchy style supports the level by level abstraction in the system design process
– The system based on hierarchy style has good scalability
– The hierarchical style supports software reuse
• shortcoming :
– Not every system can be easily divided into hierarchical patterns
– It's hard to find a suitable 、 The right level of abstraction .
C/S style
• The client / The server (C/S) Architecture is based on resource inequality , And for the sake of sharing .
•C/S The architecture has three main components : database server 、 Customer applications and networks .
Server provides services , The client accesses the service through the request response protocol
The client sends an executable function to the server , Ride back callback

• advantage :
– Interface and operation can be very rich
– High safety
– Fast response
• shortcoming :
– Narrow applicable surface
– The user base is fixed
– Maintenance costs are high
BS style
•B/S The architecture mainly utilizes the maturing WWW Browser technology , In particular, the browser embedded in a variety of scripting languages
•B/S The architecture has three main components : browser 、 Web The server 、 database server .

• advantage :
– It's easy to maintain and upgrade
– Strong interaction
• shortcoming :
– In terms of speed and security, it costs a lot to design
– Usually you need to refresh the page (Ajax Etc. can alleviate the problem to a certain extent )
Communication costs a lot
Meet the quality attributes
• Architectural styles can only achieve generally good properties . To ensure support for specific attributes , Specific strategies will be used :
– Modifiable property
– performance
– Security
– reliability
– Robustness,
– Ease of use
– Business objectives
Fault tree analysis
• Fault tree analysis method is used in system reliability analysis 、 It plays an important role in safety analysis and risk assessment . It can be used for both qualitative and quantitative analysis .
• In fault tree analysis , For the studied system Various fault states or abnormal working conditions are collectively referred to as fault events . The failure event corresponds to the success event . Both are called events .
• Fault tree is an inverted tree logic causality diagram established to study the fault of a certain function of the system
characteristic
• It is a graphic deduction , It is a logical reasoning method for fault events under certain conditions , For a fault event , Make layer by layer tracking analysis ( From top to bottom );
• This graphical approach is clear and easy to understand , It makes the logical relationship between the events described clear at a glance , Moreover, it is convenient for in-depth qualitative and quantitative analysis of the complex logical relationship between various events ;
• Because the fault tree links various possible factors of system fault , It can effectively find out the weak links of the system and the fault spectrum of the system , It is helpful to identify hidden dangers and potential faults of the system in the system design stage , In order to improve the reliability of the system ;
• Fault tree can be used as an image of management and maintenance personnel 、 Maintenance guide , It can be used for training 、 Maintenance and management personnel , It can be used to make maintenance plans and troubleshooting schemes
step
(1) Select the top event . Select a reasonable top event according to the actual needs of the project
(2) Establish fault tree
(3) Qualitative analysis of fault tree
a) Simplification of fault tree
b) Find the minimum cut set
(4) Quantitative analysis of fault tree
a) Find the probability of occurrence of the top event
b) Importance analysis
(5) Identify design weaknesses ( Find out the problem )
(6) Take measures to , Improve the reliability and safety of products
Common events and symbols

Pay attention to the middle and top yes hold
The bottom is round , The rest will not be used

Fault tree =》 Minimum cut set tree It's essentially Operation of logical expression

This A1 G5 Namely
G1 = G2 * G3 = (G4G5) * (A4A5) = (A1+A2 )*(G5)
Quantitative calculation of fault tree
Use the minimum cut set to calculate the probability of the event

SAD
•SAD Information that should be included :
– System overview
– View
– Software unit
– Analyze data and results
– Design rationality
– Definition , The glossary , Abbreviations
边栏推荐
- Unity's rich text color sets the color to be fully transparent
- How to protect WordPress websites from cyber attacks? It is important to take safety measures
- Biden signe deux nouvelles lois visant à renforcer la cybersécurité du Gouvernement
- Thoroughly understand the factory mode
- Using pictures to locate app elements sikulix
- [untitled]
- ThoughtWorks.QRCode和ZXing.Net 二维码,网址可以直接跳转
- Struggle, programmer -- Chapter 46 this situation can be recalled, but it was at a loss at that time
- Verification code is the natural enemy of automation? See how the great God solved it
- Thoroughly understand the builder mode (builder)
猜你喜欢

Flink status management

看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-5

Data collection: skillfully using Bloom filter to extract data summary

扩散模型又杀疯了!这一次被攻占的领域是...

树结构二叉树

Verification code is the natural enemy of automation? See how the great God solved it

Should programmers choose software talent outsourcing companies?

C# Winform 相册功能,图片缩放,拖拽,预览图分页

擴散模型又殺瘋了!這一次被攻占的領域是...

Installing and using protobuf-c
随机推荐
11 方法引用和构造器应用
Go Web 编程入门:验证器
CVE-2022-22965複現
Database employment consulting system for your help
Le modèle de diffusion est encore fou! Cette fois - ci, la zone occupée était...
Random forest of machine learning
What is the difference between Z-score and deltf/f?
Network address translation nat
How do I open an account on my mobile phone? Is it safe to open an account online?
Messiari annual report-2021
一文彻底弄懂单例模式(Singleton)
Sikulix选取相对位置的图片(进阶版)
C # WinForm photo album function, picture zooming, dragging, preview Pagination
How to compare the size of two dates in unity and C #
C#定义和实现Interface接口
看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-5
Should programmers choose software talent outsourcing companies?
Deadlock found when trying to get lock; Try restarting transaction
How to protect WordPress websites from cyber attacks? It is important to take safety measures
开源SPL重新定义OLAP Server