当前位置:网站首页>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

image-20220615221611926

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

image-20220617203512712

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

image-20220617203549237

• 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 .

image-20220617203734039

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

image-20220617204259878

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 .

image-20220617205111285

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

image-20220617205402938

• 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 .

image-20220617205431494

• 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

image-20220617210829719

Pay attention to the middle and top yes hold

The bottom is round , The rest will not be used

image-20220617213312234

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

image-20220617213501066

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

image-20220617213922923

SAD

•SAD Information that should be included :

– System overview

– View

– Software unit

– Analyze data and results

– Design rationality

– Definition , The glossary , Abbreviations

原网站

版权声明
本文为[Tcoder-l3est]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221107326562.html