24
System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Embed Size (px)

Citation preview

Page 1: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

System Design &Software Architecture

Jonathan I. Maletic, Ph.D.

Department of Computer Science

Kent State University

Page 2: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

System Design

A system is decomposed in to subsystems System

Subsystem1 Subsystem2

Page 3: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

System Decomposition

• A subsystem provides a set of services to the system.

• A set of related operations that share a common purpose

• The set of services available to other systems form the subsystem interface

• Application Programmer Interface (API) includes name of operations, parameters/types, and return types

• System design focuses on defining services

Page 4: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

(sub) System Model

System Part

Class

+service()

Subsystem

1 *

#parts

1

*

Page 5: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Software Architecture

• Shaw & Garlan ’96

• The use of standard patterns and styles of design is pervasive in many engineering disciplines

• What standard style are used in software at the architectural level?

Page 6: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Architectural Style

• An architectural style defines a family of systems in terms of a pattern of structural organization– Components (e.g., client, server, DB)– Connectors (e.g., procedure call, pipe, event

broadcast)

• Vocabulary of components and connectors

• Constraints on how they are combined

Page 7: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Common Architectural Styles

• Dataflow systems– Pipe and filter– Batch Sequential

• Virtual machines– Rule based systems– Interpreters

• Repository– Databases– Hypertext systems– Blackboards

• Independent components– Peer-to-Peer– Client Sever– Model / View / Controller– Event systems

• Call and return systems– Main program and

subroutine– Layered Systems– Object oriented systems

Page 8: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Pipe and Filter Architecture

• Subsystems are called filters and associations between the filters are called pipes

• Filters only know the content and format of data being received and produced – nothing about the other filters in the system

• Filters are executed concurrently and synchronization is done via pipes

• Very reconfigurable• Transformational systems, Info. Mang. Sys.

Page 9: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Pipe and Filter Example

• Unix shell• ps auxwww | grep maletic | sort | more

Filter Pipe

-output* -input 1

-input * -output1

Page 10: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Batch Sequential Architecture

• Small number of large stand alone subsystems• Must be executed in a fixed sequential ordering

(batch)• Typically work on large flat files, transforming the

file into a new format or ordering so the next subsystem can work on the data

• Subsystems are tightly coupled through the shared file

• No real time feedback, no concurrency

Page 11: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Batch Sequential Example

Subsystem +input

1

-output 1

Validate Sort Update Report

Validate Sort Update Report

Page 12: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Layered Architecture

• A hierarchical decomposition of a system into subsystems (layers) with each providing a higher level of services provided from lower level subsystems

• Closed architecture – each layer can only depend on the layer(s) immediately below

• Open architecture – each layer can access any layer below

Page 13: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Closed Architecture OSI Network Model

Application

Presentation

Session

Trasport

Network

DataLink

PhysicalBit

Frame

Packet

Message

Connection

Format CORBA

TCP/IP

Ethernet

Object

Socket

Wire

Page 14: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Open Architecture: Motif Library

xlib

Xt

Motif

Application

Page 15: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Repository Architecture

• Subsystems are independent and interact by a central repository

• Examples: Payroll or banking system, Modern IDE/Compiler, Blackboard

Subsytem+createData()+setData()+getData()+searchData()

Repository

Page 16: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Repository Example

RepositoryParseTree SymbolTable

Compiler

lex

Parser

Optimizer

CodeGenerator

SourceLevelDebugger

SyntacticEditor

Page 17: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Model / View / Controller

• Subsystems– Model subsystems are responsible for maintaining

domain knowledge– View subsystems are for displaying knowledge to the

user– Controller subsystems manage the interactions with

the user• Model subsystems do not depend on view or

controllers.• Changes in model state is propagated via a

subscribe notify protocol• Examples: File system, database

Page 18: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

MVCcontroller

model

view

-initiator

* -repository1

-subscriber

*

-notifier 1

Page 19: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Client/Sever Architecture

• Subsystems:– Server provides one or more services to

instances of clients– Clients ask for services and clients interact

with users

• Information system with a central DB is an example

• Web servers (multiple servers)

Page 20: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Client/Server

Client+service1()+service2()

Server

+requester

*

+provider

*

Page 21: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Peer-to-Peer Architecture

• Generalization of client/server, clients can be servers and vice versa

• The control flow of each subsystem is independent from others except for synchronization of requests.

+service()

Peer

+requester*

+provider

*

Page 22: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Virtual Machine Architecture

Virtual Machine

ProgramWorkingMemory

Interpreter

-store1

-data fetch1

-inst fetch

1

-store

*

Page 23: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Process Control Architecture

Controller

Actuator Sensor

1

-feedback*-action *

1

Page 24: System Design & Software Architecture Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University

Event-driven Architecture

EventLoop Subsystem-notifier

1

-handler

*