Software Dev Process Lecture Notes - Part 3 Lesson 1 - Software Architecture
Software Architecture
What is Software Architecture
- Elemants, form, rationale (what, how, why)
- Perry and Wolf
- A level of design that involves 4 main things
- Shaw and Garland
- description of elements fromw hich systems are built
- interactions amont those elements
- patterns that guide their composition
- constraints on these patterns
- Shaw and Garland
- Set of principal design decisions about the system
- Blueprint of a software system
- Structure
- Behavior
- Interactions
- Non-functional properties
- Temporal aspect
- A SWA is not defined at once, but iteratively, over time
- At any point in time there is a SWA, but it will change over time
- Design decisions are made, unmade, and changed over a system’s lifetime
Prescriptive vs Descriptive Architecture
- A prescriptive architecture captrues the design decisions made prior to the system’s construction
- AKA as-conceived SWA
- A descriptive architecture describes how the system has actually been built
- AKA as-implemented SWA
- Why is there a gap between these two things?
Architectural Evolution
- When a system evolves, ideally its prescriptive architecture should be modified first
- In practice, this rarely happens
- Developers’ sloppiness
- Short deadlines
- Lack of documented prescriptive architecture
- In practice, this rarely happens
Architectural Degradation
- Architectural drift
- introduction of architectural design decisions orthogonal to a system’s prescriptive architecture
- Architectural erosion
- introduction of architectural design decisions that violate a system’s prescriptive architecture
Architectural Recovery
* Drift and erosion -> degraded architecture
* Options
* Keep tweaking the code (bad idea)
* Architectural recovery: determine SWA from implementation and fix it
Software Architecture Elements
- Elements
- A software architecture typically is not a monolith
- A composition and interplay of different elements
- Processing elements
- Data elements
- Interaction elements
- Processing + data = components
- Software component - architectural entity that encapsulates a subset of the system’s functionality and/or data
- restricts access to that subset via an explicitly defined interface
- interaction = connectors
- Software connector - architectural entity effecting and regulating interaction among components
- components + connectors = configuration
- Architectural configuation (aka topology) - association between components and connectors of a software system architecture
Deployment Architectural Perspective
- Shows configuration laid out onto the actual hardware each piece will run on.
- Allows better assessment of some things. E.g. will the hardware running a given piece of the configuration have enough memory/compute/power?
Software Architecture Styles
- An architectural style defines a family of systems in terms of a pattern of structural organization; a vocabulary of components and connectors, with constraints on how they can be combined
- Shaw and Garlan 1996
- Basically, a named collection of architectural design decisions applicable in a given context
- Pipes and Filters
- a style in which a chain of processing elements arranged such that the output of one element is the input of another element
- Event-driven
- consists of event emitters and event consumers. consumers are notified when events of interest occur and have to respond to them
- Publish-subscribe
- a style in which senders of messages do not send to specific receives. instead they broadcast with tags, and subscribers are interested in specific tags and will only ingest messages with those tags.
- Client-server
- a style in which computers in a network assume on of two roles (client or server). the server provides resources and functionality. the client initiates contact with the server and requests the use of those resources and functionality
- peer-to-peer
- a decentralized and distributed network system, in which individual independent nodes in the network act as independent agents that are both supplies and consumers of information.
- representational state transfer (REST)
- a hybrid architectural style for distributed hybrid media systems. characterized by a uniform connector interface. very popular style, very widely used.