SOFTWARE DESIGN AND ARCHITECTURE

Slides:



Advertisements
Similar presentations
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
Advertisements

CPSC Compiler Tutorial 9 Review of Compiler.
Reference Book: Modern Compiler Design by Grune, Bal, Jacobs and Langendoen Wiley 2000.
Establishing the overall structure of a software system
On the Criteria to Be Used in Decomposing Systems into Modules Group 1: Lisa Anthony, Erik Hayes, Luiza Helena da Silva, and Diana Tetelman.
Course Instructor: Aisha Azeem
Software Architecture – Pipe and Filter Model
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
SS ZG653Second Semester, Topic Architectural Patterns Pipe and Filter.
ICS611 Introduction to Compilers Set 1. What is a Compiler? A compiler is software (a program) that translates a high-level programming language to machine.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13Slide 1 Architectural Design u Establishing the overall structure of a software system.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
©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.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
1.  10% Assignments/ class participation  10% Pop Quizzes  05% Attendance  25% Mid Term  50% Final Term 2.
Pipes & Filters Architecture Pattern Source: Pattern-Oriented Software Architecture, Vol. 1, Buschmann, et al.
Unit 2 Architectural Styles and Case Studies | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.
1 Chapter 1 Introduction. 2 Outlines 1.1 Overview and History 1.2 What Do Compilers Do? 1.3 The Structure of a Compiler 1.4 The Syntax and Semantics of.
Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes.
Introduction to Compilers. Related Area Programming languages Machine architecture Language theory Algorithms Data structures Operating systems Software.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Chapter 1 Introduction Study Goals: Master: the phases of a compiler Understand: what is a compiler Know: interpreter,compiler structure.
Software Design and Architecture SEG3202 Nour El Kadri.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
Introduction to OOP CPS235: Introduction.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
Lecture VIII: Software Architecture
CS223: Software Engineering
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
ICS312 Introduction to Compilers Set 23. What is a Compiler? A compiler is software (a program) that translates a high-level programming language to machine.
Presented by : A best website designer company. Chapter 1 Introduction Prof Chung. 1.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
Chapter 1 Introduction Samuel College of Computer Science & Technology Harbin Engineering University.
Chapter 1. Introduction.
Advanced Computer Systems
Software architecture
Compiler Design (40-414) Main Text Book:
Visit for more Learning Resources
PRINCIPLES OF COMPILER DESIGN
Chapter 1 Introduction.
Introduction to Compiler Construction
IS301 – Software Engineering Dept of Computer Information Systems
Compiler Construction (CS-636)
Data Flow Architecture
Overview of Compilation The Compiler Front End
Software Design and Architecture
Chapter 1 Introduction.
Part 3 Design What does design mean in different fields?
-by Nisarg Vasavada (Compiled*)
课程名 编译原理 Compiling Techniques
Hierarchical Architecture
Compiler Construction
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Compiler 薛智文 TH 6 7 8, DTH Spring.
Chapter 6 System and Application Software
Software Architecture
Chapter 5 Architectural Design.
Conceptual Architecture of PostgreSQL
Compiler 薛智文 TH 6 7 8, DTH Spring.
System Programming and administration
Chapter 1 Introduction.
Chapter 6 System and Application Software
Chapter 6 System and Application Software
Compiler 薛智文 M 2 3 4, DTH Spring.
Chapter 6 System and Application Software
Presentation transcript:

SOFTWARE DESIGN AND ARCHITECTURE LECTURE 10

Review Distributed Architectures Service Oriented Architecture

Outline Data Flow Architectures Batch Sequential Pipe and Filter

Data flow Software Architecture

Data Flow Architectures The data flow software architecture style views the entire software system as a series of transformations on successive sets of data, where data and operations on it are independent of each other. The software system is decomposed into data processing elements where data directs and controls the order of data computation processing.

Data Flow Architectures Each component in this architecture transforms its input data into corresponding output data. The connection between the subsystem components may be implemented as I/O streams, I/O files, buffers, piped streams, or other types of connections.

Data Flow Architectures Regardless of the type of topology, the data moves from one subsystem to another. In general, there is no interaction between the modules except for the output and the input data connections between subsystems.

Data Flow Architectures One subsystem can be substituted by another without affecting the rest of the system Since each subsystem does not need to know the identity of any other subsystem, modifiability and reusability are important property attributes of the data flow architecture.

Batch sequential

Batch – Sequential In batch sequential architecture, each data transformation subsystem or module cannot start its process until its previous subsystem completes its computation. Data flow carries a batch of data as a whole from one subsystem to another.

First subsystem validates the transaction requests (insert, delete, and update) in their totality. Next, the second subsystem sorts all transaction records in an ascending order on the primary key of data records The transaction update module updates the master file with the sorted transaction requests, and then the report module generates a new list. The architecture is in a linear data flow order.

Applicable domains of batch sequential architecture: • Data are batched. • Intermediate file is a sequential access file. • Each subsystem reads related input files and writes output files.

Benefits: • Simple divisions on subsystems. • Each subsystem can be a stand-alone program working on input data and producing output data.

Limitations: • Implementation requires external control. • It does not provide interactive interface. • Concurrency is not supported and hence throughput remains low • High latency.

Pipes-and-Filters Style

Pipe and Filter This architecture decomposes the whole system into components of data source, filters, pipes, and data sinks. The connections between components are data streams. The particular property attribute of the pipe and filter architecture is its concurrent and incremented execution.

Pipes-and-Filters Style Suitable for applications that require a defined series of independent computations to be performed on data. Each component has a set of inputs and set of outputs. A component reads a stream of data on its input and produces stream of data at its output.

Filter Each filter is an independent data stream transformer; it reads data from its input data stream, transforms and processes it, and then writes the transformed data stream over a pipe for the next filter to process.

Filter A filter does not need to wait for batched data as a whole. As soon as the data arrives through the connected pipe, the filter can start working right away. A filter does not even know the identity of data upstream or data downstream. A filter is just working in a local incremental mode.

Active and Passive filters An active filter pulls in data and pushes out the transformed data (pull/push); A passive filter lets connected pipes push data in and pull data out.

Pipes The connectors serve as channels for the streams, transmitting outputs of one filter to inputs of the other. This makes connectors act as Pipes.

Pipes A pipe moves a data stream from one filter to another. A pipe can carry binary or character streams. A pipe is placed between two filters; these filters can run in separate threads of the same process.

Structure

There are three ways to make the data flow: Push only (Write only) A data source may push data in a downstream. A filter may push data in a downstream. Pull only (Read only) A data sink may pull data from an upstream. A filter may pull data from an upstream. Pull/Push (Read/Write) A filter may pull data from an upstream and push transformed data in a downstream.

Examples Traditional Compilers: Compilation phases are pipelined, though the phases are not always incremental. The phases in the pipeline include: lexical analysis + syntax analysis (parsing) + semantic analysis + code optimization + code generation

Example: Architecture of a Compiler Compilation is regarded as a sequential (pipeline) process. Every phase is dependent on some data on the preceding phase. Lex Syn Sem Opt CGen text code

Compiler The system might consist of a pipeline of processing elements similar to the following: A source element reads the program text (i.e., source code) from a file (or perhaps a sequence of files) as a stream of characters. A lexical analyzer converts the stream of characters into a stream of lexical tokens for the language--keywords, identifier symbols, operator symbols, etc. A parser recognizes a sequence of tokens that conforms to the language grammar and translates the sequence to an abstract syntax tree.

Compiler A "semantic" analyzer reads the abstract syntax tree and writes an appropriately augmented abstract syntax tree. A global optimizer (usually optionally invoked) reads an augmented syntax tree and outputs one that is equivalent but corresponds to program that is more efficient in space and time resource usage. An intermediate code generator translates the augmented syntax tree to a sequence of instructions for a virtual machine.

Compiler A local optimizer converts the sequence of intermediate code (i.e., virtual machine) instructions into a more efficient sequence. A backend code generator translates the sequence of virtual machine instructions into a sequence of instructions for some real machine platform (i.e., for some particular hardware processor augmented by operating system calls and a runtime library).

Compiler If the previous step generated symbolic assembly code, then an assembler is needed to translate the sequence of symbolic instructions into a relocatable binary module. If the previous steps of the pipeline generated a sequence of separate binary modules, then a linker might be needed to bind the separate modules with library modules to form a single executable (i.e., object code) module. A sink element outputs the resulting binary module into a file.

Sales System

Applicable domains of pipe and filter architecture: The system can be broken into a series of processing steps over data streams, and at each step filters consume and move data incrementally. The data format on the data streams is simple, stable, and adaptable if necessary. Significant work can be pipelined to gain increased performance. Producer or consumer-related problems are being addressed.

Benefits: Concurrency: It provides high overall throughput for excessive data processing. Reusability: Encapsulation of filters makes it easy to plug and play, and to substitute. Flexibility: It supports both sequential and parallel execution.

Benefits: Modifiability: It features low coupling between filters, less impact from adding new filters, and modifying the implementation of any existing filters as long as the I/O interfaces are unchanged. Simplicity: It offers clear division between any two filters connected by a pipe.

Disadvantages Not good choice for interactive systems, because of their transformational characteristic.

Summary Data flow architectures Batch Sequential Pipe and Filter