- Desirability: requirements
- Viability: time, resources, costs
- Aesthetics: simplicity, elegance
- Feasibility: technology
Software Architecture and Component-based Software Engineering: how to design large systems out of reusable components.
- manage complexity through abstraction
- communicate, remember and share global decisions
- visualize and represent relevant aspects of a software system
- understand, predict and control how the design impacts quality attributes of a system
- define a flexible foundation for maintenance and future evolution
Functional:
- Correctness
- Compliance
- Completeness
Extra-Functional:
- Internal vs. External:
- External qualities: fitness for purpose of the product, for satisfaction of stakeholder concerns; affected by deployment env.
- Internal qualities: developer's perception of state and change during desing and development.
- Static vs. Dynamic:
- Static qualities: structural properties that can be assessed before deployment in prod
- Dynamic qualities describe behaviour during: normal op, failures, under attack, responding to change, long term
Meta qualities:
- Measurability
- Repeatability (Jitter)
- Predictability
- Auditability
- Testability
Many quality attributes categorized:
What's the likelihood of success for your new project?
- Affordability: resources (money for hw/people, time, slack)
- Time to market: how soon can we start learning from our users?
Is there a structural decomposition of the architecture?
- Prerequisite for: Code Reuse, Separate Compilation, Incremental Build, Distributed Deployment, Separation of Concerns, Dependency Management, Parallel Development in Larger Teams
Can we use this software many times for different purposes?
- Mechanism: fork vs. reference
- Origin: internal vs. external
- Scope: General-purpose vs. Domain-specific
- Pre-requisites for reuse: trusted "quality" components, standardized and documented interfaces, marketplaces
What is the design's conceptual integrity and coherence?
- Understanding a part helps understanding the whole
- Avoid unexpected surprises: use naming conventions, follow architectural style constraints
What is the complexity of a design?
- A simple solution for a complex problem
- One general solution vs. many specific: less duplication, minimal variability
- Conciseness
- Resist changes that compromise simplicity
- Refactor to simplify
- Complexity arises from:
- number of components
- number of connections between components
Is the design easy to understand?
- Distill most essential aspects into simple primitive elements that can be combined to solve the important problems of the system
- Freedom from ambiguity and irrelevant details
- Definitive, precise, explicit and undisputed decisions
- Opposite of clarity: clutter, confusion, obscurity
How likely to change is your design?
Unstable | Stable |
---|---|
prototype | product |
implementation | interface |
likely to break clients | platform to build upon |
experimental spike, throw-away code | worthy of further investment: building, testing, documenting |
How easy is it to assemble the architecture from its constituent parts?
- Assuming all components are ready, putting them together is fast, cheap and easy
- Cost of composition < cost of components
- Components can be easily recomposed in different ways
How difficult is it to deploy the system in production?
Hard | Easy |
---|---|
manual release | automated release |
scheduled updates | continuous updates |
unplanned downtime | planned or no downtime |
wait for dependencies | no synchronization |
changes cannot be undone | rollback possible |
How timely are the external interactions of the system?
- Latency
- Throughput
Is the performance guaranteed with an increasing workload?
- Design architecture for growth: requests, users, data, nodes, components
How much can the system perform?
- Ensure spare capacity (no saturation)
Is the user interface intuitive and convenient to use?
- Learnability, Memorability, Efficiency, Satisfaction, Accessibility, Internationalization
Can users be effectively helped in case of problems?
Hard | Easy |
---|---|
cryptic error messages | self-correcting errors |
heisen-bugs | reproducible bugs |
unknown config | remotely visible config |
no error logs | stack traces and debug logs |
user in the loop | remote screen |
How convenient is the ordinary maintenance of the system?
Hard | Easy |
---|---|
complete operational stop | service running system |
reboot to upgrade | transparent upgrade |
install wizard | unattended installation script |
restart to apply config change | hot/live config |
manual bug reports | automatic crash report |
Is it possible to monitor runtime events and interactions?
- Extent of possible observation of sys behaviour and internal state during op
- Are there logs to debug, detect errors or audit the sys in prod?
- Is the sys self-aware?
- Process Visibility: can the progress of the project be measured and tracked?
How likely is it that the system is functioning correctly?
How long can the system keep running?
How long does it take to repair the system?
Is damage prevented during use within the operating range?
Is damage prevented during intentional/hostile use outside the operating range?
Is the system protected from attacks?
Does the system survive the mission?
How to keep personal information secret?
What changes are expected in the future?
No change: put it in hardware.
Software is expected to change.
- Configurability: Can architectural decisions be delayed until after deployment?
- Customizability: Can the architecture be specialized to address the needs of individual customers?
- Modifyability: old (can func be removed from sys?)
- Extensibility: new (can func be added to sys?)
- Elasticity: Can workload changes be absorbed by dynamically re-allocating resources?
- Resilience: temporary changes. Can the architecture return to the original design after the change is reverted?
- Adaptability: permanent changes. Can the architecture evolve to adapt to the changed requirements?
Does X work together with Y?
- Interfaces
- Interoperability: Protocols and Data formats. Can two systems exchange information to successfully interact?
- Portability: Platforms. Can the software run on multiple execution platforms without modifycation?
- Source vs. Binary
- Versioning
- Ease of Integration: How expensive is it to integrate our system with others?
How permanent is the data?
How to deal with software entropy?
- Technical: How to avoid your software becomes obsolete in the long term?
- Economic: How to ensure your software development organization does not go bankrupt in the long term?
- Growth: How to bootstrap the growth of your startup?
- Enterprise Architect
- Business Architect
- Software Architect
- Data Architect
- Information Architect
- Solution Architect
- Product Architect
- Security Architect
... where is the architecture?
Challenge requirements, avoid making assumptions.
Someone will have to live with your architecture: make sure it is good.
Architectural decisions are made early in the dev lifecycle, but affect the whole lifecycle of the system.
A system's architecture may be visualized and represented using models that are somehow related to the code.
All architecture is design.
Not all design is architecture.
Architecture:
- What? Functional, Extra-functional, Requirements
- How? Design
- Why? Rationale
A software system’s architecture is the set of principal design decisions made about the system. It is the blueprint for a software system’s construction and evolution.
- Prescriptive: specifies intent (TO BE)
- Descriptive: specifies realization (AS IS)
- Presumptive: default architecture for a given application domain (e.g. 3-Tier for web apps), variations need to be justified
- Reference: predefined architecture for a given application domain with explicit variation points, choices need to be justified
- Solution: architecture to solve problems of one customer, with many products
- Product: architecture of one product aimed at satisfying requirements of multiple customers
- M(arketing): architecture that describes how to market and sell the software system to customers (business model, licensing model, terms of use)
- T(echnology): architecture that prescribes how to build deploy and configure the system (styles, patterns, components, connectors)
- Green: building from scratch, only Prescriptive architecture exists, no Descriptive
- Brown: building by reuse, Descriptive architecture of components already exists
- Drift: new Descriptive decisions do not violate Prescriptive
- Erosion: Descriptive and Prescriptive are inconsistent
Causes of drift: ad-hoc changes, quick fixes.
One month of coding can save you one hour of architecting.
An architectural model is an artifact that captures some or all of the design decisions that comprise a system’s architecture.
Architectural modeling is the reiѹcation and documentation of those design decisions.
- Abstraction (real sys -> model): some information is intentionally left out
- Interpretation (model -> real sys): solve ambiguities, add missing decisions
Problem -> Abstraction -> Solve model -> Interpretation
vs.
Solving directly (often harder).
Various parts of the architecture (or views) may have to be modeled with a different:
- Notation
- Level of detail
- Target audience
A view is a set of design decisions related by common concerns (the viewpoint).
There are a lot of different views. Usually more than one is used at a time because there is too much information to model.
Views are not always orthogonal and should not become inconsistent.
- Domain model: irrefutable truths about the real world, outside control, the system will be tested against it
- Code model: complete set of design commitments, represents the executable, ready-to-run source code
- Design model:
- Boundary: visible interfaces of the system architecture...
- Internal: ...refined with details about the implementation
Use Case Scenarios
Feature Models
C5: Context, Containers, Components, Connectors, Classes
4+1: Logical, Process, Development, Physical (and Use Cases)