Architecture Styles. Instructor: Yongjie Zheng February 7, CS 5553: Software Architecture and Design

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

How Do You Design? Where do architectures come from? Creativity. Method

Software architecture: Architectural Styles

An Introduction to Software Architecture. David Garlan & Mary Shaw 94

Architectural Styles. Reid Holmes

Architectural Styles - Finale

ICS 52: Introduction to Software Engineering

An Introduction to Software Architecture

ICS 52: Introduction to Software Engineering

An Introduction to Software Architecture

Software Architecture

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

Architectural Styles I

Common Architectural Styles & Patterns

Architectural Styles I

Software Architecture

CAS 703 Software Design

In his paper of 1972, Parnas proposed the following problem [42]:

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE

Architectural Styles: Definitions

6/20/2018 CS5386 SOFTWARE DESIGN & ARCHITECTURE LECTURE 5: ARCHITECTURAL VIEWS C&C STYLES. Outline for Today. Architecture views C&C Views

Architectural Styles II

Context-Awareness and Adaptation in Distributed Event-Based Systems

Software Architecture in Practice

Chapter 6 Architectural Design. Chapter 6 Architectural design

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered

Software Architecture

Announcements. me your survey: See the Announcements page. Today. Reading. Take a break around 10:15am. Ack: Some figures are from Coulouris

CAS 703 Software Design

Architectural Design

DISTRIBUTED COMPUTER SYSTEMS ARCHITECTURES

A Report on RMI and RPC Submitted by Sudharshan Reddy B

Transactum Business Process Manager with High-Performance Elastic Scaling. November 2011 Ivan Klianev

Software Architecture

Architectural Design

Lecture 1. Chapter 6 Architectural design

CPSC 410 Advanced Software Engineering Mid-term Examination (Term I ): Solution Instructor: Gail Murphy

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

CISC 322 Software Architecture. Lecture 13: Midterm Review Emad Shihab

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila

XVIII. Software Architectures

Architectural Design. Topics covered. Architectural Design. Software architecture. Recall the design process

Establishing the overall structure of a software system

Chapter 6 Architectural Design. Lecture 1. Chapter 6 Architectural design

Tutorial 8 Build resilient, responsive and scalable web applications with SocketPro

CSE 435: Software Engineering. System Design

Objectives. Architectural Design. Software architecture. Topics covered. Architectural design. Advantages of explicit architecture

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

IMPORTANT NOTICE TO STUDENTS

XVIII. Software Architectures

Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5

Software Architecture. Lecture 4

Architectural Design

Architectural Design. CSCE Lecture 12-09/27/2016

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

System Design. Acknowledge: Atlee and Pfleeger (Software Engineering: Theory and Practice)

1.264 Lecture 16. Legacy Middleware

Process. Program Vs. process. During execution, the process may be in one of the following states

Systems Architecture. Monolithic Systems

Q.1. (a) [4 marks] List and briefly explain four reasons why resource sharing is beneficial.

Game Architecture and Modeling Assessment

Chapter 1: Introduction

Architectural Design. Architectural Design. Software Architecture. Architectural Models

RESTful Web service composition with BPEL for REST

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 1. Introduction

Chapter 6 Architectural Design

Topics in Architectural Design

Software MEIC. (Lesson 20)

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

SOFTWARE ARCHITECTURES ARCHITECTURAL STYLES SCALING UP PERFORMANCE

XIX. Software Architectures

Gustavo Alonso, ETH Zürich. Web services: Concepts, Architectures and Applications - Chapter 1 2

CPSC 410? Advanced Software Engineering Mid-term Examination (Term I ) SOLUTION Instructor: Gail Murphy

Flash: an efficient and portable web server

Lesson 5 Web Service Interface Definition (Part II)

Element: Relations: Topology: no constraints.

Automatic Scaling Iterative Computations. Aug. 7 th, 2012

Part II. Integration Use Cases

System models for distributed systems

B.H. Far

DESIGN AS RISK MINIMIZATION

02 - Distributed Systems

New Features Guide Sybase ETL 4.9

Software Architecture

CHAPTER 4: PATTERNS AND STYLES IN SOFTWARE ARCHITECTURE

Lecture 15 Distributed System Architectures

Chapter 1: Introduction

CSCI 3130 Software Architectures 1/3. February 5, 2013

Introduction. CS3026 Operating Systems Lecture 01

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader...

Introduction to Distributed Systems

Integration Framework. Architecture

SFWR ENG 3A04: Software Design II

Chapter 4: Threads. Operating System Concepts 9 th Edition

Distributed Computing

The Myx Architectural Style

An Introduction to Software Architecture

Storm. Distributed and fault-tolerant realtime computation. Nathan Marz Twitter

System Design. Design: HOW to implement a system

Transcription:

Architecture Styles Instructor: Yongjie Zheng February 7, 2017 CS 5553: Software Architecture and Design

Architecture styles: a named collection of architecture design decisions that (1) are applicable in a given development context, (2) constrain architectural design decisions that are specific to a particular system within that context, and (3) elicit beneficial qualities in each resulting system. 2

Architecture Styles Traditional languageinfluenced styles Main program and subroutines Object-oriented Layered Virtual machines Client-server Data flow styles Batch-sequential Pipe-and-filter Shared memory Blackboard Rule-based Interpreter Interpreter Mobile code Implicit invocation Publish-subscribe Event-based Peer-to-Peer Derived styles C2 3

Example: the Lunar Lander (LL) video game 4

LL: Main program and subroutines. 5

LL in the object-oriented style. 6

Layered Styles An architecture is separated into ordered layers, and each layer exposes an interface to be used by above layers. Advantages Changes in a layer affect at most the adjacent two layers. Different implementations of layer are allowed as long as interface is preserved. Disadvantages Performance 7

LL in the virtual machines style. A layer offers a set of services ( a machine with a bunch of buttons and knobs ) that may be accessed by programs residing within the layer above it. In a strictly virtual machines style, programs at a given level may only access the services provided by the layer immediately below it. Benefits: clear dependence structure. Typical uses: network protocol stacks, database management systems. 8

9 A multiplayer version of LL in the clientserver style. Can be simply understood as a two-layer virtual machine with network connections. Servers do not know number or identities of clients. Client-to-client communication prohibited. Benefits: Centralization of data and computation.

Data Flow Styles Concerns the movement of data between independent processing elements. Batch Sequential: separate programs are executed in order; data is passed as an aggregate from one program to the other. Pipe and Filter: separate programs are executed, potentially concurrently; data is passed as a stream from one program to the next. 10

LL: Batch-sequential - an example of poor design. Constraints Linear topology. One program runs at a time, to completion. Benefits Simplicity, easy to control. Typical uses: transaction processing in financial systems. 11

LL in the pipe-and-filter style. Filters transform input data streams into output data streams. Pipes transmit outputs of one filter to inputs of another. Constraints Filters are mutually independent and do not share state; Filters have no knowledge of up- or down-stream filters. Benefits Filters can be easily composed for a large variety of tasks. Typical uses: Unix shells (e.g. ls -a grep 5553 more) 12

Shared State Styles Multiple components have access to the same data store, and communicate through that data store. Blackboard style: two kinds of components Central data structure - blackboard. Components operating on the blackboard. Rule-based style: Inference engine parses user input and determines whether it is a fact/rule or a query. If it is a fact/rule, it adds this entry to the knowledge base. Otherwise, it queries the knowledge base for applicable rules and attempts to resolve the query. 13

LL in the blackboard style. 14

The Blackboard Style Two kinds of components Central data structure. A collection of independent components that operate on the central data. Constraints The current state of the central data structure is the main trigger of selecting processes to execute. Benefits Ease of adaptation, enhanced scalability Examples AI systems Compiler

LL in a rule-based style. Constraints: all accesses to Knowledge Base must go through Inference Engine. Benefits: easy to change (e.g. add/remove rules). Typical uses: when the system can be understood as resolving a set of predicates (a logical programming language such as Prolog is usually used to build such a system.). 16

Interpreter Styles The distinctive characteristic of interpreter styles is dynamic, on-the-fly interpretation of commands. Basic Interpreter: the execution of commands one at at time. Mobile Code: the execution of one chunk of code at a time, usually at a remote host. Code moves to be interpreted on another host; depending on the variant, state does also. Variant: code-on-demand, remote evaluation, and mobile agent. 17

Basic Interpreter: interpreter parses and executes input commands, updating the state maintained by the interpreter. Benefits: highly dynamic with the set of commands dynamically modifiable. Typical uses: end-user programmability Examples: Microsoft Excel. LL in the interpreter style. 18

LL as code-on-demand. Code-on-demand: the initiator has resources and state but downloads code from another site to be executed locally. Remote evaluation: the initiator has the code but lacks the resources to execute the code. Thus, it transmits code to be processed to a remote host. For example, grid computing. Mobile agent: the initiator has the code and the state but some resources are located elsewhere. 19

Implicit Invocation Styles Calls are invoked indirectly and implicitly as a response to a notification or an event. No knowledge of what components will respond to event. No knowledge of order of responses. Advantages: ease of adaptation, enhanced scalability Publish-Subscribe: subscribers register/deregister to receive specific messages or specific content. Publishers broadcast messages to subscribers either synchronously or asynchronously. Event-Based: independent components asynchronously emit and receive events communicated over event buses. 20

Implicit Invocation Instead of invoking a procedure directly, a component can announce (or broadcast) one or more events. Other components in the system can register an interest in an event by associating a procedure with the event. When the event is announced the system itself invokes all of the procedures that have been registered for the event. Thus an event announcement ``implicitly'' causes the invocation of procedures in other modules. Variations: Publish-Subscribe, Event-Based.

Implicit Invocation Usually requires the external support (e.g. operating systems, middleware, programming language features) to handle generation/notification of events. Constraints Announcers of events do not know which components will be affected by those events. Benefits ease of adaptation, enhanced scalability. Example User interface development

LL in the publish-subscribe style. Publish-Subscribe: subscribers register/deregister to receive specific messages or specific content. Publishers broadcast messages to subscribers either synchronously or asynchronously. 23

LL in the event-based style. Event-Based: independent components asynchronously emit and receive events communicated over event buses. 24

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. Topology: Network (may have redundant connections between peers); can vary arbitrarily and dynamically. Resource discovery is an important issue for P2P applications due to absence of centralization. 25

LL as a P2P application. 26