CISC 322 Software Architecture Lecture 09: Architecture Styles (4) - - PowerPoint PPT Presentation

cisc 322
SMART_READER_LITE
LIVE PREVIEW

CISC 322 Software Architecture Lecture 09: Architecture Styles (4) - - PowerPoint PPT Presentation

CISC 322 Software Architecture Lecture 09: Architecture Styles (4) Emad Shihab Adapted from Ahmed E. Hassan and Spiros Mancoridis Recap of Last Class Automated Stock Trading System Two architectures Pipe-and-Filter + Repository +


slide-1
SLIDE 1

CISC 322

Software Architecture Lecture 09: Architecture Styles (4) Emad Shihab

Adapted from Ahmed E. Hassan and Spiros Mancoridis

slide-2
SLIDE 2

Recap of Last Class

■ Automated Stock Trading System ■ Two architectures

– Pipe-and-Filter + Repository + (EB) Implicit Invocation – Object Oriented + Repository + (PS) Implicit Invocation

slide-3
SLIDE 3

Layered Style

Adapted from Taylor et al. 2010

Network C1 C2 C3 Server Clients Virtual Machine Client-Server

slide-4
SLIDE 4

Layered Style

■ Architecture is separated into ordered layers

– A program in one layer may obtain services from a layer below it

Taylor et al. 2010

slide-5
SLIDE 5

Layered Variants

■ Virtual Machine

– An ordered sequence of layers – Each layer services the layer above it

■ Client-Server

– Clients send service request to server – Server replies as needed with requested information

slide-6
SLIDE 6

Layered Style

■ Components

– VM: Layers (comprised of one or more programs) – CS: Client and Server

■ Connectors

– VM: Procedure calls – CS: Remote procedure calls

slide-7
SLIDE 7

Layered Style

■ Topology

– VM: Linear; cross layer in special cases – CS: Two-level; client-to-client communication prohibited

slide-8
SLIDE 8

Layered Style Advantages

■ VM

– Clear dependence structure – Upper levels immune to changes at lower levels – Lower levels are independent of upper levels

■ CS

– Centralization of computation and data at server – Single powerful server can serve many clients

slide-9
SLIDE 9

Layered Style Disadvantages

■ VM

– Having too many layers can be inefficient (may need to cross layers) – Not easy to divide software systems into layers

■ CS

– Heavy dependence on communication network

slide-10
SLIDE 10

Layered Style Examples

■ VM

– Operating systems – Network protocol stack

■ CS

– Business applications

slide-11
SLIDE 11

Layered Style Example

Virtual Machine Client-Server

slide-12
SLIDE 12

QA evaluation of Layered Style

■ Performance

– VM: In some cases need to cross layers – CS: May be restricted by network capacity

■ Availability

– VM: lower layers vs. higher layers? – CS: Failure at server affects all clients

■ Modifiability

– Change to a layer will affect, at most, 2 layers

■ Portability?

slide-13
SLIDE 13

Architectural Styles Wrap Up

slide-14
SLIDE 14

Repository

Summary Use it when… Avoid it when… Independent programs, access and communicate exclusively through a global repository

  • rder of processing

dynamically determined and data-driven interactions between the independent programs require complex regulation

Adapted from Taylor et al. 2010

slide-15
SLIDE 15

Pipe-and-Filter

Summary Use it when… Avoid it when… Separate programs, aka filters, executed, potentially concurrently. Pipes route data streams between filters problem easily formulated as a set of sequential, severable steps interaction between components required

Taylor et al. 2010

slide-16
SLIDE 16

Object Oriented

Summary Use it when… Avoid it when… Objects encapsulate state and accessing functions many complex and interrelated data structures strong independence between components necessary.

Adapted from Taylor et al. 2010

slide-17
SLIDE 17

Implicit Invocation

Summary Use it when… Avoid it when… (PB) Publishers broadcast messages to subscribers subscription data is small and efficiently transported. middleware to support high-volume data is unavailable. (EB) Independent components asynchronously emit and receive events communicated over event buses components are concurrent and independent guarantees on real-time processing of events is required

Adapted from Taylor et al. 2010

slide-18
SLIDE 18

Layered

Summary Use it when… Avoid it when… (VM) Virtual machine, or a layer, offers services to layers above it. many applications can be based upon a single, common layer of services

  • 1. many levels are

required (causes inefficiency) (CS) Clients request service from a server. centralization of computation and data at a single location (the server) promotes manageability and scalability network bandwidth and reliability are limited

Taylor et al. 2010