Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

CS 3212

Software Architecture & Design

Dr. Chinthana Wimalasuriya

Lecture 4
Software Connectors

Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved.
Software Architecture: Foundations, Theory, and Practice

Overview

 Introduction
 Connector Roles and Types
 Example Connectors

2
Software Architecture: Foundations, Theory, and Practice

Introduction

3
Software Architecture: Foundations, Theory, and Practice

What is a Software Connector?


 Software connectors perform transfer of control and data
among components.
 Connectors can provide services such as;
 Persistence
 Invocation
 Messaging
 Transaction
 Middleware standards like CORBA, DCOM and RMO
referred to these as “facilities components”.
 Software connectors are NOT just calls between
components like method calls.

4
Software Architecture: Foundations, Theory, and Practice

Connectors in an Architecture

 Architectural elements that models


 Interactions among components

 Rules that govern these interactions

 Simple interactions
 Procedure calls

 Shared variable access

 Complex and semantically rich interactions


 Client-server protocols

 Database access protocols

 Asynchronous event multicast


5
Software Architecture: Foundations, Theory, and Practice

Connectors in an Architecture
(contd.)
 Each connector provides
 Interaction duct(s)

 Transfer of control and/or data

 First class entities


 Have identity
 Describe all system interactions
 Entitled for their own specification and abstraction.

6
Software Architecture: Foundations, Theory, and Practice

Connectors vs. Components

 Components provide application-specific functionality.


 Connectors provide application-independent interaction
mechanisms.
 Components design involves functionality abstraction
and/or parametrisation.
 Connectors design involves interaction abstraction
and/or parametrisation.
 Connectors are independent of components.

7
Software Architecture: Foundations, Theory, and Practice

Benefits of Connectors

 Separate computation from interaction


 Minimize component interdependencies
 Support software evolution
 At component-level, connector-level, and system-level

 Potential for supporting dynamism


 Facilitate heterogeneity
 Become points of distribution
 Aid system analysis & testing

8
Software Architecture: Foundations, Theory, and Practice

Simple Connector

9
Software Architecture: Foundations, Theory, and Practice

Event Bus Connector

10
Software Architecture: Foundations, Theory, and Practice

Connector Roles and Types

11
Software Architecture: Foundations, Theory, and Practice

Connector Roles
 Classes of Services
 Communication
 Transmission of data
 Coordination
 Transfer of control
 Conversion
 Conversion of data formats
 Wrappers for legacy components
 Facilitation
 Load balancing
 Scheduling services
 Concurrency control
12
Software Architecture: Foundations, Theory, and Practice

Connector Types

 Procedure Call
 Event
 Data access
 Linkage
 Stream
 Arbitrator
 Adaptor
 Distributor

13
Software Architecture: Foundations, Theory, and Practice

Procedure Call Connectors


These are mainly coordination connectors

14

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
Software Architecture: Foundations, Theory, and Practice

Event Connectors
These are mainly coordination connectors

15

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
Software Architecture: Foundations, Theory, and Practice

Data Access Connectors


These mainly provide communication services

16

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
Software Architecture: Foundations, Theory, and Practice

Linkage Connectors
• Provide facilitation services.
• Used by higher order connectors to enforce
interconnection unit, relationship syntax, and
interaction semantics.

17

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
Software Architecture: Foundations, Theory, and Practice

Stream Connectors

 Stream connectors provide communication services.


 Used to transfer large amounts of data between
autonomous processes.

18
Software Architecture: Foundations, Theory, and Practice

Stream Connectors (contd.)

19

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
Software Architecture: Foundations, Theory, and Practice

Arbitrator Connectors

 Arbitrator connectors provide facilitation services and


coordination services.
 When components cannot make assumptions about their
state and needs, arbitrator;
 Streamline system operations and resolve any
conflicts. (Facilitation)
 Redirect the flow of control (Coordination)

20
Software Architecture: Foundations, Theory, and Practice

Arbitrator Connectors (contd.)

21

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
Software Architecture: Foundations, Theory, and Practice

Adaptor Connectors
• Facilitates interaction between components that have
not been designed to interoperate.
•Adaptors provide conversion services.

22

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
Software Architecture: Foundations, Theory, and Practice

Distributor Connectors

 Performs the identification of interaction paths and


subsequent routing of communication.
 Coordination of components along these paths.
 Distributor connectors provide facilitation services.

23
Software Architecture: Foundations, Theory, and Practice

Distributor Connectors (contd.)

24

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
Software Architecture: Foundations, Theory, and Practice

Example Connectors

25
Software Architecture: Foundations, Theory, and Practice

Data Distribution Connectors

26
Software Architecture: Foundations, Theory, and Practice

Event-Based Data Distribution


Connectors
 Composition of four connector types
 Event

 Data access

 Stream

 Distributor

 Send and receive data through asynchronous


notifications (events)
 E.g. Publish-subscribe type middleware

27
Software Architecture: Foundations, Theory, and Practice

Client-Server Based Distribution


Connectors
 Allow seamless distribution of data between distributed
systems using RPC
 Composition of four connector types
 Procedure call

 Data access

 Stream

 Distributor

 Invoke via a synchronous remote procedure call that


appears as if it were a local method call.
 E.g., HTTP/REST, Java RMI, CORBA, FTP, SOAP
28
Software Architecture: Foundations, Theory, and Practice

P2P Based Data Distribution


Connectors
 Composition of four connector types
 Arbitrator
 Data access
 Stream
 Distributor
 Rely on arbitration as a means of synchronization and
invocation.
 Use rendezvous as a mechanism to achieve concurrency
and scheduling.
 Transaction support often available and invocation can
be rolled back if necessary.
 E.g., BitTorrent 29

You might also like