Architectural patterns1. 2 Patterns Architectural patterns –Fundamental structural organization for software systems. –High-level subdivision of the system.

Slides:



Advertisements
Similar presentations
ICS 434 Advanced Database Systems
Advertisements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 2.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 9 Distributed Systems Architectures Slide 1 1 Chapter 9 Distributed Systems Architectures.
Master/Slave Architecture Pattern Source: Pattern-Oriented Software Architecture, Vol. 1, Buschmann, et al.
Reliability on Web Services Presented by Pat Chan 17/10/2005.
Broker Pattern Pattern-Oriented Software Architecture (POSA 1)
SS ZG653Second Semester Topic Architectural Patterns – Review of Patterns.
Architectural patterns1. 2 Patterns Architectural patterns –Fundamental structural organization for software systems. –High-level subdivision of the system.
Distributed components
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Lecture 23: Software Architectures
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Establishing the overall structure of a software system
Ch 12 Distributed Systems Architectures
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 17 Client-Server Processing, Parallel Database Processing,
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
2 Systems Architecture, Fifth Edition Chapter Goals Describe client/server and multi-tier application architecture and discuss their advantages compared.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
Course Instructor: Aisha Azeem
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 1.
Client-Server Processing and Distributed Databases
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
1 Architectural Patterns Yasser Ganji Saffar
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Client/Server Architectures
SOA, BPM, BPEL, jBPM.
Computer System Architectures Computer System Software
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
©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.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
DEVS Namespace for Interoperable DEVS/SOA
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
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.
Architectures of distributed systems Fundamental Models
Swing and MVCS CompSci 230 Software Construction.
Software Architecture and Patterns
©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.
Pipes & Filters Architecture Pattern Source: Pattern-Oriented Software Architecture, Vol. 1, Buschmann, et al.
John D. McGregor Class 4 – Initial decomposition
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 system architecture 1 after designing to meet functional requirements, design the system.
Kemal Baykal Rasim Ismayilov
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
CS223: Software Engineering Lecture 14: Architectural Patterns.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
High degree of user interaction Interactive Systems: Model View Controller Presentation-abstraction-control.
By Jeremy Burdette & Daniel Gottlieb. It is an architecture It is not a technology May not fit all businesses “Service” doesn’t mean Web Service It is.
A service Oriented Architecture & Web Service Technology.
Pertemuan 09 Architectural Patterns Mata kuliah: T0144 – Advanced Topics in Software Engineering Tahun: 2010.
Internet and Distributed Application Services
Design Patterns-1 7 Hours.
SOFTWARE DESIGN AND ARCHITECTURE
Software Design and Architecture
Part 3 Design What does design mean in different fields?
Hierarchical Architecture
Ch > 28.4.
Software Architecture
D7032E – Software Engineering
Architectures of distributed systems Fundamental Models
Software models - Software Architecture Design Patterns
Architectures of distributed systems
Architectures of distributed systems Fundamental Models
Presentation transcript:

Architectural patterns1

2 Patterns Architectural patterns –Fundamental structural organization for software systems. –High-level subdivision of the system. –Highest level of pattern Design patterns –Organization of classes –Intermediate level of pattern Idioms –Organization within a single class or a few classes –Lowest level of pattern Some architectural patterns –Layers –Pipes and filters –Broker –Model-View-Controller (MVC) –Master-slave

Architectural patterns3 Categories of architectural patterns From mud to structure –Patterns: Layers, “Pipes and filters” Distributed systems –Patterns: Broker, Master-Slave Interactive systems –Patterns: Model-View-Controller (MVC)

Architectural patterns4 Architectural Pattern - Layers Decompose overall system task into cooperating subtasks Examples –TCP/IP, and other protocol stacks –Java application, JVM, OS, physical machine –Information systems: Presentation, Controller, Model, Data Upper layer asks lower layer for service Interfaces between layers must be stable –Standardization: Public or proprietary –Java: “interface” is a keyword of the language –Error handling Exceptions Special values for signaling errors, like null or -1

Architectural patterns5 Layers consequences Benefits –Reuse of layers –Support for standardization A network protocol specifies a layer, but does not implement it! –Dependencies are kept local –Exchangeability An implementation of a layer can be exchanged with another implementation –With the same interface Liabilities –Lower efficiency –Difficult to establish correct granularity of layers Layers inside layers might help

Architectural patterns6 Architectural Pattern - Pipes and filters System process a stream of data. –Each processing step is encapsulated in a filter component. Examples –A shell in an operating system, like Linux/UNIX or MS-DOS find “a” data.txt | sort | more Find all lines with “a” in data.txt | sort the lines | show the lines, one screen at a time –Compilation of a Java program Lexical analysis | syntax analysis | semantic analysis | code generation –Generally Data source | filter | … | filter | data sink The vertical bar | is called a “pipe”. Implementation –Cooperating processes No shared memory: Uses standard input (System.in) and standard output (System.out) –Cooperating threads Shared memory: Bounded buffers Example: The bounded buffer exercise

Architectural patterns7 Pipes and filters, consequences Benefits –Flexibility by filter exchange Plug-in a new filter, and you have another application –Flexibility by recombination –Reuse of filter components –Useful for prototyping –Efficient in parallel processing Liabilities –Sharing information is hard –Data transformation overhead Data must be adapted to the next filter –Error handling

Architectural patterns8 Distributed systems A layered system can be distributed –Each layer running on a separate computer –Called “multi-tiered” system A “pipes and filters” system can be distributed –Each filter running on a separate computer –Pipes are network connections

Architectural patterns9 Architectural Pattern - Broker Coordinates communication between distributed components Decouples clients and servers Broker features –Register / deregister servers –Locate servers –Forward messages Examples –CORBA Common Object Request Broker Architecture –Some chat / messenger systems

Architectural patterns10 Broker, consequences Benefits –Location transparency Clients do not need to know where servers are. Servers can be moved to other computers. –Changeability and extensibility Servers can be changed –Keep the same interface –Reusability Components can be reused in other application Liabilities –Efficiency –Fault tolerance Broker is not working => nothing is working

Architectural patterns11 Architectural Pattern – Master-Slave Divide and conquer Master use ‘same’ subservice’ from slaves Master functions –Split work –Call slaves –Combine results Examples –Parallel processing –Fault tolerance –Computational accuracy

Architectural patterns12 Master-Slave, consequences Benefits –Faster computation Split the problem over threads and machines. Easy scalability. –Robustness Slaves can be duplicated –Correctness Slave can be implemented differently to minimize sementic errors Liabilities –Communication overhead –Not all problems can be divided

Architectural patterns13 Interactive systems Interaction with the user –Through graphical user interfaces –System responds to events (user inputs) Functional core of the system must be kept independent of the user interface –You must be able to add a new user interface to the system. –A single system can have many user interfaces PC interface Web interface PDA interface Mobil phone interface

Architectural patterns14 Architectural Pattern Model- View-Controller (MVC) Divides an application into 3 parts –Model Core functionality and data –View Displays information to the user Same model component can have many views –Controller Handles user input –User interface = View + controller –Changes in the model are automatically propagated to the view Use observer-observable design pattern

Architectural patterns15 Model-View-Controller in Java The Java GUI frameworks Swing (and AWT) uses a modified version of MVC –Each Swing component has Model –Holding the state of the component View –The visual part Controllers –Are attached by programmers –Example: JButton Model: ButtonModel getModel() View: ButtonUI getUI() Controllers: addActionListener(…), addItemListener(…), attChangeListener(…) –Example, JavaBeans: AccountConstrained (Model) + AccountFrame (View + controller)

Architectural patterns16 Model-View-Controller, consequences Benefits –Multiple views for the same model –Synchronized views –“Pluggable” views and controllers –Exchangeability of “look and feel” Port to a new windowing platform does not change the model. Liabilities –Increased complexity –Excessive number of updates –Intimate connection between view and controller –Close coupling of (view, controller) and model Both view and controller make calls to model

Architectural patterns17 Distributed systems Advantages –Resource sharing Printers, files (HTTP), etc. –Openness Using standard protocols –Scalability –Fault tolerance Replication Disadvantages –Complexity –Security –Manageability –Unpredictability

Architectural patterns18 Client-server vs. distributed objects Client-Server –Clients and servers are treated differently Distributed objects –Interacting objects –Location is irrelevant (taken care of by middleware) –Build on top of client/server Like distributed library –Java RMI –CORBA

Architectural patterns19 Service-oriented architecture SOA Web services –HTTP for transportation –SOAP structured data exchange –UDDI for discovery –WSDL for description –XML used everywhere Service registry Service provider Service requestor

Architectural patterns20 References Buschmann et al. Pattern-Oriented Software Architecture, Volume1, Wiley 1996 Martin Fowler Patterns of Enterprise Application Architecture, Addison Wesley 2003 Ian Sommerville Software Engineering, 7 th edition, Addison Wesley Architectural Design 12. Distributed System Architectures Lethbridge & Langaniere Object- Oriented Software Engineering, 2 nd edition, McGraw-Hill Architecting and designing software