99
Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia University, Morgantown, West Virginia, USA, and Visiting Professor, Faculty of Computers and Information, Cairo University, Cairo, Egypt Software Architecture Styles م ي ح ر ل ا ن م ح ر ل ه ا ل ل م ا س ب ا له ل ول ا س ى ر عل لام س ل وا" ة لا ص ل له ، وا ل مد ح ل

Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Embed Size (px)

Citation preview

Page 1: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

1

Hany H. Ammar, Professor,LANE Department of Computer Science and Electrical Engineering

West Virginia University, Morgantown, West Virginia, USA, andVisiting Professor, Faculty of Computers and Information, Cairo University, Cairo,

Egypt

Software Architecture Styles

الرحيم الرحمن الله بسمالله ا رسول على والسالم والصالة ، لله لحمد

Page 2: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

2

OUTLINE

• Introduction• Software Architecture Styles• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• SW Systems Mix of Architecture Styles• Other Important Styles

Page 3: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Introduction

Recall the definition of Styles• An architectural style is a coordinated set of

architectural constraints that restricts the roles/features of architectural elements and the allowed relationships among those elements within any architecture that conforms to that style.

Page 4: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Introduction

What does it give us? • An architectural style describes a certain

codification of elements and their arrangements.

• Conversely, an architectural style constrains both the elements and their interrelationships.

• It specifies components and connectors types

Page 5: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

IntroductionExample Component Types

Page 6: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Ex:Connector

Types

Page 7: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Examples of Popular Architecture Styles

Page 8: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

8

Families of Architecture Styles• There is a number of families of styles that has been

defined and used in many software systems Notable examples are:

1. Independent Components: Event-based Architectures

2. Virtual Machines3. Data Flow: Pipes and Filters4. Data-Centered Systems5. Call-and Return Architectures

Page 9: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

9

OUTLINE

• Introduction

• Software Architecture Styles• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

Page 10: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

10

Architectural Styles Independent Components

1. Independent Components. Architecture is viewed a set of independent processes or objects or components that communicate through messages.

Two subfamilies: - Event based systems (implicit and direct invocation style), and - Communicating processes family (client-server style).

Page 11: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

11

Architectural styles: Event-based ArchitectureSome processes post events, others express an interest in events

Page 12: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Event-basedArchitecture

Page 13: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Event-based ArchitectureImplicit Invocation: The Observer Pattern

Page 14: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

14

Page 15: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

15

Page 16: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Another Example: Lunar Lander GamePlayers Subscribers register to the Game Server that Publishes information on new Lunar

Terrain data, new spacecraft, and the locations of currently registered space crafts

Component-connector notation

Page 17: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia
Page 18: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Summary of Event-Based Style

1.Independent Components asynchronously emit and receive events communicated over event buses

2.Components are independent concurrent even generators and consumers

3.Data elements are events sent as first class entities over the event bus

Page 19: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Communicating Processes: Client-Server Architecture Style

Page 20: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

20

OUTLINE

• Introduction

• Software Architecture Styles• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

Page 21: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

21

Architectural Styles Virtual Machines

2. Virtual Machines. Originated from the concept that programs are treated as data by a virtual machine, which is an abstract machine implemented entirely in software, that runs on top of the actual hardware machine. Ex: rule-based style.

Page 22: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Architectural Styles Virtual Machines

Page 23: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

23

Virtual Machines: The primary benefits are the separation between instruction and implementation,(Used when inputs are defined by a script and data)

Example: Java Virtual Machine. Java code translated to platform independent bytecodes. JVM is platform specific and interprets (or compiles -JIT) the bytecodes.

Page 24: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Virtual Machines Style

Page 25: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Virtual Machines Style Example

Page 26: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

26

OUTLINE

• Introduction

• Software Architecture Styles• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

Page 27: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

27

3. Data Flow. Include Batch Sequential Systems (BSS) and Pipes and Filters (PF).

- BSS: different components take turns at processing a batch of data, each saving the result of their processing in a shared repository that the next component can access. Ex. Dynamic control of physical processes based on a feedback loop.

- PF: A stream of data processed by a complex structure of process (filters). Ex, UNIX.

Architectural StylesData Flow

Page 28: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

28

Architectural StylesData Flow: Control Loop and Pipes and Filters

Control Loop

Page 29: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

BSS Architecture Style Example

Page 30: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

BSS Style Summary

Page 31: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

PF Exampleconcurrency between components (Filters) is allowed

Page 32: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

PF example in Embedded Systemsconcurrency between components (Filters) is allowed

A Robotics Example

Page 33: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

33

Page 34: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

34

PF Another Architecture Example:Watch for the Two Views

Page 35: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

PFs Style Summary

Page 36: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

36

OUTLINE

• Introduction

• Software Architecture Styles• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

Page 37: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

37

Data-Centered Architectural Styles

4. Data-Centered Systems. Consist of having different components communicate through shared data repositories. When data repository is an active repository that notifies registered components of changes in it then-blackboard style.

Page 38: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Data-Centered Architectural StylesRepository Architecture Style

Page 39: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Data-Centered Architectural StylesRepository Architecture Example: CASE Tools Example

Page 40: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Data-Centered Architectural StylesRepository Architecture Example: Compiler Architecture

Page 41: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

41

Data-Centered Architectural Styles

Blackboard Architecture Style: Components perusing shared data, and communicating through it.

Used in Database intensive systems

Page 42: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Data-Centered Architectural StylesBlackboard Architecture Style Example

Compare with the PFs Style

Page 43: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Data-Centered Architectural StylesBlackboard Architecture Style: Intelligent Agent Systems Example

Page 44: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Data-Centered Architectural StylesBlackboard Architecture Style:

Travel Counseling System Example

Page 45: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Data-Centered Architectural StylesBlackboard Architecture Style: Intelligent Agent Systems Example

Page 46: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Blackboard Architecture Style: Intelligent Agent Systems Example

Page 47: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Data-Centered Architectural StylesBlackboard and Publish/Subscribe Styles: Intelligent Agent Systems

Example

Page 48: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Blackboard Architecture Style

Page 49: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Rule-Based or Expert System Architecture Style: Three components, a user interface, an inference engine, and a knowledgebase

Page 50: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Rule-Based or Expert Systems Style

Page 51: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

51

OUTLINE

• Introduction

• Software Architecture Styles• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• SW Systems Mix of Architecture Styles

Page 52: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

52

Architectural stylesCall-and Return Family

5. Call-and Return Architectures. Due to heir simple control paradigm and component interaction mechanism , these architectures have dominated the SW landscape by the early decades of the SW Eng.

• There are several styles within this family: examples are main program and subroutine, and layered architectures.

-) Main Program and Subroutine Style. Programs are modularized based on functional decomposition, single thread of control held by the main program, which is then passed to subprograms, along with some data on which the subprograms can operate.

Page 53: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

53

Main Program and Subroutine Style

CourseInfo

PeopleInfo

Course

CourseOffering

StudentInfo ProfessorInfo

Register.exe

Course registrationSystem example

Page 54: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

54

Call-and Return Architectural styles-) Layered. Functionality is divided into layers of abstraction-

each layer provides services to the layer(s) above it, and uses the services of layer(s) below it. In its purest form, each layer access only the layer below it, but does not depend on lower layers.

Based on general systemsArchitecture, Network Architectures, etc.

Page 55: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Layered Architectural stylesExample of a Layered Application Architecture

Page 56: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Layered Architectural stylesExample: Interactive Electronic Technical Manual Layered Architecture

Data Access

IETM Electronic Display System (EDS)

IETM Data User Interface

PresentationLayer

Business LayerData Layer

Page 57: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Layered Architectural stylesA Robotics Architecture

The Reactive Layer contains basic skills of the robot such as grasping an object and behavior that must execute immediately in response to inputs from sensors. The Sequencing Layer combines functions in the reactive layer into more complex behavior. The Planning Layer performs slowerLong-term planning

Page 58: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

58

OUTLINE

• Introduction

• Software Architecture Styles• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• SW Systems Mix of Architecture Styles

Page 59: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

59

SW Systems-Mix of Architecture Styles

• Most SW systems use a mix of architecture styles. Ex, personnel management system with a scheduling component, implemented using the independent component style, and a payroll component, using the batch sequential style.

Page 60: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

SW Systems-Mix of Architecture StylesQuality Attributes tradeoffs

• Choosing a style to implement a particular system depends on several factors based on stakeholders concerns.

• The typical factors concern the level of quality attributes that each style enables us to attain. EX, event-based systems-achieve very high level of evolvability, at the expense of performance and complexity.

• Virtual-machine style-achieve very high level of portability, at expense of performance and perhaps even testability.

Page 61: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

SW Systems-Mix of Architecture StylesComponents of each Layer use different architecture styles

Page 62: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

SW Systems-Mix of Architecture Styles

Page 63: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

63

OUTLINE• Introduction• Software Architecture Styles

• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• SW Systems Mix of Architecture Styles• Other Important Styles

• Buffered Massage-Based • Model-View-Controller• Presentation-Abstraction-Control• Broker Architecture Style• Service Oriented Architecture (SOA)• Peer-to-Peer Architecture

Page 64: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Buffered Massage-Based Software Architecture Style

In the J2EE Paltform,• Java Massage Server (JMS) ia an API thatprovides

Asynchronous massage queuing mechanism

• Massage Driven Bean (MDB) is a special type of EJBs that consumes asynchronous massages

Page 65: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Buffered Massage-Based Software Architecture Style

Clients can publish massages on the JMS and MDBs register with the JMS to receive Certain massage topics (asynchronous massage based publish/subscribe).

Page 66: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Buffered Massage-Based Software Architecture Style

• The MDB plays the role of a massage listenerIt can connect remote Session EJBs or Entity EJBs

Page 67: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Web Application Example

Page 68: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Massage-Based Architecture Styleconsists of three types of components

Page 69: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Massage-Based Architecture Style

Page 70: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Massage-Based Architecture Style

Page 71: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

71

OUTLINE• Introduction• Software Architecture Styles

• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• Other Important Styles• Buffered Massage-Based • Model-View-Controller• Presentation-Abstraction-Control• Broker Architecture Style• Service Oriented Architecture (SOA)• Peer-to-Peer Architecture

Page 72: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Model-View-Controller Architecture Style

• The Controller manipulates the data Model• The View retrieves data from the model and

displays needed information

Page 73: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Model-View-Controller Architecture StyleDynamic Interactions

Page 74: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Model-View-Controller Architecture StyleWeb Applications Java-based Implementation Example

Page 75: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

75

OUTLINE• Introduction• Software Architecture Styles

• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• Other Important Styles• Buffered Massage-Based • Model-View-Controller• Presentation-Abstraction-Control• Broker Architecture Style• Service Oriented Architecture (SOA)• Peer-to-Peer Architecture

Page 76: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Presentation-Abstraction-Control Agents Architecture Style

• Based on MVC Style but geared towards agent-oriented Systems• Consists of a Hierarchy of Agents, each agent with a P, A, and C components• The C component in each agent is in charge with communicating with other agents• The top-level agent is in charge of the core data and business logics• Lower-Level Agents provides detailed data and presentation

Page 77: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Presentation-Abstraction-Control Agents Architecture Style Example

• Simple Presentation Application that can displayPages of a presentation • Consists one a top-level agent 1 and four lower levelagents• Agent 1 have access to the pages,and the other agents respond touser requests for first, previous, nextand last pages

A scenario capturingthe event of pressing the next button

Page 78: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Presentation-Abstraction-Control Style

Page 79: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Presentation-Abstraction-Control Style

Page 80: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

PAC Style vs MVC Style

Page 81: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

81

OUTLINE• Introduction• Software Architecture Styles

• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• Other Important Styles• Buffered Massage-Based • Model-View-Controller• Presentation-Abstraction-Control• Broker Architecture Style• Service Oriented Architecture (SOA)• Peer-to-Peer Architecture

Page 82: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Broker Architecture Style

Brokers gets requests from client proxies and manages them by forwarding to serverProxies or dispatches them to other connected brokers

Page 83: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Broker Architecture Style

Page 84: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Broker Architecture Style

Page 85: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Broker Architecture Style

Page 86: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Example: CORBA, Common Object Request Broker Architecture

Client-Side ProxyIDL

Server-Side Proxy(IDL)

Page 87: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Example: CORBA, Common Object Request Broker Architecture

Page 88: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

88

OUTLINE• Introduction• Software Architecture Styles

• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• Other Important Styles• Buffered Massage-Based • Model-View-Controller• Presentation-Abstraction-Control• Broker Architecture Style• Service Oriented Architecture (SOA)• Peer-to-Peer Architecture

Page 89: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Service Oriented Architecture (SOA) StyleMakes use of an Enterprise Service Bus ESB

Used in web-based systems and distributed computing

nodes make resources available to other participants in the system as independent services that the participants access in a standardized way using the ESB

BeforeSOA

The SOA Style

Page 90: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Service Oriented Architecture (SOA) StyleA Map of SOA Components

Process Services

Orchestration

System BPM

Business Logic

Databases

Data Services

Enterprise Service Bus (ESB)

Systems of Record

Web Portals

Human Business Process Management (BPM)

Sec

urity

Reg

istr

y an

d R

epos

itory

Man

age

and

mon

itor

The ESB Performs: • data transformation• Intelligent routing• Real time monitoring• Exception handling• Service security

Page 91: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Cloud Services ArchitectureSOA supports Cloud Computing Models

Page 92: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Cloud Services ArchitectureHuman as a service, Software as a service, Infrastructure as a service

Page 93: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Modeling and Documenting Software Architectures

93

OUTLINE• Introduction• Software Architecture Styles

• Independent Components• Virtual Machines• Data Flow• Data-Centered• Call-and return

• Other Important Styles• Buffered Massage-Based • Model-View-Controller• Presentation-Abstraction-Control• Broker Architecture Style• Service Oriented Architecture (SOA)• Peer-to-Peer Architecture

Page 94: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Peer-to-Peer Architecture Style

Page 95: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Peer-to-Peer Architecture StyleThe Gnutella Example

• Pure Peer-to-PeerArchitecture• A sends query for a data resource to neighbors B and H, they pass it on until the peer havingthe resource is found or until a certain threshold of hopsis reached

Page 96: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Peer-to-Peer Architecture StyleThe Gnutella Example

Recent Versions of Gnutella supports two types of peers Ultra peers and Leaf peersUltra peers runs in systems with fast internet connects and are responsible for request routing and responses, they are connected to a large number of other Ultra peers and leaf peers, while the leaf peers are connected to a small number of Ultra peers

Page 97: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Peer-to-Peer Architecture StyleThe Skype Example

• A mixed client-Server and Pee-to-Peer• Skype Peers get promoted to a supernode status based on their network connectivityAnd machine performance• Supernodes perform the Communication and routingof massages to establish a call• When a user logs in to the serverhe is connected to a supernode• If a peer becomes a supernode he unknowingly bears the cost of routing a potentially large number of calls.

Page 98: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Peer-to-Peer Architecture StyleThe Skype Example

Page 99: Modeling and Documenting Software Architectures 1 Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia

Conclusions• An architectural style is a coordinated set of

architectural constraints that restricts the roles/features of architectural elements and the allowed relationships among those elements

• Choosing a style to implement a particular system depends on several factors based on stakeholders concerns and quality attributes

• Most SW systems use a mix of architecture styles