Professional Documents
Culture Documents
A module is a system component that provides services to other components but would not
normally be considered as a separate system.
A component is a unit of computation or a data store. Components are loci of computation and
state.
Examples: clients, servers, databases, filters, layers, ADTs
A component may be simple or composite
composite components describe a (sub)system
an architecture consisting of composite components describes a system of systems
A connector is an architectural element that models interactions among components and rules
that govern those interactions. There can be simple and complex interactions.
Simple interactions
procedure calls
shared variable access
Complex and semantically rich interactions
client-server protocols
database access protocols
piped data streams
An architectural configuration or topology is a connected graph of components and connectors
that describes architectural structure.
Why Is Software Architecture Important?
1. Communication among stakeholders.
Software architecture represents a common abstraction of a system that most of the
system's stakeholders can use as a basis for mutual understanding, negotiation and
communication. Customers, managers, designers, programmers etc are the stakeholders.
2. Early design decisions.
Software architecture manifests the earliest design decisions about a system and these
early bindings helps in systems remaining development, its deployment and its maintenance life.
It is also the earliest point at which design decisions governing the system to be built can be
analyzed. The early decisions are the most difficult to get correct and hardest to change later in
the development process, and they have far reaching effects.
a) The architecture defines constraints on implementation
b) The architecture dictates organizational structure
c) The architecture guides in evolutionary prototyping
3. Transferable abstraction of a system to similar systems (reuse):
2
Software architecture constitutes a model of how a system is structured and how its
elements work together. It can be applied to other systems exhibiting similar quality attribute and
functional requirements and can promote large-scale re-use. While code re-use is beneficial, reuse at architectural level provides tremendous leverage for systems with similar requirements.
Hardware design levels
1. Processor-Memory-Switch level (PMS level)
Level at which an architect views the system.
It is simply a description of the system components and their interconnections.
The components are specified in the form of a block diagram.
Components are processors/P, memories/M, switches/S, controls/K, transducers/T, data
operators/D and links/L.
2. Programming Level
Structures: Programs, Subprograms
Components: State(memory cells), instructions, operators, controls, interpreter.
3. Logic design level
The behaviour is less visible, while the hardware structure predominates.
i) Register Transfer Level
Circuits: Arithmetic unit
Components: Registers, multiplexers, decoders, buses,
buffers, Controls, Data operators
ii) Switching circuits sublevel:
a) Combinatorial
2. Code
3. Executable
Design issues involve memory maps, data layouts, call stacks and register
allocations
Components are bit patterns supported by hardware
Operations and compositions are described in machine code
Architectural Styles:
An architectural style defines a family of systems in terms of a pattern of structural
organization. This provides a vocabulary of components and connector types, and a set of
constraints on how they can be combined. A semantic model may also exist which specify how
to determine a system's overall properties from the properties of its parts.
Different architectural styles
1) Pipes and Filters :
In a pipe and filter style each component has a set of inputs and a set of outputs. A
component reads streams of data on its inputs and produces streams of data on its outputs,
delivering a complete instance of the result in a standard order.
This is usually accomplished by applying a local transformation to the input streams and
computing incrementally so output begins before input is consumed. Hence components
are termed filters.
The connectors of this style serve as conduits for the streams, transmitting outputs of one
filter to inputs of another. Hence the connectors are termed pipes.
Weaknesses:
Advantages
It is possible to change the implementation without affecting the clients because an object
hides its representation from clients.
The bundling of a set of accessing routines with the data they manipulate allows designers to
decompose problems into collections of interacting agents.
Disadvantages
6
Whenever the identity of object changes it is necessary to modify all other objects that
explicitly invoke it.
Further there can be side effect problems: if A uses object B and C also uses B, then C's
effects on B look like unexpected side effects to A, and vice versa.
Instead of invoking the procedure directly a component can announce one or more
events.
Other components in the system can register an interest in an event by associating a
procedure to it.
When the event is announced, the system itself invokes all of the procedure that have
been registered for the event. Thus an event announcement implicitly causes the
invocation of procedures in other modules.
The components in an implicit invocation style are modules whose interface provides
both a collection of procedures and a set of events.
For example, in the Field system, tools such as editors and variable monitors register for a
debuggers breakpoint events. When a debugger stops at a breakpoint, it announces an event that
allows the system to automatically invoke methods in those registered tools. These methods
might scroll an editor to the appropriate source line or redisplay the value of monitored variables.
In this scheme, the debugger simply announces an event, but does not know what other tools (if
any) are concerned with that event, or what they will do when that event is announced.
Invariants:
event generators do not know about which components will be affected by those events,
functional impact on different components
components cannot make assumptions about order of processing, what processing will occur
as a result of their events.
Advantages:
o Any component can be introduced into the system simply by registering it for the
events of that system.
Implicit invocation eases system evolution.
4) Layered Systems :
A layered system is organized hierarchically, each layer providing service to the layer above it
and serving as a client to the layer below.
In some layered systems inner layers are hidden from all except the adjacent outer layer, except
for certain functions carefully selected for export. Thus in these systems the components
implement a virtual machine at some layer in the hierarchy.
The connectors are defined by the protocols that determine how the layers will interact.
Examples:
Layered communication protocol
Operating systems
Database systems
Advantages:
o They support designs based on increasing levels abstraction. This allows implementers to partition a
Not easily all systems can be structures in a layered fashion. And even if a system can logically be
It can be quite difficult to find the right levels of abstraction. Difficulty to mapping existing
protocols into the ISO framework as many of those protocols bridge several layers.
difficult to define system independent layers (as with filters)since a layer must support the
specific protocols at its upper and lower boundaries.
5) Repositories :
Invocation of a knowledge source is triggered by the state of the blackboard. The actual locus of
control, and hence its implementation, can be in the knowledge sources, the blackboard, a
separate module, or some combination of these.
Blackboard systems have traditionally been used for applications requiring complex
interpretations of signal processing, such as speech and pattern recognition.
Egs:
Batch sequential systems with global databases are a special case. Programming
environments are often organized as a collection of tools together with a shared
repository of programs and program fragments.
Compiler architecture can be viewed as a shared architecture
Advantages
Each subsystem does not have to take care of how data are produced/consumed by other
subsystem.
Efficient way to share large amounts of data
Allows a centralized management for system backup, security and concurrency control
Disadvantages
10
6) Interpreters :
In an interpreter organization a virtual machine is produced in software.
An interpreter includes the pseudo-program being interpreted and the interpretation engine itself.
The pseudo-program includes the program itself and the interpreters analog of its execution state
(activation record).
The interpretation engine includes both the definition of the interpreter and the current state of
its execution.
Ie it has four components:
an interpretation engine to do the work,
a memory that contains the pseudo- code to be interpreted,
a representation of the control state of the interpretation engine, and
a representation of the current state of the program being simulated.
Interpreters are commonly used to build virtual machines that close the gap between the
computing engine expected by the semantics of the program and the computing engine available
in hardware .
Ex: JVM or virtual Pascal machine
Advantages:
Executing program via interpreters adds flexibility through the ability to interrupt and query the
program
Portability
Simulation of non implemented hardware
11
Disadvantages:
Performance cost because of additional computational involved
Extra level of indirection slows down execution.
7) PROCESS CONTROL PARADIGMS
Process variables: properties of the process that can be measured.
Controlled variable: process variable whose value of the system is intended to control.
Manipulated variable: process variable whose value can be changed by the controller inorder to regulate
the process.
Input variable process variable that measures an input to the process
Set point the desired value for a controlled variable
Open-loop system system in which information about process variables is not used to adjust the system
Closed-loop system system in which information about process variables is used to manipulate a process
variable to compensate for variations in process variables and operating conditions
Feedback control system the controlled variable is measured and the result is used to manipulate one or
more of the process variables
Feed forward control system some of the process variables are measured, and anticipated disturbances
are compensated without waiting for changes in the controlled variable to be visible.
12
14