Architectural Styles: Definitions

Similar documents
Basic Properties of Styles

ECE750-Topic11: Component-Based Software Systems

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

What is CBSE and Why? Component-Based Software Engineering. But why not in Software engineering? Component Everywhere

Component-Based Software Engineering

N-Tiered Enterprise Styles. Example 1. Key Concepts. Component-Based Software Engineering. ECE493-Topic 4 Winter 2006

An Introduction to Software Architecture

An Introduction to Software Architecture

Lecture 1. Chapter 6 Architectural design

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

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

Component-Based Software Engineering

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

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

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

Chapter 6 Architectural Design. Chapter 6 Architectural design

Component-Based Software Engineering

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

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

Specification of an Interface. Component Specification. Component-Based Software Engineering. A Component Comprised of?

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

Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions

Modelling with OCL. Context of OCL Expressions. The Object Constraint Language (OCL) Component-Based Software Engineering. ECE493-Topic 4 Winter 2006

J2EE Application Server. EJB Overview. Java versus.net for the Enterprise. Component-Based Software Engineering. ECE493-Topic 5 Winter 2007

Architectural Design. Architectural Design. Software Architecture. Architectural Models

CAS 703 Software Design

Component-Based Software Engineering. ECE493-Topic 5 Winter Lecture 26 Java Enterprise (Part D)

Review Architectural Style. Review Style Properties and Benefits

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns

Software Architectures

Chapter 6 Architectural Design

Architectural Styles I

Architectural Models and Styles Component-Based Software Engineering ECE493-Topic 5 Winter 2007 Lecture 12 The Object Constraint Language (Part A)

Architectural Design

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE

Architectural Styles - Finale

Lecture 17: (Architecture V)

Software MEIC. (Lesson 20)

Software Architecture in Practice

Software Architecture

Software Architecture

Architectural Patterns. Architectural Patterns. Layers: Pattern. Architectural Pattern Examples. Layer 3. Component 3.1. Layer 2

Architectural Patterns

Architectural Design

In this Lecture you will Learn: System Design. System Architecture. System Architecture

Common Architectural Styles & Patterns

Patterns Architectural Styles Archetypes

Advanced Topics in Operating Systems

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

Software Architecture

Service Interface Design RSVZ / INASTI 12 July 2006

XVIII. Software Architectures

Architecture of Software Intensive Systems

CAS 703 Software Design

Lesson 5 Web Service Interface Definition (Part II)

XVIII. Software Architectures

Architectural Design Outline

Chapter 13: Architecture Patterns

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

CBSE and Mobile Application Development

Agent-Enabling Transformation of E-Commerce Portals with Web Services

(9A05803) WEB SERVICES (ELECTIVE - III)

Brief introduction of SocketPro continuous SQL-stream sending and processing system (Part 1: SQLite)

Creating and Analyzing Software Architecture

Architectural Styles I

Software Engineering (CSC 4350/6350) Rao Casturi

F O U N D A T I O N. OPC Unified Architecture. Specification. Part 1: Concepts. Version 1.00

Service-Oriented Architecture (SOA)

CICS solutions White paper Delivering e-business access to CICS: strategic options.

Performance evaluation of J2EE

Architectural Styles. Reid Holmes

Lecture 8: February 19

Introduction to Software Engineering 10. Software Architecture

Software MEIC. (Lesson 20)

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

ESE Einführung in Software Engineering!

BEAAquaLogic. Service Bus. JPD Transport User Guide

CSci Introduction to Distributed Systems. Communication: RPC

CHAPTER 4: PATTERNS AND STYLES IN SOFTWARE ARCHITECTURE

ECE250: Algorithms and Data Structures C++ Language Tutorial

Software architecture: Architectural Styles

Software Architecture

describe the functions of Windows Communication Foundation describe the features of the Windows Workflow Foundation solution

CS321: Computer Networks FTP, TELNET, SSH

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

SE 2 [CS 446, CS 646, ECE 452, SE 464] Software Design & Architecture Spring 2011 MIDTERM

Design Engineering. Overview

System models for distributed systems

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

CS321: Computer Networks TELNET, SSH

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

COMMUNICATION PROTOCOLS

ICS 52: Introduction to Software Engineering

ECE250: Algorithms and Data Structures AVL Trees (Part A)

Component Based Media Streaming Framework

Nirvana A Technical Introduction

Architectural Patterns

Oracle Cloud Using the MailChimp Adapter. Release 17.3

Design Patterns. Architectural Patterns. Contents of a Design Pattern. Dr. James A. Bednar. Dr. David Robertson

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION

Transcription:

Component-Based Software Engineering ECE493-Topic 4 Winter 2006 Lecture 7 Architectural Styles in CBSE (Part A) Ladan Tahvildari Assistant Professor Dept. of Elect. & Comp. Eng. University of Waterloo Architectural Styles: Definitions Architectural styles are recurring patterns and idioms. Established, shared understanding of common design forms is a mark of a mature engineering field. Architectural style is an abstraction of recurring composition and interaction characteristics of a set of architectures. Styles are key design idioms that enable exploitation of suitable structural and evolution patterns and facilitate component, connector, and process reuse. 2

Basic Properties of Styles A vocabulary of design elements Component and Connector types (pipes, filters, clients, servers) A set of configuration rules Constraints that determine allowed compositions of elements (a component may be connected to at most two other components) A semantic interpretation Compositions of design elements have well-defined meanings Explanation of what components are supposed to do in general Explanation of how connections are meant to work 3 Benefits of Styles Design reuse well-understood solutions applied to new problems Code reuse shared implementations of invariant aspects of a style Understandability of system organization a phrase such as client-server conveys a lot of information Interoperability supported by style standardization components can be independently developed with a particular style in mind Visualizations style-specific depictions matching engineers mental models 4

Some Architectural Styles Learning the following domain/platform-independent styles: Pipes and Filters 2-Tiered (Client/Server) N-Tiered Layered Blackboard Model View Controller (MVC) Pipes and filters were easy The rest require a deeper understanding of connections 5 Style 1: Pipes and Filters Components are filters transform input messages into output messages All components of a pipe and filter architecture use the same interface Input through provided interface Output through required interface Usually one provided (input) interface and one required (output) interface Connectors are pipes simple connections between filters provided and required interfaces Style invariants filters are independent a filter has no knowledge of up- and down-stream filters Each filter exposes a very simple interface: it receives messages on the inbound pipe, processes the message, and publishes the results to the outbound pipe. 6

Style 1: Pipes and Filters Advantages easy understanding of the system's behavior as the composition of filters filter addition, replacement, and reuse Disadvantages batch organization of processing interactive applications lowest common denominator on data transmission Commonly seen in UNIX shells Compilers Signal Processing Parallel Programming But also useful style for Enterprise Systems 7 Style 1: PF Example In many enterprise integration scenarios, a single event triggers a sequence of processing steps, each performing a specific function. Consider an order processing system -- new orders arrive from a client component in the form of a message. Requirement 1: the message is encrypted to prevent eavesdroppers from spying on a customer's order. Requirement 2: the messages contain authentication information in the form of a digital certificate to ensure that orders are placed only by trusted customers. 8

Style 1: PF Example Consider an order processing system -- new orders arrive from a client component in the form of a message. Requirement 3: duplicate messages could be sent from external parties (remember all the warnings on the popular shopping sites to click the 'Order Now' button only once?). To avoid duplicate shipments and unhappy customers, we need to eliminate duplicate messages before subsequent order processing steps are initiated. To meet these requirements, we need to transform a stream of possibly duplicated, encrypted messages containing extra authentication data into a stream of unique, simple plain-text order messages without the extraneous data fields. 9 Style 1: PF Example External client component produces an order message Messages are input/output using the same simple interface transmit(msg:object) is the method that transmits the message msg, typed as an Object <<Interface>> IMessage +transmit(msg:object) IMessage Decryption Deduplication Authentication Order processing system IMessage OrderSystem 10

Style 1: PF Example Pipes and filters lets us perform complex processing on a message while maintaining independence and flexibility Because all components use the same external interface they can be composed into different solutions by connecting the components to different pipes We can add new filters, omit existing ones or rearrange them into a new sequence -- all without having to change the filters themselves. Orders are no longer encrypted but we want a log of each message sent Better to authenticate orders before deduplicating Decryption Logbook Authentication Deduplication Authentication Deduplication OrderSystem 11 A Closer Look at Connections In UML 2, connections are understood as an architectural abstraction of usage between components An abstraction of many possible implementations Recall our simple Java implementation of a connection: a reference to one component class A within another B In such an implementation, the class object implementing A communicates with the object for B by calling methods on the B s interface This kind of communication is synchronous: if A calls a method on B and then A must waits for the method to finish computing and return before A can continue A B 12

Synchronous Communication :A :B Call to method Method returns When we draw a connection in a UML 2 architecture, we could implement the connection as synchronous communication UML 2 is completely implementation independent, so there is no native way to specify that a connection should correspond to synchronous communication UML 2 lets us specify whatever constraints we want via stereotypes <<synchronous>> stereotype to denote that a connection should be implemented with synchronous semantics 13 Asynchronous Communication A can continue its computation immediately after invoking a method on B Call from A does not require that B return immediately We use the <<asynchronous>> stereotype to specify that a connector has this form of implementation semantics 14

Publish/Subscribe Communication Components subscribe to events from a publisher component :B :A :C The publisher sends events to all subscribing components Subscribe The subscribers are anonymous to the publisher Notify Subscribe Notify The anonymity is ignored at the architectural level Our own <<publish/subscribe>> stereotype to designate this style of implementation semantics Notify B <<publish/subscribe>> C A 15 Style 2: 2-Tiered Client/Server One of the most common styles in distributed systems Components are clients and servers Application logic is divided between clients and servers two tiers E.g., client could handle presentation logic, while the server handles business rules and the database Clients and servers may be composite Constraints Server provides services to the client, but doesn t require Clients require services of the server A larger number of clients than servers Semantics (meaning and implementation) Servers do not know the number or identities of clients Clients know server s identity Clients and servers are often distributed Useful whenever there is a need to separate application logic into two tiers 16

Style 2: 2 Tiered Client/Server Example Google offers its search engine as a webservice A range of clients use SOAP to use the provided interface of the webservice A webpage servlet client uses the webservice as part of its webpages A.NET based b-2-c middleman application uses the webservice to search for best buys of products Different clients have very different purposes but the webservice server has the same functionality It makes sense to keep web searching and client functionality separate to both maximize on possible uses of the server and also to enable better maintenance Multiplicities of usage are written on the sides of connected interfaces In this example, the webservice can have many clients, so we put * on the clients required interfaces Webpage (client) * *.NET application (client) 1 Google webservice (server) 17 Style 3: N-Tiered Similar to client/server, but with a set of components, acting as both clients and servers: servers can also be clients of other servers Application logic is divided between the chain of components e.g., client could handle presentation logic, while one server handles business rules, connected to another server that handles the database Clients and servers may be composite Constraints Servers provides services to their clients, but doesn t require Clients require services of the server 18

Style 3: N-Tiered Semantics Servers do not know the number or identities of their clients Clients know server s identity Components are usually distributed Useful whenever there is a need to separate application logic into software packages 19 Example Typical 3 Tiered Architecture 20

Style 3: N-Tiered Advantages Separation of concerns, divide and conquer approach to solving large scale software problem Maintenance Disadvantages Performance (especially if distributed components) 21