Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Architecture

Similar presentations


Presentation on theme: "Software Architecture"— Presentation transcript:

1 Software Architecture
CS 4311

2 Architecture Design at the highest level Example: bridge architectures
Cable-stayed Beam Suspension

3 Why do civil engineers talk about bridge architectures?
Design at the highest level Example: bridge architectures Arch Cable-stayed Beam Suspension

4 What is architecture? Dictionary definitions:
archangel, archenemy, archduke, archbishop matriarch, patriarch, monarch Arch as prefix or suffix: main, chief, principal, most important, highest, fundamental, basic, extreme or most characteristic, ruler, leader

5 Architecture The art and science of designing and erecting buildings
Fundamental underlying design of buildings Style and method of design and construction of buildings Buildings and other structures

6 What is software architecture?
Framework Mechanism Way Shape Form Means Organization Arrangement The Big Picture !

7 Software Architecture
the structure or structures of the system software components externally visible properties of those components the relationships between them the set of principle design decisions made about a software system.

8 What design decision? System structure Functional behavior Interaction
Nonfunctional properties Implementation System goals, Stakeholders, Nontechnical considerations

9 Independent Components
Broadcasts Client-server Event driven Components register for an event. System invokes all registered components when event happens. Example: Java AWT Dynamic, responsibility with event handler, not event generator. Can be hard to test/debug.

10 Virtual Machines Interpreters: Examples: Program to be executed
Interpreter: simulate instructions in program State: State of program, state of interpreter Examples: JVM Command language processors

11 Repositories Central Data store + operations {store, retrieve, update}
Traditional: transactions trigger processing Blackboard: Central store controls processing Processes write to central store (knowledge sources) Processes respond to changes in the store

12 Layered Architecture Layers are hierarchical
Each layer provides services to the outer layer which is a client to the inner layer Layers can have access to adjacent layers (direct access only) The design includes how each pair of layers interact (protocols) Layered architectures are often used for interactive information services

13 Example Layered security architecture Cryptography File interface
Key management User

14 Advantages and Drawbacks
+ Each layer can be seen as a higher level of abstraction + A change on one layer affects only layers interacting with the changed layer + Clearly favors reuse - Layers are not always obvious when looking at the requirements - Performance may suffer from the extra coordination among the layers

15 Layered Architectures in Interactive Information Systems
Browsers Presentation Web Server Application Control and Coordination App Server Domain Services and Information Db Server Legacy Database Services

16 Characteristic Object Roles
Windows and Widgets Presentation Interfacers Events Coordinators, and (application) controllers Results Application Services Messages Results Information holders, service providers, Structures, coordinators, and domain controllers Domain Services Messages Results Technical Services Interfacers

17 Locating Objects in Layers
Once we have agreed on a layered architecture, we need to identify objects (classes) in layers One approach is to use Class-Responsibility-Collaboration -objects collaborates mostly within their layers -client objects will tend to be in an outer layer (requests go inside) -information goes outside

18 Process Control Process maintains setpoint Control based on Examples:
input variables (feedforward) Output variables (feedback) Examples: Thermostat controlled heater “smart” stock trader

19 Architecture Elements
Components Connectors Configuration Topologies Models

20 Components Elements that encapsulate processing and data in a system’s architecture are referred to as software components. An architectural entity that encapsulates a subset of the system’s functionality and/or data, restricts access to that subset via an explicitly defined interface, and had explicitly defined dependencies on its required execution context.

21 Connector Elements that are tasked with effecting and regulating interactions among components. Application independent.

22 Configuration Topology
A set of specific associations between the components and connectors of a software system’s architecture.

23 Models An artifact that captures some or all of the design decisions that comprise a system’s architecture. Architectural modeling is the reification and documentation of those design decisions. Different models: structural vs. behavioral static vs. dynamic scope

24 Architectural Styles A named collection of architectural design decisions that: are applicable in a given development context, constrain architectural design decisions that are specific to a particular system with that context, and elicit beneficial qualities in each resulting system. Not about: specific systems, components, interaction mechanisms, or configurations.

25 An Architectural Style Example
Physically separate the software components used to request services from the components that provide the services, to allow for proper distribution and scaling up, both in the number of service providers and service requesters. Make the service providers unaware of the requesters’ identity to allow the providers to service transparently many, possibly changing requestors. Insulate the requesters from one another to allow for their independent addition, removal, and modification. Make the requesters dependent only on the service providers. Allow for multiple service providers to emerge dynamically to off-load the existing providers should the demand for services increase above a given threshold.

26

27 Architectural Styles Remarks:
Each style has its own advantages and drawbacks An application may require several architectural views Choosing the right views is a key factor in having a good design

28 Advantages of Architectural Styles
Each combination of styles emphasizes one or more of the quality attributes below: Usability Availability Security Performance Maintainability Flexibility Portability

29 Example Software Architectures
Batch Sequential Blackboard Client Server Database-centric Distributed Computing Event driven Interpreter Monolithic application Peer-to-peer Pipe and Filter Plug-in Service-oriented Search-oriented Space-based Shared nothing Three-tier model Rule evaluation

30 Assignment: Base Groups
Each teams has until next class to prepare a 3 minute description of the provided architecture You will present next class What is it What problem does it solve How does it solve the problem Who are the actors How do they relate to each other You will need to be efficient to cover the architecture in 3 minutes Send Aditi 2 or 3 powerpoint slides by 5pm Wednesday INCLUDE YOUR SOURCES

31 Example Software Architectures
Team 1 Blackboard Team 2 Interpreter Team 3 Plug-in Team 4 Search-oriented Team 5 Space-based Team 6 Shared nothing Team 7 Publisher-subscriber Team 8 Rule evaluation

32 Batch Sequential Architecture
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).

33 Batch Sequential Architecture
Solve complex task Divide complex tasks 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. Flexibility Additional components are easy to integrate.

34 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.

35 Batch Sequential Architecture
*Example: Compiler *Software Design Methodology, By Hong Zhu © 2005

36 Client-Server Architecture
Application context: Clients request services from a server Centralization of computation and data at the server Separation of user interface tasks from computation and data management and storage For examples: Websites, etc.

37 Client Server Architecture
Example:

38 Database-Centric Architecture
Critical databases applications always need a global transaction monitor. can significantly reduce performance and scalability. Architecture solves data management and processing of it. Computes all the data to a single place, in this case the database.

39 Actors and their roles Benefits:
DBMS SERVER 1 SERVER 2 Client 1 Client 3 Client 4 Client 6 Client 2 Client 5 Benefits: Reduces amount of code, development time, network traffic, complexity of applications.

40 Distributed Computing Architecture
Also known as grid computing. Makes use of the hardware on several computers. Primarily used to solve those problems that require exceptionally heavy computation. was the first project that demonstrated the feasibility of distributed computing to solve these problems. Indeed, this was one of the primary goals of The specific problem is used for is to detect intelligent life outside of Earth.

41 Distributed Computing Architecture
The software written for 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.

42 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

43 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 application displays a message stating that a new has been received

44 Event Driven Architecture
Agent Sink 1 Sink 2 Sink 3 Sink n-1 Sink n event action transformation

45 Monolithic Architecture
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 45

46 Why Monolithic Architecture?
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

47 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 Every class has access to the resources needed to fulfill its responsibilities and at the same time gives access to all of its resources to all other classes 47

48 Peer-to-Peer Architecture
Advantages: Decentralized computing with flow of control and resources distributed among peers Highly robust in the face of failure Scalable in terms of access to resources and computing power Cautions: When information retrieval is time critical Security

49 Pipe and Filter This is an architecture composed of filters and pipes:
A filter is a program that reads a stream and writes a stream A pipe is middle where that directs the output stream of one program to the input stream of another Transformed Data Transformed Data Input Data Filter Filter Filter

50 Pipe and Filter This is an architecture composed of filters and pipes:
A filter is a program that reads a stream and writes a stream A pipe is middle where that directs the output stream of one program to the input stream of another Useful when you have common stream processing programs that can be reused The cost is that a lot of I/O processing is duplicated (e.g., parsing the data)

51 Example Pipe and Filter
Example: Unix shell scripts ccl1 fred.txt | ccp0 | ccp1 | ccp2 > fred.o | is the pipe operator Read from the standard output of program to left Write to standard input of program to right

52 Pipe and Filter Components are isolated
Easy to understand and reuse filters Evolution is easy: replace filter Allows concurrent execution May be easy to analyze (analyze each filter for throughput, accuracy) Batch or stream, not interactive Replication of effort (reading, writing, parsing)

53 Service-Oriented Architecture (SOA)
Problem Client needs access to multiple features however the client shouldn’t know how those features are implemented SOA: Provides access to multiple components or functions Client doesn‘t know what components or how functionality is implemented

54 SOA Solve the Problem Actors
Provides an interface that hides the components and gives the client a single access point. Actors Client Components

55 Three-Tier Architecture
client-server architecture Three different tier Presentation Input/ output Business Data processing Data Access Read/Write

56 Three-Tier Advantages
Highly cohesive and lowly coupled Allows change in modules with out effect on the other tiers Encapsulates tasks


Download ppt "Software Architecture"

Similar presentations


Ads by Google