04 Software Architecture Flashcards
what is stakeholder communication
discuss system without confusing details
software architecture components
identify structure of software system with a set of interacting components and design guiding principles
what is project planning
high level architecture view
what is large scale resue
architecture tat may be reusable across a range of systems
why is software architecture important
- affects performance, robustness, distributability and maintainability
- show how system is organised and how components interoperate
- refactoring system architecture is expensive as many components will be affected
architecture decision factors
- non functional characteristics
- affects all users - product lifetime
- long life = need architecture to be evolvable - software reuse
- save time/effort but may constrain architectural choices - number of users
- support quick scale and down to prevent performance degrade - software compatibility
- adopt products in different system limit architectural choices
types of software architectural patterns
- model view controller MVC
- layered
- repository
- client server
- peer to peer
- pipe and filter
- plugin
model view controller MVC pattern
divides system into 3 components
model: data store
view: data representation
controller: server
user use controller
controller manipulate model
model updates view
user sees updated view
when should we choose MVC pattern
- when multiple ways to view and interact with data are needed.
- when future requirements for interactions are unknown
MVC pattern advantages and disadvantages
advantages
- allow data to change independently of its representation and vice versa
- present data in different ways
disadvantages
- may involve additional code and complexity
layered pattern
- organises system into layers with associated functions each
- layer only provides services to layer above it
- lowest layer is the core service
- when a layer changes, only adjacent layers affected
when should layered pattern be used
- when building new facilities on top of existing systems
2. development spread across multiple team responsible for a layer each
layered pattern advantages and disadvantages
advantages
- able to replace entire layer with interface maintained
- redundant facilities provide at each layer
disadvantages
- clean separation of layers is difficult
repository pattern
large amount of shared data held in central database that can be accessed by all subsystems
components only communicate with the repository
when should repository pattern be used
- large volume of data generated and stored for a long time
2. when inclusion of data in repository triggers actions in data-driven system
repository pattern advantages and disadvantages
advantages
- no need to know the existence of other components
- all data is consistent
disadvantages
- failure in repository affects entire system
- inefficient communication
- distributing central repository across several PC is difficult
client server pattern
functionality organised as services which may be stored in different servers
clients access servers for services
when should client server pattern be used
data is stored in database and is accessed from different location
client server pattern advantages and disadvantages
advantages
- servers can be distributed across network
- easy to add or upgrade servers
disadvantages
- susceptible to attacks
- performance is unpredictable and depends on network
- difficult to manage if servers are owned by different organisations
peer to peer pattern
peer act as client and server
responsibility for hosting and managing services are shared amongst clients
when should peer to peer pattern be used
need computational power but constrained by hardware capabilities
peer to peer pattern advantages and disadvantages
advantages
- decentralised
- reliable
- failure of 1 peer does not affect others
disadvantages
- how to look for other peers offering the same services
- unsure is peers are trustable
pipe and filter pattern
data processed and then used
pipe and filter pattern advantages and disadvantages
advantages
- easy to understand
- supports transformation reuse
- easy to add transformations
disadvantages
- long system overhead
- cannot reuse with incompatible data
plugin (microkernel) pattern
flexible for users to extend their own functionality
core systems is always present
when should plugin pattern be used
need easy extension of more functionalities
need additional features to be added in later
when should plugin pattern be used
need easy extension of more functionalities
need additional features to be added in later
plugin pattern advantages and disadvantages
advantages
- app remains small
- customisable, small, easily added
disadvantages
- difficult to decide what to put into the micokernel
- too many plugin slows down application
- slow testing