Lecture 8 - Software Architecture Flashcards
(26 cards)
Why study Software Arcitecture?
Recognise common paradigms so you can
- understand high level relationships among systems
- build new systems as variations on existing ones
What is the common framework of Software Architecture?
Components- a software architecture consists of a collection of computational components
Connectors- the interactions between those components (e.g. procedure call, event broadcast, database queries or pipes)
Constraints- A software architecture might have some constraints imposed on it. e.g. topological constraint of having no cycles
What are the types of System Architectures?
Pipe and Filter
Repository
Blackboard Repository
Layered
Client Server Architecture
Process Control
Pipe and Filter Architecture structural pattern
Each component (filter)
- reads streams of data on its inputs
- applies a local transformation
- produces streams of data on its outputs
Computation is incremental
- output begins before all inputs are consumed
Connecters (pipes)
- transmit outputs of one filter to inputs of another
REFER TO SLIDES
What are the Essential Invariants (constraints for Pipe and Filter Architecture
Filters must be independent entities
- they do not share state with other filters
Filters do not know the identity of other upstream and downstream filters
Filter specifications can
- restrict what appears on the input pipes or
- make guarantees about what appears on the output pipes
What are the Pipe and Filter major specializations?
Pipeline- topology restricted to linear sequences of filters i.e. no loops
Bounded Pipes- restrict the amount of data that can reside on a pipe
Typed Pipes- data passed between 2 filters must have a well defined type
What are some Pipe and Filter Architecture Examples?
Unix shell pipes
Compilers
What is a Repository Architecture and what are its Components?
Subsystems access and modify data from a single data structure
Subsystems are loosely coupled (interact only through the repository)
Two distinct types of component
- central data structure represents current state
- independent components operate on the data store
REFER TO SLIDES
What are the Repository Interactions?
Control flow is dictated by central repository (triggers) or by the subsystems (locks, synchronization primitives)
Blackboard architecture interactions
- current state of the central data structure is the main trigger
Traditional database interactions
- input stream of transactions triggers selection of processes to execute
What are Blackboard Repositories (also known as a blackboard)?
Knowledge sources- separate, independent application-dependent knowledge
Blackboard data structure - problem-solving state data organised in an application-dependent hierarchy
Control - driven by the state of the blackboard
What are some examples of Repository systems?
Complex interpretations of signal processing - E.g. speech and pattern recognition
Some programming environments
Database management systems
What is Layering Architecture?
Breaks down a complex system into layers, where each layer can only interact with the one below it
REFER TO SLIDES
What is a Layered Model?
Hierarchical organisation: each layer
- provides a service to the layer above
- acts as a client to the layer below
===
Layers may either be
- partially opaque (some interaction allowed between non-adjacent layers)
- opaque: inner layers are hidden from all except the adjacent outer layer
What are the Layered System Advantages?
Design based on increasing levels of abstraction
- complex problem becomes sequence of incremental steps
Supports enhancement
- changes to one layer affect at most two other layers
Supports reuse
- different implementations of the same layer can be used interchangeably provided they support the same interfaces
What are the Layered System Disadvantages?
Not all systems are easily structured in layers
Performance considerations
- may need close coupling between logically high-level functions and their low-level implementations
Can be difficult to find right level of abstraction - E.g. protocols which bridge several OSI layers
What is the Client Server Architecture?
Client: is typically the presentation of software ie Amazon
Server: Where all the logic is stored
Online games
- Client: movement and basic controls
- Server: all main logic, to avoid cheating
What is Process Control Arcitecture?
Has two loops:
- The feedback loop which takes two variables, a set point and actual input variable, and then finds the output - the difference (error) between them to make adjustments.
- The feedforward lopp, which takes two variables, a set point and actual input variable, instead of getting feeback from the output it makes adjustments based on expected outcomes, without checking if the goal was achieved.
REFER TO SLIDES
What is the Purpose of design documentation?
Explain your design choices to later developers
Ensure they don’t duplicate research or work you’ve already done
REFER TO SLIDES - example on slides
What is a Design Document and what is the audience?
Design documentation records the design choices you made, and reasons for them. It records major choices made about the architecture of the system, and may contain design models (for instance, UML diagrams).
- It is primarily written for architects, developers and maintainers.
What other sorts of documentation are there?
User documentation. Written for end users and/or system administrators.
API documentation. Written for internal, and possibly external, developers.
Cookbooks/examples. Working code examples, written for developers.
What are some qualities of bad design documentation?
Hard to navigate - hard to find what you need
Out of date - no longer matches up with the current code
Incomplete/too little detail - doesn’t explain major decisions
Too much detail - major decisions are hidden in masses of unimportant detail
Never used - consumed time and effort on the part of the people who wrote it, but was never used
Contradictory - different portions of the documentation say contradictory things
Badly written/unclear - It is difficult for readers to understand what is meant
What is Rationale Overview?
Rationale is the justification of decisions
Rationale is critical in two areas: it supports decision making and knowledge capture
Rationale is important when designing or updating (e.g. maintaining) the system and when introducing new staf
How does Rationale help with change?
Improve maintenance support
- Provide maintainers with design context
Improve learning
- New staff can learn the design by replaying the decisions that produced it
Improve analysis and design
- Avoid duplicate evaluation of poor alternatives
- Make consistent and explicit trade-offs
What are Rationale activies made up of?
the issues that were addressed,
the alternative proposals which were considered,
the decisions made for resolution of the issues,
the criteria used to guide decisions and
the arguments developers went through to reach a decision