Download presentation
Presentation is loading. Please wait.
1
Software Architecture in Practice
Tactics
2
Henrik Bærbak Christensen
Context Henrik Bærbak Christensen
3
Henrik Bærbak Christensen
Introduction Tactics: Architectural techniques to achieve required quality attributes i.e. control the response measure in a positive direction The following presentation is selected picks from the book Representing my interests or central tactics … and representing areas of my missing expertise Henrik Bærbak Christensen
4
Henrik Bærbak Christensen
Availability Availability: Property of software that it is ready to carry out its task when you need it to be. Lots of metrics… MTBF: Mean Time Between Failures MTTR: Mean Time To Repair MTBF / (MTBF+MTTR) Henrik Bærbak Christensen
5
Henrik Bærbak Christensen
Henrik Bærbak Christensen
6
Henrik Bærbak Christensen
Tactics Categories Detect Faults Our system needs to know that something has failed! Examples Heartbeat MongoDB’s replica set emit heart beats to fellow instances Exception Detection MongoDB’s Java driver will throw an exception in case a write request cannot be fulfilled Henrik Bærbak Christensen
7
Henrik Bærbak Christensen
Tactics Categories Recover from Faults / Prep and repair Once detected, how do we get back on track? Examples Active Redundancy: millisecond take over Passive Redundancy: second-minute take over Spare: hour-days take over Exception handling Degradation Run with cached data (off-line) Henrik Bærbak Christensen
8
Henrik Bærbak Christensen
Tactics Categories Recover from Faults / Reintroduction How to get failed components working again Examples: State resynchronization MongoDB slave 1 needed two days to get back Henrik Bærbak Christensen
9
Henrik Bærbak Christensen
Tactics Categories Prevent Faults Can we avoid it in the first place Examples: Transactions: ACID in RDB Increase competence set: Read Nygards book and employ the techniques - Safe failure modes Henrik Bærbak Christensen
10
Henrik Bærbak Christensen
Summary Availability: Property of software that it is ready to carry out its task when you need it to be. There are lots of tactics Some are simple, directly in programming language Like exceptions Some are wildly complex Passive redundancy Look for the complex ones in external libraries Henrik Bærbak Christensen
11
Henrik Bærbak Christensen
Interoperability Interoperability: Concerned with the degree to which two or more systems can usefully exchange meaningful information via interfaces in a particular context Henrik Bærbak Christensen
12
Henrik Bærbak Christensen
Tactics Locate: e.g. DNS lookup Manage interface: Orchestrate ~ Mediator pattern; Tailor ~ Decorator Henrik Bærbak Christensen
13
Henrik Bærbak Christensen
Hm Bit thin, isn’t it? Extensible interface Add version number in message JSON and XML are pretty flexible, you can always add stuff, and older clients may then ignore additional attributes Henrik Bærbak Christensen
14
Henrik Bærbak Christensen
Modifiability Modifiability: Concerned with the ease with which the system supports change Henrik Bærbak Christensen
15
Henrik Bærbak Christensen
Tactics Henrik Bærbak Christensen
16
Henrik Bærbak Christensen
Tactics Cohesion and Coupling: Old friends… Defer binding = Dependency injection Constructor injection, Abstract Factory, DI frameworks Program to an Interface Favor object composition Henrik Bærbak Christensen
17
Henrik Bærbak Christensen
Performance Performance: Concerned with ability to meet timing requirements Henrik Bærbak Christensen
18
Henrik Bærbak Christensen
Tactics Henrik Bærbak Christensen
19
Henrik Bærbak Christensen
Tactics Either lower demand or increase muscles Make the wagon lighter or add more horses in front… Demand examples Increase ressource efficiency: better algorithms Reduce overhead: avoid too much network traffic Manage resources Increase: Vertical scale (up) Multiple copies data: cache Multiple copies comp: Horizontal scale (out) Henrik Bærbak Christensen
20
Security Security: Concerned with ability to protect data and information from unauthorized access while still providing access to people/systems that are authorized One of the major flaws in my knowledge base Henrik Bærbak Christensen
21
Henrik Bærbak Christensen
Tactics Henrik Bærbak Christensen
22
Henrik Bærbak Christensen
Change default settings How many of you have changed the default admin password on your Wireless Router at home ? Henrik Bærbak Christensen
23
Henrik Bærbak Christensen
Testability Testability: Concerned with the ease with which the software can be made to demonstrate its faults Henrik Bærbak Christensen
24
Henrik Bærbak Christensen
Tactics Henrik Bærbak Christensen
25
Henrik Bærbak Christensen
Tactics Specialized interfaces Tests often deliberately breaks encapsulation! Allow it, but only through dedicated test interfaces! Sandboxing Program to an interface and allow test doubles to be injected instead of DBs, external hardware, etc. Use virtual machines Staging environments Docker-compose Limit complexity Program to interface, favor object composition Henrik Bærbak Christensen
26
Henrik Bærbak Christensen
Usability Usability: Concerned with how easy it is for the user to accomplish a desired task and the kind of user support the system provides Henrik Bærbak Christensen
27
Henrik Bærbak Christensen
Tactics Henrik Bærbak Christensen
28
Henrik Bærbak Christensen
Tactics Undo and cancel ! Record macros Henrik Bærbak Christensen
29
Henrik Bærbak Christensen
Summary Some are high level architectural decisions Passive redundancy, … Some are low level programming decisions with strong architectural influence Reduce module size, introduce concurrency, … Definition: Tactic is a design decision that influences the achievement of a quality attribute response Henrik Bærbak Christensen
30
My Architecture Perception
Some say ”Architecture is the ability to draw 7 boxes with lines between them” I say ”Architecture is any decision that influence QAs” Which leads to the corollary Architectural work span the entire spectrum of decisions from the highest level all the way down to programming statement level! Klaus Marius Hansen, Architect at Microsoft ”I spent quite a lot of time programming architectural prototypes…” Henrik Bærbak Christensen
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.