Software Architecture: visual lecture notes

These are the revised and illustrated notes of the Software Architecture lecture of the Master in Software and Data Engi

782 175 113MB

English Year 2023

Report DMCA / Copyright

DOWNLOAD FILE

Software Architecture: visual lecture notes

Table of contents :
Preface
Acknowledgements
Introduction
De Architectura
The Art and Science of Building
Foundation
Platforms
Closed
Open
Interfaces
Forces
When do you need an architect?
How Large?
Software Architecture
Lecture Context
Why Software Architecture?
Hiding Complexity
Abstraction
Communication
Representation
Visualization
Quality
Change
Evolution
Quality Attributes
Quality
Functional, Extra-Functional Qualities
Internal vs. External
Static vs. Dynamic
Meta-Qualities
Quality Attributes
Design Qualities
Feasibility
Affordability
Slack
Time to Market
Modularity
Reusability
Design Consistency
Simplicity
Complexity
Clarity
Stability
Composability
Deployability
Normal Operation Qualities
Performance
Scalability
Capacity
Usability
Ease of Support
Serviceability
Visibility
Dependability Qualities
Reliability
Availability
Security Qualities
Defensibility, Survivability
Privacy
Change Qualities
Flexibility
Configurability
Customizability
Resilience, Adaptability
Extensibility, Modifiability
Elasticity
Compatibility
Portability
Interoperability
Ease of Integration
Long Term Qualities
Durability
Maintainability
Types of Maintenance
Sustainability
Definitions
Who is a software architect?
Functional Organization
Cross-Functional Organization
Facilitate Communication
Software Engineering Lead
Technology Expert
Risk Management
Architect Tribes
Software Architecture and the Software Development Lifecycle
Bridge the Gap
Think Outside the Box
Evolutionary Model
Agile Unified Process
System Lifecycle
Defining Software Architecture
Architecture vs. Code
Architecture vs. Technology
Architecture vs. Design
Basic Definition
Design Decisions
Design Process
Design Decisions
Decision Making Phases
Decision Trees
Design Outcome
Modeling Architecture
Can this skeleton fly?
Prescriptive vs. Descriptive Architecture
Green Field Development
Brown Field Development
Architectural Degradation
Causes of Architectural Drift
From Drift to Erosion
Entropy
Architecture or Code First?
Architecture Hoisting
Presumptive vs. Reference
Solution vs. Product
M-Architecture vs. T-Architecture
The $10000 boolean flag
Art or Science?
Science or Art?
References
Modeling
Capturing the Architecture
What is modeling?
Abstraction and Interpretation
Solving Problems with Models
Question first, Model second
Scope of the Model
What is a view?
How many views?
Multiple Views
View Consistency
Domain and Design Models
Modeling = Learning
Domain Model
Example Domain Model
Design Model
Example Design Model (Interfaces)
Example Design Model (Implementation)
Some Modeling Notations
Use Case Scenarios
Example Music Player Scenarios
Feature Models
Feature Model Example
Feature Model Constraints
Constrained Feature Model Example
Feature Configuration
From C4 to C5
System Context View
System Context View Example
Containers View
Container View Example
Example Containers
Components View
Components View Example
C4
Classes View
C5
Connectors View
Connectors View Example
4+1
Logical View
Logical View Notation
Example Logical View
Process View
Example Process View
Development View
Example Development View
Physical View
Example Deployment View
Content is more important than representation
Model Quality
Accuracy vs. Precision
Model Quality - Advice
Model-Driven Architecture
References
Modularity and Components
What is a Software Component?
Hardware Component
Software Component
Examples: Application-specific Components
Examples: Infrastructure Components
Black Box
Recursive Components
Clustering Components
Design vs. Run-time
Distributed Components
Component Lifecycle Decisions
Externally Sourced Components
Discovery
Selection
Integration
Test
Release
Deploy
Stateful Components
Migration
Backup and Recovery
Properties of Components
Component Roles
Stateless vs. Stateful
Stateless vs. Stateful Code
Stateless vs. Stateful Operations
Components vs. Objects
Component Technology
Component Frameworks
Component Frameworks Demo Videos
Where to find components?
Buy vs. Build
How much does it cost?
References
Reusability and Interfaces
Interfaces
Component Interface
Provided Interface
Provided Interfacesand Component Roles
Required Interface
Explicit Interfaces Principle
Information Hiding
Effective Encapsulation
Example
Describing Interfaces
Principle of Least Surprise
Easy to use?
Interface Description Languages
Java/RMI
C/RPC
RAML
OpenAPI/Swagger
Working With IDL
API Documentation Demo Videos
What is an API?
Is it really API?
Many Applications
Developers, Developers, Developers
Where to find APIs?
Operating Systems
Programming Languages
Hardware Access
User Interfaces
Databases
Web Services
API Design
Where is the API?
API Design: Where to start?
Who to please?
Reusable Interfaces
Usability vs. Reusability
Easy to reuse?
Performance vs. Reusability
Small Interfaces Principle
How many clients can these APIs satisfy?
Uniform Access Principle
Few Interfaces Principle
Clear Interfaces Principle
Let's create a new Window
Expressive? No: Stringly Typed
Consistent?
Primitive Operations
Design Advice
References
Composability and Connectors
Software Connectors
Connector: enabler of composition
Software Connector
Components vs. Connectors
Connectors are Abstractions
Connector Roles and Runtime Qualities
Connectors and Transparency
Connector Cardinality
Connectors and Distribution
Connectors and Availability
Software Connector Examples
RPC: Remote Procedure Call
File Transfer
Shared Database
Message Bus
Stream
Linkage
Shared Memory
Disruptor
Tuple Space
Web
Blockchain
References
Compatibility and Coupling
Compatibility
Compatible Interfaces
There's an app adapter for that!
Adapter
Wrapper
Mismatch Example
Partial Wrappers
Types of Interface Mismatches
Synchronous vs. Asynchronous Interfaces
Half-Sync/Half-Async
Sync to Async Adapter
Half-Async/Half-Sync
Async to Sync Adapter
How many Adapters?
Scaling Adapters with N Interfaces
Composing Adapters
One or Two Adapters?
Reusable Adapters and Performance
How Standards Proliferate
On Standards
Standard Software Interfaces
Representation Formats
Operations
Protocols
Addressing
Interface Description
Coupling
Understanding Coupling
Coupling Facets
Session Coupling Examples
Binding Times
Be liberal in what you accept, and conservative in what you send.
Water or Gas Pipe?
References
Deployability, Portability and Containers
The Age of Continuity
Deployability Metrics
Release
Release Frequency
Speed vs. Quality
Software Production Pipeline
High Quality at High Speed
Types of Testing
Types of Release
Gradual Phase-In
Essential Continuous Engineering Practices
Tools
Build Pipeline Demo Videos
Container Orchestration Demo Videos
Virtualization and Containers
Virtualization
Lightweight Virtualization with Containers
VM vs. Container
Containers inside VMs
Images and Snapshots
Virtual Machine Migration
Inverted Hypervisor
Virtual Hardware = Software
References
Scalability
Will it scale?
Scalability and Workload
Scalability and Workload: Centralized
How to scale?
Scalability and Resources: Decentralized
Scalability and Resources
Centralized or Decentralized?
Scalability at Scale
Scale Up or Scale Out?
Scaling Dimensions
Scalability Patterns
Directory
Dependency Injection
Directory vs. Dependency Injection
Scatter/Gather
Master/Worker
Master Responsibilities
Worker Responsibilities
Load Balancing
Variants
Sharding
Computing the Shard Key
Looking up the Shard Key
References
Availability and Services
Components vs. Services
Business model: how to sell
Design decisions
Technology: how to use
Availability
Availability Questions
Monitoring Availability
Which kind of monitor?
Availability Incidents
Downtime Impact
Contain Failure Impact
Retry
Circuit Breaker
Canary Call
Redundancy
State Replication
Which kind of replication?
CAP Theorem
CAP Theorem Proof
Eventual Consistency
Event Sourcing
References
Flexibility and Microservices
API Evolution
Only one chance...
API Evolution
API Compatibility
Semantic Versioning
Changes and the Build Pipeline
Version Identifier
Two in Production
API Sunrise and Sunset
To break or not to break
Who should keep it compatible?
Layers
Layering Examples
Data on the Inside, Data on the Outside
Tolerant Reader
Which kind of reader?
Extensibility
Extensibility and Plugins
Microservices
Monolith vs. Microservices
Will this component always terminate?
Will this service run forever?
Will this microservice continuously change?
DevOps
DevOps Requirements
Feature Toggles
How small is a Microservice?
Continuous Evolution
Hexagon Model
Decomposition
Independent DevOps Lifecycle
Isolated Microservices
Splitting the Monolith
Microservice Best Practices
Bezos's Mandate (2002)
Evans's Bounded Context (2004)
Bob Martin's Single Responsibility Principle (2003)
UNIX Philosophy (1978)
Separation of Concerns (1974)
Parnas's Criteria (1971)
Conway's Law (1968)
Vogels's Lesson (2006)
References

Polecaj historie