Top Banner
Architecture Patterns and Tactics Lotfi ben Othmane
33

Architecture Patterns and Tactics - Iowa State University

Dec 18, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Architecture Patterns and Tactics - Iowa State University

Architecture Patterns and Tactics

Lotfi ben Othmane

Page 2: Architecture Patterns and Tactics - Iowa State University

• Architectural styles define types of components and connectors in specified topology that are useful for structuring an application logically or physically.

• Architectural/design patterns are conceptual solutions for recurring problems

• Tactics are design decisions that influence the control of a quality attribute response

• Architecture styles are often mixed up with architecture patterns – they often refer to the same thing

2

Definitions

Page 3: Architecture Patterns and Tactics - Iowa State University

• Which architecture style addresses the need of data sharing?

• Which architecture style addresses the need of interoperability of OSs?

• What style addresses the need of deployability? What about software with rich GUI?

3

Practice

Page 4: Architecture Patterns and Tactics - Iowa State University

• Team members are specialized in backend, frontend, and data processing.

• Backend does not depend on frontend.

• There could be many frontends.

• The code should be easy to modify.

4

Example of Modifiability Drivers

Page 5: Architecture Patterns and Tactics - Iowa State University

• An architectural style that involves grouping functionalities into layers that only communicate in a singular direction –upper layers send commands to lower layers.

• Functionalities of each layer are related by a common role or set of responsibilities.

• Layers are often related to technologies, e.g. databases, business, presentations.

5

Layered Architecture

Page 6: Architecture Patterns and Tactics - Iowa State University

6

Layered Architecture

Page 7: Architecture Patterns and Tactics - Iowa State University

Benefits:

• Abstraction – support changes of layers without impacting the upper layers

• Isolation – isolate technology upgrades• Manageability – knowledge of the dependencies helps

manage the sections• Possible reuse of layers• Test layers separately

7

Layered Architecture

Page 8: Architecture Patterns and Tactics - Iowa State University

You should consider this style to:

• Use existing layered implementations that you can extend.• Adapt to team members skills with respect to technology.• Support different client types.

8

Layered Architecture

Page 9: Architecture Patterns and Tactics - Iowa State University

• Support adding new types of hardware that have unknown interfaces

• Support adding new components to the software and use them without the need to recompile the system

9

Extensibility Drivers

Page 10: Architecture Patterns and Tactics - Iowa State University

How would you support different types of sensors and different types of cameras?

10

Extensibility of a Software

Page 11: Architecture Patterns and Tactics - Iowa State University

(1)Sequential

11

Types of Composition

(2)Hierarchical

(3)Additive

Page 12: Architecture Patterns and Tactics - Iowa State University

Sequential composition – the composed components are executed in sequence.

Hierarchical composition – one component calls on the services of another.

Additive composition – the interfaces of two components are put together to create a new component.

12

Type of Composition

Page 13: Architecture Patterns and Tactics - Iowa State University

13

Components Interfaces

Page 14: Architecture Patterns and Tactics - Iowa State University

14

Adapter Linking a Data Collector and Sensor

Page 15: Architecture Patterns and Tactics - Iowa State University

Parameter Incompatibility – where operations have the same name but are of different types.

Operation Incompatibility – where the names of operations in the composed interfaces are different.

Operation Incompleteness – where the provided interface of one component is a subset of the required interface of another.

15

Interface Incompatibility

Page 16: Architecture Patterns and Tactics - Iowa State University

16

Components with Incompatible Interfaces

Page 17: Architecture Patterns and Tactics - Iowa State University

Address the problem of component incompatibility by reconciling the interfaces of the used components.

An addressFinder and a mapper component may be composed through and adapter that strips the postal code from an address and passes this to the mapper component.

17

Adapter Pattern

Page 18: Architecture Patterns and Tactics - Iowa State University

• Plugins architecture allows third parties to quickly add features to an application without access to source code

• The software is structured as a well-designed host framework and a set of plug-ins

• A plug-in is a bundle that adds functionality to a host framework through some well-defined architecture for extensibility.

18

Plugins Architecture

Page 19: Architecture Patterns and Tactics - Iowa State University

19

Plugins Architecture

Page 20: Architecture Patterns and Tactics - Iowa State University

20

Plugins Architecture

Page 21: Architecture Patterns and Tactics - Iowa State University

21

Plugins Architecture

Page 22: Architecture Patterns and Tactics - Iowa State University

How to improve the reliability and/or performance of a given system?

22

Performance and Reliability Patterns

Page 23: Architecture Patterns and Tactics - Iowa State University

Problem: Sporadic heavy load of a service can cause performance issue.

Solution: Distribute the load among a set of service instances

23

Master-Slave Pattern

Service 2 Service 3Service 1

Master

Page 24: Architecture Patterns and Tactics - Iowa State University

• Architectural styles define types of components and connectors in specified topology that are useful for structuring an application logically or physically.

• Architectural/design patterns are conceptual solutions for recurring problems

• Deployment patterns provide models to physically structure software

• Tactics are design decisions that influence the control of a quality attribute response

• Architecture styles are often mixed up with architecture patterns – they often refer to the same thing

Definitions

24

Page 25: Architecture Patterns and Tactics - Iowa State University

Availability tactics

25

Availability Tactics

Page 26: Architecture Patterns and Tactics - Iowa State University

Interoperability Tactics

26

Page 27: Architecture Patterns and Tactics - Iowa State University

Modifiability Tactics

27

Page 28: Architecture Patterns and Tactics - Iowa State University

You are working on the life-style project as an initiative with few of your friends in the context of an open source project. You planned to produce releases every 3 months. What tactics would you use to achieve modifiability?1. Reduce size of modules2. Increase cohesion3. Reduce coupling4. Defer binding5. I need further information (specify your question)

Practice 7

Page 29: Architecture Patterns and Tactics - Iowa State University

29

Performance Tactics

Page 30: Architecture Patterns and Tactics - Iowa State University

Security tactics

30

Security Tactics

Page 31: Architecture Patterns and Tactics - Iowa State University

What tactics would you use for your smart home project to ensure that only you can access your devices1. Detect intrusion2. Verify message integrity3. Limit access4. Limit exposure5. Maintain audit log6. Encrypt data7. Validate input8. I know a better tactic

Practice 7

31

Page 32: Architecture Patterns and Tactics - Iowa State University

1. What problem does the layered-architecture pattern address?

2. How should you address the problem of incompatible interfaces?

3. What style should we use to increase modifiability of the system?

4. What pattern should we use to address the performance of the system?

Self-check

32

Page 33: Architecture Patterns and Tactics - Iowa State University

Thank you

Questions?

33