CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of...

25
CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide

Transcript of CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of...

Page 1: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Software Architecture

“Good software architecture makes the rest of the project

easy.” McConnell, Survival

Guide

Page 2: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Outline

Part 1 – Basics of software architecture

Part 2 – Common architecture models

Part 3 – Real examples

Page 3: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Readingso The architecture of Web applications,

Grady Boocho Software Project Survival Guide,

McConnell, p144-150o [optional] Software Architecture, Garlan,

http://www.cs.cmu.edu/afs/cs/project/able/ftp/encycSE2001/encyclopedia-dist.pdf

These all get two thumbs up!!

Page 4: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

The basic problem

Requirements Requirements

Code Code

?????

How do you bridge the gapbetween requirementsand code?

Page 5: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

One answer

Requirements Requirements

Code Code

A miracle happens!

What lifecycle model does thisremind you of?

Page 6: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

A better answer

Requirements Requirements

Code Code

Software Architecture

Provide a high level framework to build and evolve the system

Page 7: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

What exactly is an architecture?At the core of most all definitions is the

notion that the architecture of a system describes its gross structure --

o Main components and their behaviorso Connections between the components

-- using one or more views

An architecture bridges the gap between requirements and code

Page 8: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

An architecture helps with … System understanding - thinking about simplicity,

identify the major components and understand what you need them to do

Reuse – identify opportunities as you look at the big picture

Construction – aim for simplicity to manage development, provides a blueprint to work from

Evolution - helps identify things likely to change

Management – milestone in the lifecycle

Communication – way of sharing info with your stakeholders Garlan

Page 9: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

An architecture helps with … System understanding

Reuse

Construction

Evolution

Management

Communication

level of abstraction, vocabulary, constraints

of components, identifies commonalities

organization for change, separates “what” from “how”

good milestone

partial blueprint

between stakeholders

Garlan

Page 10: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Back to “views”

A view illuminates a set of top-level design decisions• how the system is composed of interacting parts• where are the main pathways of interaction• key properties of the parts• information to allow high-level analysis and appraisal

Page 11: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Importance of viewsMultiple views are needed to understand the

different dimensions of systems

Functional Requirements

Performance (execution) Requirements

Release requirements (including BOM)

Installation Requirements

Booch

Page 12: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Let’s make this more concrete

We‘ll start with diagrams of some familiar architectures

And then look at several views of the Cray RS system architecture

Page 13: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Web application (client-server)

Booch

Page 14: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Model View Controller

Separates the application object (model) from the way it is represented to the user (view) from the way in which the user controls it (controller).

UserUser

ModelModel

ControllerControllerViewView

Application

sees uses

updates manipulates

Page 15: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

MVP – Sequence diagram (UML)

Page 16: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Pipe and filter

Filter - computes on the data

Pipe – passes the data

,,,

Each stage of the pipeline acts independently of the others. Can you think of a system based on this architecture?

top | grep alverson | grep acrobat

Page 17: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

LWK Linux

Compute Service & IO

Service Partition (256 nodes)• Linux OS• Specialized Linux nodes

Login Nodes ~ 10

Dedicated Functional Nodes

IO Server Nodes ~ 190

Network Server Nodes ~ 50

FS Metadata Server Nodes ~ 4

Database Server Nodes ~ 2

Compute Partition (10K nodes)

Sandia LWK OS (Catamount)

RAID Controllers

Network

PCI-X

10 GigE

Fiber ChannelPCI-X

RS Software Architecture

Page 18: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Allocator PBS mom

Job Launch

Compiler PerfToolTotalView

Login Node

Showmesh

LinuxLibraries

User Space

Boot

Portals

Portals Driver IPPortals Driver Support RCA

RCA

RCA daemon

Parallel File Systems

Support Services & daemons

Com

mon

Operating System

3rd Party3rd Party CrayCraySandiaSandia Open SourceOpen

Source3rd Party

Cray Integration3rd Party

Cray Integration

User’s Environment

Accounting

DBPBS srv

Server Node

Dedicated Server Functions

IO & FS daemons

IO Node

IO & Network

Nodes only

FC Driver

10GigEDriver

Dedicated Network & External RAID IO

Specialized by N

ode F

unction

Runs on all Service and IO Nodes

RS: Service Nodes

Page 19: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

LWK on Compute Side

SeaStar

RS: Message Passing

Application

LWKPortalsModule

Firmware Lib

Firmware

Portals3.2

MPI Library

PortalsState

Application

SSNAL

Kernel Lib

MPI Library orSML Library

API

SeaStar

FirmwareDriverState

PortalsState

Messages over High Speed Network

User

Kernel

HW

Linux on Service Side

Page 20: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Job Launch

Login Node

Linux

UserApplication

Login &

Start App

Red Storm User ComputeNode

Allocator

Database Node

Request CPU’s

CPU Inventory Database

CPU list

Load Application

catamount/QK

Compute Node

PCT

UserApplication

Fan out application

Application Runs

IO NodeIO

daemons

IO NodeIO

daemons

IO NodeIO

daemons

IO R

equ

ests from

Co

mp

ute N

od

es

IO N

od

es Im

plem

ent R

equ

est

Application Exit & Cleanup

Return CPU’s

Return CPU’s

RS: Job Launch

Page 21: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

RS: System boot

Requirement 5.11 The full system must be able to be booted in less than 15 minutes after a clean shutdown.

Service Nodes 1. RAS broadcasts kernel to Service nodes2. Service nodes verify Unix image is valid

If not, first loads image from RASand others, load from peer

3. Service nodes are up and running

Compute Nodes1. RAS broadcasts kernel to cage controllers2. Cage controllers broadcast to other nodes3. Compute nodes are up and running

C CC C

C C

R R

I II I

LL

Golden unix kernelGolden unix imageGolden micro kernel

RAS

Page 22: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Let’s reflect … Did you find the multiple views of the RS

system helpful in understanding its operation?

Would one view have sufficed?

Page 23: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Let’s discuss… What makes a software architecture different

from software design? Is there a difference?

o Web applicationo Red Storm OSo Mailman packageo Database schemao Linked list o Factory patterno Iterator

Architecture – spans the systemDesign – spans a component of the system

… shades of gray …

Page 24: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Another question … Could you start coding from any of these

diagrams? If you had the Model component and your partner had the View, could you both go off and develop, returning in a month to integrate?

What information would a design view need to allow you to get started, somewhat independently?

Page 25: CSE 403, Spring 2007, Alverson Software Architecture “Good software architecture makes the rest of the project easy.” McConnell, Survival Guide.

CSE 403, Spring 2007, Alverson

Coming soon to theatres near you UML

o Unified Modeling Language or Union of all Modeling Languages

Language to describe the architecture/design of a system

We’ll look at a subset:o Class diagramso Sequence diagrams