Академический Документы
Профессиональный Документы
Культура Документы
CS130
Lecture 5
Administrivia
Requirement documents were due today
One document per team
Dont worry if you think it is not perfect yet it is
likely to change over the quarter
Administrivia: NDAs
When you work on a project, you can be privy
to a lot of confidential information from a
client
Non-disclosure agreement
Business issues?
Ethical issues?
What happens when you switch jobs?
Software architecture
The design process for identifying the subsystems making up a system and the
framework for sub-system control and
communication is architectural design.
The output of this design process is a
description of the software architecture.
Architectural design
An early stage of the system design process.
Represents the link between specification and
design processes.
Often carried out in parallel with some
specification activities.
It involves identifying major system
components and their communications.
Advantages
Stakeholder communication
System analysis
Large-scale reuse
Architecture reuse
Systems in the same domain often have similar
architectures that reflect domain concepts
Application product lines are built around a
core architecture with variants that satisfy
particular customer requirements
Architectural styles
In order to create more complex software it is necessary
to compose programming patterns
For this purpose, it has been useful to induct a set of
patterns known as architectural styles
Examples:
Components
Connectors
Interfaces
Configurations
Example
Pipe-and-filter
Repositories
Event based systems (implicit invocation)
Model-View-Controller
Layered systems
Object-oriented architectures
Process controls
Pipe-and-filter
Source: Adapted from Shaw & Garlan 1996, p21-2.
filter
pipe
filter
pipe
filter
pipe
filter
pipe
pipe
pipe
pipe
filter
filter
pipe
pipe
Pipe-and-filter
Examples:
Signal Processing
Interesting properties:
Example: Click
Network routers are complicated pieces of
code
Eddie Kohlers idea: Write routers as modular
components connected by pipe-and-filter
Pipe-and-filter
Advantages
Pipe-and-filter
Disadvantages
Think About
How to schedule a pipe-and-filter
architecture on a sequential or multi-core
machine?
Repositories
Source: Adapted from Shaw & Garlan 1996, p26-7.
agent
agent
agent
agent
blackboard
(shared
data)
agent
agent
Repositories
Examples
databases
modern compilers
programming environments
Interesting properties
Disadvantages
agent
announce
event
broadcast
broadcast
medium
medium
agent
listen for
event
announce agent
event
event based: implicit invocation: Independent reactive objects
(or processes)
components: objects that register interest in events and objects
that signal events
connectors: automatic method invocation
control: decentralized, de-coupling of sender and receiver
topologies: arbitrary
Prof. Majumdar CS 130 Lecture 5
Interesting properties
Disadvantages
More Examples
Web servers, file servers
Embedded Systems
Sensor networks
Model-View-Controller
Example of Model-View-Controller
Layered Systems
Source: Adapted from Shaw & Garlan 1996, p25.
application layer
users
utilities
kernel
Layered Systems
Examples
Operating Systems
communication protocols
Interesting properties
Reuse
Layered Systems
Disadvantages
object
object
object
method
invocation
object
object
method
invocation
method
invocation
components: managers
connectors: method invocation
control: decentralized
topologies: arbitrary
Prof. Majumdar CS 130 Lecture 5
Interesting properties
Disadvantage
Process Control
Source: Adapted from Shaw & Garlan 1996, p27-31.
input variables
control
parameters
controller
manipulated
variables
rs
o
ns
e
s
process
actuators
controlled
variables
Process control:
components: autonomous processes that continually read input
signals and write output signals
connectors: message passing network
control: decentralized, de-coupling of controller and process
topologies: arbitrary
Process Control
Examples
Interesting properties
Disadvantages
Summary
Architecture is what enables us to scale up
our software to handle larger applications
You must gain the ability to match the right
architecture to the right application
Think About
How can architectures help reason about nonfunctional requirements?
Safety?
Security?
Dependability?
Performance?
Availability?
Maintainability?
Examples
Performance
Security
Safety
Availability
Maintainability
Conflicts
Using large-grain components improves
performance but reduces maintainability
Introducing redundant data improves availability
but makes security/consistency more difficult
Localizing safety-related features usually means
more communication so degraded performance
Prof. Majumdar CS 130 Lecture 5
Distributed Architectures
Middleware
Software that manages and supports the different
components of a distributed system. In essence, it
sits in the middle of the system.
Middleware is usually off-the-shelf rather than
specially written software.
Examples
Transaction processing monitors;
Data converters;
Communication controllers.
Multiprocessor architectures
Simplest distributed system model.
System composed of multiple processes which
may (but need not) execute on different
processors.
Architectural model of many large real-time
systems.
Distribution of process to processor may be
pre-ordered or may be under the control of a
dispatcher.
Prof. Majumdar CS 130 Lecture 5
Sensor
processor
Sensor
control
process
Traffi c fl ow
processor
Display
process
Light
control
process
Traffi c lights
Traffi c fl ow sensors and
cameras
Operator consoles
Client-server architectures
Application modelled as a set of
services provided by servers and
set of clients that use these services
Network for communication
Client-server characteristics
Advantages
Distribution of data is straightforward
Makes effective use of networked systems
Easy to add new servers or upgrade existing servers
Disadvantages
No shared data model so sub-systems use different data
organisation. Data interchange may be inefficient
Redundant management in each server;
No central register of names and services - it may be hard to
find out what servers and services are available
Prof. Majumdar CS 130 Lecture 5
A client-server system
c3
c2
c4
c12
c11
s4
s1
c1
Server process
c10
c5
s2
c6
c7
Client process
s3
c9
c8
c1
CC1
c2
CC2
CC3
c3, c4
Network
s1, s2
s3, s4
SC2
Server
computer
SC1
c5, c6, c7
c8, c9
CC4
CC5
Client
computer
data
Fat-client model
Presentation
Thin-client
model
Data management
Application processing
Client
Presentation
Application processing
Fat-client
model
Server
Client
Server
Data management
Disadvantage:
places a heavy processing load on both the server
and the network
latency
Prof. Majumdar CS 130 Lecture 5
Application layers
Presentation layer
Application processing
layer
Data management
layer
Prof. Majumdar CS 130 Lecture 5
Three-tier architectures
Allows for better performance than a thinclient approach
Simpler to manage than a fat-client approach
Recall: MVC
A more scalable architecture - as demands
increase, extra servers can be added.
Prof. Majumdar CS 130 Lecture 5
Presentation
Client
Server
Server
Application
processing
Data
management
Client
Client
HTTP interaction
Web server
Account service
provision
SQL query
Client
Client
Database server
SQL
Customer
account
database
o1
o2
o3
o4
S (o1)
S (o2)
S (o3)
S (o4)
o5
o6
S (o5)
S (o6)
Advantages
Can delay decisions on where and how services should
be provided
New resources to be added to it as required
Scaleable
Possible to reconfigure the system dynamically with
objects migrating across the network as required
CORBA
CORBA is an international standard for an Object
Request Broker - middleware to manage
communications between distributed objects
Middleware for distributed computing is required at 2
levels:
At the logical communication level, the middleware allows
objects on different computers to exchange data and control
information;
At the component level, the middleware provides a basis for
developing compatible components. CORBA component
standards have been defined.
Prof. Majumdar CS 130 Lecture 5
Application
objects
Domain
facilities
CORBA services
Horizontal C
ORBA
facilities
Service-oriented architectures
Based around the notion of externally
provided services (web services)
A web service is a standard approach to
making a reusable component available and
accessible across the web
A tax filing service could provide support for users
to fill in their tax forms and submit these to the
tax authorities
Prof. Majumdar CS 130 Lecture 5
Web services
Service
registry
Publish
Find
Service service
provider
Service
requestor
Bind
Services standards
Services are based on agreed, XML-based
standards so can be provided on any platform
and written in any programming language.
Key standards
SOAP - Simple Object Access Protocol;
WSDL - Web Services Description Language;
UDDI - Universal Description, Discovery and
Integration.
Services scenario
An in-car information system provides drivers with
information on weather, road traffic conditions, local
information etc. This is linked to car radio so that
information is delivered as a signal on a specific radio
channel
The car is equipped with GPS receiver to discover its
position and, based on that position, the system
accesses a range of information services. Information
may be delivered in the drivers specified language.
Automotive system
Road traffic info
Weather
info
Facilities
info
gps coord
Road
locator
gps
coord
gps coord
Info
stream
Language
info
Receiver
Receives
information stream
from services
Radio
Translates dig
ital
info stream to
radio signal
Traffic
info
Collates information
Service discovery
Finds available
services
command
gps coord
Transmitter
Sends position and
information request
to services
User interface
Receives request
from user
Locator
Discovers car
position
In-car software system
Next time
Design patterns