Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Architectural Styles Software Architecture Lecture 5.

Slides:



Advertisements
Similar presentations
Software Architecture Lecture 5
Advertisements

A component- and message-based architectural style for GUI software
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Styles and Greenfield Design Software Architecture Lecture 6.
Software Connectors Software Architecture. Importance of Connectors Complex, distributed, multilingual, modern software system functionality and managing.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Software Connectors.
Architectural Styles. Definitions of Architectural Style  Definition. An architectural style is a named collection of architectural design decisions.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Software Connectors Software Architecture Lecture 7.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
1 Software Architecture Bertrand Meyer ETH Zurich, March-May 2009 Lecture 13: Architectural styles (partly after material by Peter Müller)
Software Architecture Lecture 5
Establishing the overall structure of a software system
Software Architecture – Pipe and Filter Model
Chapter 6: Architectural Design
System Design & Software Architecture
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
HW2 INTRODUCTION CSCI-578 Spring Implicit Invocation  Indirectly or implicitly calls to methods and interfaces in response to an event or a received.
HW2 INTRODUCTION CSCI-578 Fall Event-Based Style  Independent components asynchronously emit and receive events communicated over event buses.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Software Connectors Software Architecture Lecture 7.
Introduction to Software Architecture Sam Malek CS 795 / SWE 699 Spring 2010 George Mason University.
Chapter 7: Architecture Design Omar Meqdadi SE 273 Lecture 7 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Basic Concepts Acknowledgement: some slides from: Software Architecture: Foundations, Theory, and Practice; R. Taylor, N. Medvidovic, E.Dashofy.
Designing Architectures
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
CS451 Lecture 13: Architectural Design Chapter 10
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13Slide 1 Architectural Design u Establishing the overall structure of a software system.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 10 Architectural Design.
Traditional Language- influenced styles.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Implementing Architectures Software Architecture.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
Architectural Design To explain the advantages and disadvantages of different distributed systems architectures To discuss client-server and distributed.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architecture styles Pipes and filters Object-oriented design Implicit invocation Layering Repositories.
CS4311 Spring 2011 Software Architecture Dr. Guoqiang Hu Department of Computer Science UTEP.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Styles.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Architectural Styles Part I Software Architecture Lecture 5.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Architectural Styles Part II Software Architecture Lecture 6.
 Repository Model  Client-Server Model  Layered Model  Modular decomposition styles  Object Models  Function Oriented Pipelining  Control Styles.
Krista Lozada iAcademy First Term 2009
Unit 2 Architectural Styles and Case Studies | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
Chapter 7: Architectural Design Chapter 11 in textbook 1.
CSC480 Software Engineering Lecture 10 September 25, 2002.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Applied Architectures, Part 2 Software Architecture Lecture.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Styles and Greenfield Design Software Architecture Lecture 6.
Software Connectors Acknowledgement: slides mostly from Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic,
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Software Connectors in Practice Software Architecture.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Brief Introduction to Software Connectors Software Architecture.
Lecture VIII: Software Architecture
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
Architectural Styles. ContentContent Data Flow Styles – Batch Sequential – Pipe and Filter Implicit Invocation – Event Based – Publish Subscribe Layered.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Software Connectors Software Architecture Lecture 7.
CS310 – Software Engineering
Software Architecture
Implementing Architectures
CS310 – Software Engineering
Software Connectors.
Part 3 Design What does design mean in different fields?
Software Architecture Lecture 5
Software Connectors.
Styles and Greenfield Design
Software Architecture Lecture 7
Software Architecture Lecture 7
Software Architecture Lecture 7
Software Architecture Lecture 6
Presentation transcript:

Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Architectural Styles Software Architecture Lecture 5

Foundations, Theory, and Practice Software Architecture 2 Object-Oriented Style Components are objects u Data and associated operations Connectors are messages and method invocations Style invariants u Objects are responsible for their internal representation integrity u Internal representation is hidden from other objects Advantages u “Infinite malleability” of object internals u System decomposition into sets of interacting agents Disadvantages u Objects must know identities of servers u Side effects in object method invocations

Foundations, Theory, and Practice Software Architecture 3 Object-Oriented LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 4 OO/LL in UML Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 5 Layered Style Hierarchical system organization u “Multi-level client-server” u Each layer exposes an interface (API) to be used by above layers Each layer acts as a u Server: service provider to layers “above” u Client: service consumer of layer(s) “below” Connectors are protocols of layer interaction Example: operating systems Virtual machine style results from fully opaque layers

Foundations, Theory, and Practice Software Architecture 6 Layered Style (cont’d) Advantages u Increasing abstraction levels u Evolvability u Changes in a layer affect at most the adjacent two layers Reuse u Different implementations of layer are allowed as long as interface is preserved u Standardized layer interfaces for libraries and frameworks

Foundations, Theory, and Practice Software Architecture 7 Layered Style (cont’d) Disadvantages u Not universally applicable u Performance Layers may have to be skipped u Determining the correct abstraction level

Foundations, Theory, and Practice Software Architecture 8 Layered Systems/Virtual Machines Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 9 Layered LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 10 Client-Server Style Components are clients and servers Servers do not know number or identities of clients Clients know server’s identity Connectors are RPC-based network interaction protocols

Foundations, Theory, and Practice Software Architecture 11 Client-Server LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 12 Data-Flow Styles Batch Sequential u Separate programs are executed in order; data is passed as an aggregate from one program to the next. u Connectors: “The human hand” carrying tapes between the programs, a.k.a. “sneaker-net ” u Data Elements: Explicit, aggregate elements passed from one component to the next upon completion of the producing program’s execution. Typical uses: Transaction processing in financial systems. “The Granddaddy of Styles”

Foundations, Theory, and Practice Software Architecture 13 Batch-Sequential: A Financial Application Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 14 Batch-Sequential LL Not a recipe for a successful lunar mission! Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 15 Pipe and Filter Style Components are filters u Transform input data streams into output data streams u Possibly incremental production of output Connectors are pipes u Conduits for data streams Style invariants u Filters are independent (no shared state) u Filter has no knowledge of up- or down-stream filters Examples u UNIX shellsignal processing u Distributed systemsparallel programming Example: ls invoices | grep -e August | sort

Foundations, Theory, and Practice Software Architecture 16 Pipe and Filter (cont’d) Variations u Pipelines — linear sequences of filters u Bounded pipes — limited amount of data on a pipe u Typed pipes — data strongly typed Advantages u System behavior is a succession of component behaviors u Filter addition, replacement, and reuse Possible to hook any two filters together u Certain analyses Throughput, latency, deadlock u Concurrent execution

Foundations, Theory, and Practice Software Architecture 17 Pipe and Filter (cont’d) Disadvantages u Batch organization of processing u Interactive applications u Lowest common denominator on data transmission

Foundations, Theory, and Practice Software Architecture 18 Pipe and Filter LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 19 Blackboard Style Two kinds of components u Central data structure — blackboard u Components operating on the blackboard System control is entirely driven by the blackboard state Examples u Typically used for AI systems u Integrated software environments (e.g., Interlisp) u Compiler architecture

Foundations, Theory, and Practice Software Architecture 20 Blackboard LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 21 Mobile-Code Style Summary: a data element (some representation of a program) is dynamically transformed into a data processing component. Components: “Execution dock”, which handles receipt of code and state; code compiler/interpreter Connectors: Network protocols and elements for packaging code and data for transmission. Data Elements: Representations of code as data; program state; data Variants: Code-on-demand, remote evaluation, and mobile agent.

Foundations, Theory, and Practice Software Architecture 22 Mobile Code LL Scripting languages (i.e. JavaScript, VBScript), ActiveX control, embedded Word/Excel macros. Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 23 Implicit Invocation Style Event announcement instead of method invocation u “Listeners” register interest in and associate methods with events u System invokes all registered methods implicitly Component interfaces are methods and events Two types of connectors u Invocation is either explicit or implicit in response to events Style invariants u “Announcers” are unaware of their events’ effects u No assumption about processing in response to events

Foundations, Theory, and Practice Software Architecture 24 Implicit Invocation (cont’d) Advantages u Component reuse u System evolution Both at system construction-time & run-time Disadvantages u Counter-intuitive system structure u Components relinquish computation control to the system u No knowledge of what components will respond to event u No knowledge of order of responses

Foundations, Theory, and Practice Software Architecture 25 Publish-Subscribe Subscribers register/deregister to receive specific messages or specific content. Publishers broadcast messages to subscribers either synchronously or asynchronously.

Foundations, Theory, and Practice Software Architecture 26 Publish-Subscribe (cont’d) Components: Publishers, subscribers, proxies for managing distribution Connectors: Typically a network protocol is required. Content-based subscription requires sophisticated connectors. Data Elements: Subscriptions, notifications, published information Topology: Subscribers connect to publishers either directly or may receive notifications via a network protocol from intermediaries Qualities yielded: Highly efficient one-way dissemination of information with very low-coupling of components

Foundations, Theory, and Practice Software Architecture 27 Pub-Sub LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 28 Event-Based Style Independent components asynchronously emit and receive events communicated over event buses Components: Independent, concurrent event generators and/or consumers Connectors: Event buses (at least one) Data Elements: Events – data sent as a first-class entity over the event bus Topology: Components communicate with the event buses, not directly to each other. Variants: Component communication with the event bus may either be push or pull based. Highly scalable, easy to evolve, effective for highly distributed applications.

Foundations, Theory, and Practice Software Architecture 29 Event-based LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 30 Peer-to-Peer Style State and behavior are distributed among peers which can act as either clients or servers. Peers: independent components, having their own state and control thread. Connectors: Network protocols, often custom. Data Elements: Network messages

Foundations, Theory, and Practice Software Architecture 31 Peer-to-Peer Style (cont’d) Topology: Network (may have redundant connections between peers); can vary arbitrarily and dynamically Supports decentralized computing with flow of control and resources distributed among peers. Highly robust in the face of failure of any given node. Scalable in terms of access to resources and computing power. u But caution on the protocol!

Foundations, Theory, and Practice Software Architecture 32 Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission. Peer-to-Peer LL

Foundations, Theory, and Practice Software Architecture 33 Heterogeneous Styles More complex styles created through composition of simpler styles REST (from the first lecture) u Complex history presented later in course C2 u Implicit invocation + Layering + other constraints Distributed objects u OO + client-server network style u CORBA

Foundations, Theory, and Practice Software Architecture 34 C2 Style An indirect invocation style in which independent components communicate exclusively through message routing connectors. Strict rules on connections between components and connectors induce layering.

Foundations, Theory, and Practice Software Architecture 35 C2 Style (cont’d) Components: Independent, potentially concurrent message generators and/or consumers Connectors: Message routers that may filter, translate, and broadcast messages of two kinds: notifications and requests. Data Elements: Messages – data sent as first-class entities over the connectors. Notification messages announce changes of state. Request messages request performance of an action. Topology: Layers of components and connectors, with a defined “top” and “bottom”, wherein notifications flow downwards and requests upwards.

Foundations, Theory, and Practice Software Architecture 36 C2 LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 37 KLAX Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 38 KLAX in C2 Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 39 Distributed Objects: CORBA “Objects” (coarse- or fine-grained) run on heterogeneous hosts, written in heterogeneous languages. Objects provide services through well-defined interfaces. Objects invoke methods across host, process, and language boundaries via remote procedure calls (RPCs). Components: Objects (software components exposing services through well-defined provided interfaces) Connector: (Remote) Method invocation Data Elements: Arguments to methods, return values, and exceptions Topology: General graph of objects from callers to callees. Additional constraints imposed: Data passed in remote procedure calls must be serializable. Callers must deal with exceptions that can arise due to network or process faults. Location, platform, and language “transparency”. CAUTION

Foundations, Theory, and Practice Software Architecture 40 CORBA Concept and Implementation Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Foundations, Theory, and Practice Software Architecture 41 CORBA LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.