Architectures - University of Texas at El Paso

Download Report

Transcript Architectures - University of Texas at El Paso

Software Architecture
CS 4311 Spring 2010
Class Lecture
Example Software Architectures
1.
2.
3.
4.
5.
Batch Sequential
Blackboard
Client Server
Database-centric
Distributed
Computing
6. Event driven
7. Interpreter
8. Monolithic
application
9.
10.
11.
12.
13.
14.
15.
16.
17.
Peer-to-peer
Pipe and Filter
Plug-in
Service-oriented
Search-oriented
Space-based
Shared nothing
Three-tier model
Rule evaluation
Batch Sequential
• Enrique
• Chris
Batch Sequential Architecture
• What is it?
– A series of dedicated and independent components that transforms
data in a sequential manner (Each component needs to finish its
task before the next one can start).
• What problem does it solve and how?
– Solve complex tasks
• by divide it into several easier tasks.
– Modifiability/Maintainability
• Easy to change/fix the behavior of a component.
– Reusability
• By only changing the components that interact with the
environment the system can work on different structures.
• Example
– Run on a web browser
– Run as an independent application
– Flexibility
Batch Sequential Architecture
• Actors
– The actors consist of the independent components
(programs) that run in sequence to achieve the
ultimate desired output of the system.
– Each components is responsible for a particular
task and supplies the next component with the
intermediate data once it has completed its task.
• How do they relate to each other?
– They are related to each other by the data that they
each transform.
Batch Sequential Architecture
*Example: Compiler
*Software Design Methodology, By Hong Zhu © 2005
• Jeremy Montoya
• Cesar Valenzuela
• Edgar Padilla
• Behavioral pattern
• Blackboard uses a generalized observer
that allows multiple readers and writers.
This helps communicate information
system-wide.
• Used to handle complex, ill-defined
problems where the solution is the sum of
its components.
• Traditionally used in the
development of systems
with artificial intelligence
techniques
• Solves nondeterministic
problems such as decision
support, signal processing
and speech recognition
• (http://informingscience.o
rg/proceedings/InSITE20
05/I58f73Metz.pdf)
• Knowledge source – provides specific
expertise that is needed by the application.
• Blackboard – in a way it can be thought of
as a “dynamic” library of contributions
made by knowledge sources
• Control – controls what problem solving
activity goes on in the system.
“moderator”
• Knowledge sources contribute their
expertise and gathered knowledge to the
Blackboard.
• Knowledge sources may also interact and
with other ones to allow flexibility in the
application.
• Control decides when knowledge sources
may perform their operations.
Client Server Architecture
Adolfo Martinez
Krasen Petrov
Daniel Chavez
Client Server Architecture
• What is it?
• Problem it solves
– Cost
– Performance
– Maintenance
Client Server Architecture
• How the problem is solved
• The actors in the Client Server Architecture
– Client
– Server
– Network
Client Server Architecture
Example:
Database-Centric
What is it?
• It is an alternative approach to a description of a design. We can use it
for different programming applications; it provides a higher degree of
reliability, efficiency, and scalability than conventional approaches to
distributed processing.
What problems does it solve?
• Database-centric solves data management and processing of it. Critical
databases applications always become necessary to introduce a global
transaction monitor, which can significantly reduce performance and
scalability, but not with database centric.
How does it solve the problem?
• Computes all the data to a single place, in this case the database.
Paden Portillo
Oscar Chavez
Emmanuel Moreno
Actors and their roles
DATABASE
SERVER 1
Client
1
Client
2
Client
3
SERVER 2
Client
4
Client
5
Client
6
Benefits:
Reduces amount of code, Reduces development Time,
Reduces network traffic, Reduces complexity of applications
Distributed (one of many)
• Ben
• Joel
• Victor
SETI@Home
A Distributed Computing Case Study
• Distributed computing (AKA grid computing) is a
software architecture that makes use of the hardware
on several computers.
• Distributed computing is primarily used to solve
those problems that require exceptionally heavy
computation.
• SETI@Home was the first project that demonstrated
the feasibility of distributed computing to solve
these problems.
– Indeed, this was one of the primary goals of
SETI@Home.
– The specific problem SETI@Home is used for is to
detect intelligent life outside of Earth.
SETI@Home
A Distributed Computing Case Study
• The actors of SETI@Home:
– Data - Astronomical data collected at the Arecibo Observatory
– Central Server - Sends data to personal computers through the Internet
– Personal Computers - Analyze received data using processor cycles that
are unused by the owner of the computer (e.g. when the computer is
idle) to detect evidence of intelligence in data
• The architecture of SETI@Home allows researchers to do massive
computations at a minimal cost by forgoing the need of a
supercomputer.
• The software written for SETI@Home requires 2 components:
– Central server software manages the distribution of data across personal
computers and the collection of analyzed data.
– Personal computer software performs analysis and monitors processor
usage, ensuring that analysis is done only when the processor is not
otherwise needed.
Event
• Roberto
• Alejandro
• Sam
Event Driven Architecture
• Components in the system react to certain events.
– For example
• State changes
• I/O events
• Creates responsiveness in a changing environment
• Actors
– Agents: components in a system that generate events
– Sinks: event consumers
• Responsibility of applying action as soon as event is present
• May act as a filter to another component
• May provide an action based the given event
Event Driven Architecture
• Characteristics
– Facilitates responsiveness
– Works great in un-normalized unpredictable
environments
• Event flow
– Sensing of fact
– Technical representation in the form of an event
– Reaction(s) to set event
• Example
– Email application displays a message stating that a
new e-mail has been received
Event Driven Architecture
Agent
event
event
transformation
Sink 1
action
Sink 2
action
Sink 3
action
Sink
n-1
Sink n
action
Interpreter
Don Jackson
Luis DeHaro
Arely Mendez
Interpreter
• Behavioral design pattern used to evaluate
sentences in a language.
Problem
A class of problems occurs repeatedly in a well-defined and
well understood domain. If the domain were characterized
with a "language", then problems could be easily solved
with an interpretation "engine".
Solution
• Maps the domain to a language, the language to a grammar,
and the grammar to a hierarchical object-oriented design.
• Each symbol is represented as a class. The problem is
represented as a tree where the leaves are terminals and the
inner nodes are combination rules. The problem is solved by
traversing the tree until only terminals are derived.
Actors
• Abstract expression declares the abstract interpreter to all nodes
• Terminal expression needs one instance per terminal in a
sentence
• Non-terminal expression maintains the instance variable for
each rule
• Context contains the information global to the interpreter
• Client builds an abstract syntax tree representing the sentence
Interpreter
Sources
• http://en.wikipedia.org/wiki/Interpreter_pattern
• http://www.cs.purdue.edu/homes/jv/510s05/patter
ns-pt2.pdf
• http://alumni.media.mit.edu/~tpminka/patterns/Int
erpreter.html
• http://www.vincehuston.org/ps/hanoi_article.html
Monolithic Application
Software Architecture
Sandra
Josh
Essau
Single-Tier Architecture
• Concept of having user interface and
application of data access in one single
program.
• Only application is accountable for
computations
• Simplest software configuration
– No modularity
– Not a typical Software Engineering Concept
Why Monolithic Application?
• Low Cost
– Less Complex
– No need to develop external computational or
processing modules
• Simple and Quick design
– Single independent application
• No need for future expansion of software
– Not easily maintained
P2P
• Adrian
• Ivan
• Natalia
Peer-to-Peer Architecture
• A type of architecture in which each class
has equivalent capabilities and
responsibilities
• A class can collaborate with any other class
and vice versa
• Every class has access to the resources
needed
• Every class gives access to all its resources
• No Super-classes
Plug In
Luis
Armando
Hector
Plug-in Architecture
• It is an architecture that allows a program to
“look for” add-in functionality at startup
and for the plug-in to cooperate with it.
• It solves the need for added functionality,
reducing the size of an application, and
allowing 3rd party developers to add
features.
• Plug-ins are added to the application as they
are needed.
Actors
• Host Application, Plug-in, Interface
SERVICE-ORIENTED ARCHITECTURE
GEOFFREY OWEN
VALERIA ESTRADA
TEAM 12
Service-Oriented Architecture
(SOA)
• What is it?
– Provides access to multiple components or
functions
– Client doesn’t know what components or how
functionality is implemented
• Problem
– Client needs access to multiple features
however the client shouldn’t know how those
features are implemented
SOA
• Solve the Problem
– Provides an interface that obscures the components
and gives the client a single access point.
• Actors
– Client
– Components
are outside systems
• Relate
– Client sends request to the service (the system)
– Service sends request to the correct components
Search
Jessica
Adrian
Search-Oriented Architecture
• Typical multi-tier architecture
– A type of client-server architecture
Search-Oriented Architecture
Search-Oriented Architecture
• Data tier
– Either replaced or placed behind another tier
– New tier contains a search engine and search
engine index
• Queries
– No longer done using database management
system
– Done through use of search engine
Search-Oriented Architecture
• Benefit
– Increase in response time
– Creation of large, dynamic datasets
Space Based Architecture
By: Ernie Esquivel and Jorge
Mendoza
• What is it?
– A type of architecture based on the use of spaces, which can be
used to store data and communicate with several services inside
an application, also known as a Processing Unit
• What problem does it solve?
– Scalability
• How does it solve the problem?
– Through parallel processing
– Several Processing Units can be added dynamically since they
operate independently
• What are the actors?
– The client, the space and the services
• How do they relate to one another?
– The client writes an object to a space. The services inside the
Processing Unit read the object from the space, modify it, and
return it back to the space. The modified object is sent back to
the client.
Shared Nothing Architecture
Presenter: Hieu Duong
Derek Myerly
Shared Nothing (SN)
• Distributed computing architecture that utilizes
message passing instead of shared-disk or
memory method:
▪ Have own private memory, input/output devices
independently
▪ Are self sufficient
▪ Share nothing across network
Actors
•
•
•
•
CPU
Memory
Hard disk
I/O devices
Problems to solve
•
•
•
•
Scalability
Parallel processing
Bottlenecking
Failures
How does it solve the problems?
• Independent nodes
• Message passing
Three-tier architecture
Cesar Cervantes
Adrian Franco
Hugo Porras
What is it
• client-server architecture
• Three different tier
-Presentation
Input/ output
-Business
Data processing
-Data Access
Read/Write
Three-tier Advantages
• Highly Cohesive and low coupling
• Allows change in modules with out effect
on the other tiers
• Encapsulates tasks
What should you know about
software architectures (e.g., for
the exam)?
What should you know about software
architectures (e.g., for the exam)?
• 16 architectures were presented in class.
• You should know about each of them.
– Name
– Organization of components
– How components fit together
• Be able to identify an architecture from a system
description
• Be able to design a system using an architecture
• Be able to choose an appropriate architecture