cas 703 software design - mcmaster university · cas 703 software design dr. ridha khedri...

51
CAS 703 Software Design Dr. R. Khedri Outline Overview Model-View- Controller Presentation- Abstraction- Control (PAC) Architecture Client/Server Multi-tier Broker Architectural Style Service-Oriented Architecture (SOA) CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario Acknowledgments: Material based on Software Architecture Design by Tao et al. (Chapters 9 and 10) Dr. R. Khedri CAS 703 Software Design

Upload: others

Post on 15-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

CAS 703 Software Design

Dr. Ridha Khedri

Department of Computing and Software, McMaster UniversityCanada L8S 4L7, Hamilton, Ontario

Acknowledgments: Material based on Software Architecture Design by Tao et al. (Chapters 9 and 10)

Dr. R. Khedri CAS 703 Software Design

Page 2: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

1 OverviewInteraction Oriented ArchitectureDistributed Architecture

2 Model-View-ControllerMVC-IMVC-ll

3 Presentation-Abstraction-Control (PAC) Architecture

4 Client/Server

5 Multi-tier

6 Broker Architectural Style

7 Service-Oriented Architecture (SOA)

Dr. R. Khedri CAS 703 Software Design

Page 3: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Interaction OrientedArchitecture

DistributedArchitecture

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åOverview

åInteraction Oriented Architecture

More and more software applications that involve userinput and output interactions

We focus on the software architecture that bestsupports user interaction

Interaction oriented software architecture decomposesthe system into three major partitions

Data module (provides the data abstraction& corebusiness logic)Flow control module (determines the flow controls,view selections, communications between modules, jobdispatching, and certain data initializations andconfigurations)View presentation module (responsible for visual oraudio data output presentation)

Dr. R. Khedri CAS 703 Software Design

Page 4: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Interaction OrientedArchitecture

DistributedArchitecture

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åOverview

åInteraction Oriented Architecture

This architecture allows the separation of userinteractions from data abstraction and business dataprocessing

Allows multiple views for a same data set

Even for a specific view presentation, the interfaces mayneed to change very often (the loose coupling betweendata abstractions and its presentations is very helpful)

A control module plays a central role that mediates thedata module and view presentation modules

All three modules may be completely connected

Dr. R. Khedri CAS 703 Software Design

Page 5: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Interaction OrientedArchitecture

DistributedArchitecture

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åOverview

åInteraction Oriented Architecture

There are two categories of interaction orientedarchitecture:

Presentation-Abstraction-Control (PAC)

Model-View-Controller (MVC).

They are different in their flow controls and structureorganization

The MVC does not have a clear hierarchical structureand all three modules are connected together

Dr. R. Khedri CAS 703 Software Design

Page 6: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Interaction OrientedArchitecture

DistributedArchitecture

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åOverview

åInteraction Oriented Architecture

The PAC is an agent based hierarchical architecture

The system is decomposed into many cooperatingagentsEach agent has three components (Presentation,Abstraction, and Control)The Control component in each agent is in charge ofcommunications with other agentsThe top-level agent provides core data and businesslogicsThe bottom level agents provide detailed specific dataand presentationsA middle level agent may play a role of coordinator oflow-level agentsThere are no direct connections between Abstractioncomponent and Presentation component in each agent

Dr. R. Khedri CAS 703 Software Design

Page 7: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Interaction OrientedArchitecture

DistributedArchitecture

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åOverview

åDistributed Architecture

A distributed system is a collection of computersconnected through a communication network

Data is distributedSoftware is distributedUsers are distributed

The sub-systems or components within a distributedsystem communicate with each other via

message passingremote procedure callremote method invocationetc.

Dr. R. Khedri CAS 703 Software Design

Page 8: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Interaction OrientedArchitecture

DistributedArchitecture

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åOverview

åDistributed Architecture

Two important issues for designing a distributed system are:

Topology: the way in which entities connect with eachother

Mode: the method by which they communicate witheach other

SynchronousAsynchronousmessage drivencallbackevent-driven

Dr. R. Khedri CAS 703 Software Design

Page 9: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Interaction OrientedArchitecture

DistributedArchitecture

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åOverview

åDistributed Architecture

Figure: Examples of network topologies

Dr. R. Khedri CAS 703 Software Design

Page 10: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Interaction OrientedArchitecture

DistributedArchitecture

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åOverview

åDistributed Architecture

A distributed system can be modeled as a

Client/server architecture

Broker architecture

Service-Oriented Architecture (SOA)

The important features of a distributed architectureinclude

its service location transparency

service reliability and availability

Dr. R. Khedri CAS 703 Software Design

Page 11: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

Most of Web developers are familiar with MVCarchitecture

Widely adopted for Web server site interactiveapplication design such as online shopping, onlinesurvey, online student registration, etc.

MVC architecture is specifically used in applicationswhere user interfaces are prone to data changes all thetime

MVC architecture typically supports ”look and feel”features in GUI application

The Java Swing components and Java Swing layoutmanagers are designed in MVC architecture

Dr. R. Khedri CAS 703 Software Design

Page 12: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

Summary:The Controller

manages the user input requestscontrols the sequence of user interactionsselects desired views for output displaysmanages all initialization, instantiations, andregistrations of other modules in the MVC system

The Model moduleprovides all core functional services and encapsulates alldata detailsdoes NOT depend on other modules, and it does notknow which views are registered with or attached to it

The View moduleis responsible for displaying the data provided by theModel module and updating the interfaces wheneverthe data changes

Dr. R. Khedri CAS 703 Software Design

Page 13: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-I

The MVC-I is a simple version of MVC architecture

The system is simply decomposed into twosub-systems:

Controller/View

It handles input and output processing and theirinterfaces

It registers with (attaches to) data module

ModelIt copes with all core functionality and data

It notifies the Controller-View module of any datachanges in the Model module

Dr. R. Khedri CAS 703 Software Design

Page 14: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-I

The connection between the Controller/View and theModel can be designed in a pattern of subscribe/notify

The Controller/View subscribes the Model and theModel notifies the Controller/View of any changes

The Controller/View is an observer to the data in theModel of MVC

Read the example given in Chaptre 9, Section 9.2.1 tosee how MVC-I architecture concretely works

Dr. R. Khedri CAS 703 Software Design

Page 15: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-I

Figure: MVC-I architecture

Dr. R. Khedri CAS 703 Software Design

Page 16: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-ll

MVC-II architecture

The Model module provides all core functionality anddata supported by database (Same as MVC-I)

The View module displays the data from the Modelmodule

The Controller module

It takes input requests, validates input data, initiatesthe Model and the View and their connection

It dispatches tasks

Dr. R. Khedri CAS 703 Software Design

Page 17: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-ll

The Controller and the View register with the Modelmodule

Whenever the data in the Model module is changed theView module and the Controller module are notified

Comparison to MVCI

In both MVC-I and MVC-II, Model module plays anactive role

In MVC-Il architecture, the View module and theController module are completely separated

Dr. R. Khedri CAS 703 Software Design

Page 18: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-ll

Figure: MVC-II architecture

Dr. R. Khedri CAS 703 Software Design

Page 19: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-ll

Figure: A detailed MVC-II architecture

Dr. R. Khedri CAS 703 Software Design

Page 20: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-ll

Figure: Sequence diagram for MVC architecture

Dr. R. Khedri CAS 703 Software Design

Page 21: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-ll

Figure: MVC architecture on Java Web platform

Dr. R. Khedri CAS 703 Software Design

Page 22: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-ll

Applicable domain of MVC architectureSuitable for interactive applications (multiple views areneeded + volatile graphics interfaces)

There are clear divisions between controller, view, anddata modules (different professionals can be assignedto work on different aspects of the system)

BenefitsMany MVC vendor frameworks available

Multiple views synchronized with same data model

Easy to plug in new or change interface views, updateinterface views with new technologies

Very effective for developments (team = graphics,programming, and data base professionals)

Dr. R. Khedri CAS 703 Software Design

Page 23: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

MVC-I

MVC-ll

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åModel-View-Controller

åMVC-ll

Limitations

Does not fit agent-oriented application such asinteractive mobile, robotics applications

Multiple pairs of controllers and views based on thesame data model make any data model changeexpensive

The division between the View and the Controller isnot very clear in some cases

Related architecture

Implicit invocation architecture such as event-based,Multi-tierarchitecture, andPresentation-Abstraction-Control (PAC)

Dr. R. Khedri CAS 703 Software Design

Page 24: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åPresentation-Abstraction-Control (PAC) Architecture

The PAC architecture is quite similar to MVC

The PAC was developed from MVC to support theapplication requirement of multiple agents in additionto the interactive application requirement

The PAC three components concepts are applied to allconcrete sub-system architecture

It is very suitable for any distributed system where eachremote agent has its own functionalities with data andinteractive interface

Another feature: all agents need to communicate withother agents in a well structured way

Dr. R. Khedri CAS 703 Software Design

Page 25: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åPresentation-Abstraction-Control (PAC) Architecture

Figure: A single agent in PAC

Dr. R. Khedri CAS 703 Software Design

Page 26: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åPresentation-Abstraction-Control (PAC) Architecture

Applicable domain of PAC architectureInteractive system where the system can be dividedinto many cooperating agents in a hierarchicalstructure (Each agent has its specific job)

The coupling among the agents is expected very loose(change of one agent will not affect the others)

BenefitsSupporting multi-tasking, multi-viewing

Supporting agent reusability and extensibility

Easy to plug in new agent or replace an existing agent

Supporting concurrency (agents are in different threadsor different devices or computers)

Dr. R. Khedri CAS 703 Software Design

Page 27: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åPresentation-Abstraction-Control (PAC) Architecture

LimitationsOverhead due to

the control bridge between presentation andabstractionthe communications of controls of many agents

Difficult to determine the right numbers of the agentsbased on the loose couplings between agents and highindependence of each other

Development complexity: due to complete separation ofpresentation and abstraction (communications betweenagents only take place between the controls of agents)

Increased complexity of the system design andimplementation

Related ArchitectureLayered architecture, multi-tier architecture, MVCarchitecture

Dr. R. Khedri CAS 703 Software Design

Page 28: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åClient/Server

The client-server model is the most commondistributed system

It is based on two communicating subsystems (usuallyrunning on different processors)

Client issues a request to the second process server

Server process receives the request, carries it out, andsends a reply to the client

Dr. R. Khedri CAS 703 Software Design

Page 29: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åClient/Server

Figure: Two tier client/server architecture

Dr. R. Khedri CAS 703 Software Design

Page 30: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åClient/Server

AdvantagesSeparation of responsibilities such as user interfacepresentation and business logic processing

Reusability of server components

DisadvantagesLack of heterogeneous infrastructure to deal with therequirement changes

Security complications

Server availability and reliability

Testability and scalability

Fat-clients/ Thin-clients (depends on the application)

Dr. R. Khedri CAS 703 Software Design

Page 31: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åMulti-tier

The front tier in a multi-tier architecture is the userinterface presentation tier

The middle-tier(s) take(s) care of business logic,application decision, and execution

The back-end tier usually works on databasemanagement, or on a (virtual) machine

The advantages of multi-tier over the two-tierarchitecture are

the enhancement of reusabilityscalability by the middle tier

The middle tier can also provide multi-threadingsupports for scalability

Multi-tier architecture also reduces the traffic on thenetwork

Disadvantage: complex testability

Dr. R. Khedri CAS 703 Software Design

Page 32: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åMulti-tier

Figure: Three tier architecture

Dr. R. Khedri CAS 703 Software Design

Page 33: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

The broker architecture is a middleware architecturewidely used in distributed computing

It is suitable for distributed computing that coordinatesand facilitates communication

brokering the service requestslocating proper serverforwarding and dispatching requestssending responses or exceptions back to clients

It can be used to structure distributed software systemswith decoupled components that interact by remoteservice invocations

The most important quality of this architecture =better decoupling between clients and servers

Dr. R. Khedri CAS 703 Software Design

Page 34: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

Servers make their services available to their clients byregistering and publishing their interfaces with thebroker

Clients can request the services of servers from thebroker statically or dynamically by look-up

A broker acts as a policeman in a busy intersectionwho controls and interacts with the client componentsand server components

The connection between clients and servers ismaintained by the broker

Dr. R. Khedri CAS 703 Software Design

Page 35: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

A distributed client can access distributed servicessimply by calling a remote method of a remote object

This concept is similar to unix Remote Procedure Call(RPC) and Java Remote Method Invocation (RMI)

The clients can dynamically invoke the remote methodseven if the interfaces of the remote objects are notavailable at the compilation time

Dr. R. Khedri CAS 703 Software Design

Page 36: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

Client has a direct connection to its client-proxy

Server has direct connection to its server-proxy

The proxy talks to the mediator-broker

The proxy is a well known pattern for hiding low-leveldetailed communication processing

It intercepts the client’s requestgets all argumentspackets itmarshals (streamlines) and formats the package in theformat of communication protocolsends it to the broker

A broker system is also called proxy-based system

Dr. R. Khedri CAS 703 Software Design

Page 37: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

Sub-components of a broker architecture

BrokerStub (client-side proxy): It mediates between client andbrokerSkeleton (server-side proxy)

It is statically generated by the service interfacecompilation and then deployed to the server sideIt receives the requests, unpacks the requests,unmarshals the method arguments, and calls theappropriate serviceIt also marshals results from the sever before it sends itback to the client

Bridges (Optional)Used to hide implementation details when two brokersinteroperateCan connect two different networks based on differentcommunication protocols

Dr. R. Khedri CAS 703 Software Design

Page 38: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

Figure: Broker model

Dr. R. Khedri CAS 703 Software Design

Page 39: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

Figure: Connected brokers with client/server proxy

Dr. R. Khedri CAS 703 Software Design

Page 40: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

Figure: Class diagram for broker architecture

Dr. R. Khedri CAS 703 Software Design

Page 41: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

Figure: Sequence diagram for broker architecture

Dr. R. Khedri CAS 703 Software Design

Page 42: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åBroker Architectural Style

Advantages

Server component implementation and locationtransparencyChangeability and extensibilitySimplicity for clients to access server and serverportabilityInteroperability via broker bridgesReusabilityFeasibility of runtime changes of server components(add or remove server components)

Disadvantages

Inefficiency due to the overhead of proxiesLow fault-toleranceDifficulty in testing

Dr. R. Khedri CAS 703 Software Design

Page 43: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åService-Oriented Architecture (SOA)

A service is a business functionality that iswell-defined and self-containedindependent from other servicespublished and available to be used via an interface

SOA services can be reused extensively regardless ofwhether they are based on new or legacy applicationsLoose coupling of service-orientation architectureprovides a great flexibility for enterprises to make useof all available service resourses

The connections between services are conducted bycommon and universal message oriented protocols suchas the SOAP Web service protocolA connection can be established statically ordynamically

Dr. R. Khedri CAS 703 Software Design

Page 44: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åService-Oriented Architecture (SOA)

Figure: Client with services and service directory

Dr. R. Khedri CAS 703 Software Design

Page 45: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åService-Oriented Architecture (SOA)

A service-oriented application might make use of manyavailable services

For that one needs a flow control language

allows specifying the sequence and logical order of thebusiness executions based on the business logic

Some services can be reused by other applications thatthey are not originally designed for

We can build a new service out of existing services

aggregation: extends one endpoint of a service to makea new interface of the new servicecontainment structure: has one interface that wraps allused services

Services can be recursively constructed to satisfy amore complex business needs (through aggr. and cont.)

Dr. R. Khedri CAS 703 Software Design

Page 46: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åService-Oriented Architecture (SOA)

Figure: Service composition

Dr. R. Khedri CAS 703 Software Design

Page 47: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åService-Oriented Architecture (SOA)

Figure: Service reuse

Dr. R. Khedri CAS 703 Software Design

Page 48: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åService-Oriented Architecture (SOA)

Figure: Service composition model

Dr. R. Khedri CAS 703 Software Design

Page 49: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åService-Oriented Architecture (SOA)

Figure: Service working model

Dr. R. Khedri CAS 703 Software Design

Page 50: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Patterns for Interaction Oriented and Distributed Arch.

åService-Oriented Architecture (SOA)

Advantages of SOA

Loosely-coupled connection

Each service component is independent from otherservices due to the stateless service feature

Interoperability: Technically any client or any servicecan access other services regardless of their platform,technology, vendors, or language implementations

Reusability: Any service can be reused by any otherservices and service is developed to be reused as well

Scalability: Loosely coupled services make themselveseasy to scale

Dr. R. Khedri CAS 703 Software Design

Page 51: CAS 703 Software Design - McMaster University · CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario

CAS 703 SoftwareDesign

Dr. R. Khedri

Outline

Overview

Model-View-Controller

Presentation-Abstraction-Control (PAC)Architecture

Client/Server

Multi-tier

BrokerArchitectural Style

Service-OrientedArchitecture (SOA)

Dr. R. Khedri CAS 703 Software Design