Sie sind auf Seite 1von 42

Lecture 15

COMSATS Islamabad

Enterprise
Systems

Development
(CSC447)

hammad Usman, Assistant Professor

Slide 1

Component and Connector ViewType

Slide 2

Overview
Defines models consisting of
elementshavingsomeruntimepresenceprocesses,objects,
clients,servers,datastores
Pathwaysofinteractioncommunicationlinks,protocols,
informationflows,accesstosharesstorage

Slide 3

Runtime entities and their interactions


May contain many instances of the same component type
Similar to object(collaboration) diagrams as against class
diagrams(which define types of elements)

Slide 4

Summary of C&C Viewtype


Elements

Component Types: principal processing


unit and datastores
Connector Types: interaction
mechanisms

Relations

Attachments:component ports are


associated with specific connector roles

Properties of
elements

Component: Name, type(general


functionality, number and type of ports)
Other properties(like performance..)
Connector: name, type(nature of
interaction, number and type of roles..),
other properties(protocol of interaction,
performance values..)

Topology

No Inherent constraints
Slide 5

C&C Viewtype Styles

Pipe-and-filter
Shared-data
Publish-subscribe
Client-server
Peer-to-peer
Communicating processes

Slide 6

Components

Slide 7

Component Interfaces

Slide 8

Connectors

Slide 9

Connector Roles

Slide 10

Connector Role Examples

Slide 11

Relations

Slide 12

What is C&C for?


To reason about runtime system quality attributes
performance, reliability, availability
What are the systems principal executing components
and how do they interact
What are the major shared data resources
Which parts of the system are replicated and how many
times
How does data progress through a system as it
executes
What protocols of interaction are used by
communicating entities
What parts of the system run in parallel
How can the systems structure change as it executes
Slide 13

What is C&C not for?


Can not represent design elements which do not have a runtime
presence
Example interface of an element - usability

Slide 14

C&C Viewtype Styles

Pipe-and-filter
Shared-data
Publish-subscribe
Client-server
Peer-to-peer
Communicating processes

Slide 15

From Clements etal

Slide 16

Pipes and Filters


A filter transforms data that it receives from one or
more pipes and transmits through one or more pipes
A pipe is a connector that conveys streams of data from
output port of one filter to input port of another
Pipes buffer data
The overall function is a composition of filter functions

Slide 17

What for ..
Very useful in data transformation
Signalprocessing
compilers
To reason about system performance, stream latency, pipe buffer
requirements, schedulability

Slide 18

Pipes and filters - summary


Elements

Component Types: filter ports must be input or


output
Connector Types: pipes have data-in and data-out
roles

Relations

Attachments: associates filter output ports to data-in


roles of a pipe and.. Out to in

Properties of elements

Component: Name, type(general functionality, number


and type of ports)
Other properties(like performance..)
Connector: name, type(nature of interaction, number
and type of roles..), other properties(protocol of
interaction, performance values..)

Topology

Might be restricted to acyclic graphs


Slide 19

Relationship with other styles


Different from data flow projections/views
In pipes-and-filters lines have specific meaning transmit streams
of data
In dataflow relationships implies data communication could be
implemented as a procedure call, publish-subscribe, via a pipe..

Slide 20

Shared data style


Useful in exchange of persistent data, which has multiple
accessors
How does the consumer know data is available?
Storeinformstheconsumerblackboard
Consumerisresponsible-repository

Slide 21

Shared data access -summary


Elements

Relations

Computational model

Properties of elements

Topology

Component types: data stores, data


accessors
Connectors: data reading and writing
Which accessor is connected to
which store
Communication between accessors
mediated by the store;
communication may be initiated by
either
Same as in C&C; types of data, data
performance, data distribution
Data accessors are attached to
connectors that are attached to
stores

Slide 22

What for..
Used when there are multiple accessors and persistence
Decouple producer from consumer
Data store performance, security, privacy, compatibility with other
stores

Slide 23

Similarity to others
Client-server style
Publish-subscribe is similar without persistence

Slide 24

Publish-subscribe styles
Components interact via announced events
Components subscribe to a set of events
P-S runtime ensures that each published event is delivered to all
subscribers
The connector is an event bus
Used in message production/consumption

Slide 25

P-S summary
Elements

Component types: any component


with a pub/sub interface
Connectors: publish-subscribe

Relations

Attachment associates components


with pub-sub connector

Computational model

A system of independent components


that announce events and react to
other announced events

Properties of elements

Same as in C&C;

Topology

All components are connected to an


event distributor

Slide 26

Where to use ..
To send events and messages to recipients
Set of recipients are unknown can be added dynamically

Slide 27

Slide 28

Slide 29

Client-Server
Components interact by requesting services of other components
Communication is initiated by a client

Slide 30

Client-Server summary

Elements

Relations

Component types: clients which ask


for services; servers which provide
services
Connectors: request-reply
Attach clients to servers

Computational model

Clients initiate activity and wait for


results

Properties

Same as in C&C; number and type of


clients, performance

Topology

Unrestricted; number of clients;


tiers

Slide 31

What for..
Assignment of functionality is clear
Can be independently assigned to tiers
Can be used to argue about performance
Example - WWW

Slide 32

Peer-to-peer
Components interact with each other exchanging services
No asymmetry as in client-server
Connectors are bidirectional

Slide 33

Allocation Viewtype

Slide 34

Allocation viewtype styles


Deployment style
Implementation style
Work assignment style

Slide 35

Summary of Allocation Viewtype


Elements

Software elements and environment


elements

Relations

Allocated-to. A software element is


allocated to an environmental element

Properties of
elements

A software element has required


properties. An environmental element
has provided properties that need to be
matched.

Topology

Varies by style
Slide 36

Deployment style
Elements of the C&C styles are allocated to execution platforms

Slide 37

Deployment style summary


Elements

Relations

Properties of elements

Properties of relations
Topology

Software element: usually a process


from the C$C view
Environmental Element: computing
hardware, processor, disk, ..
Allocated to: showing the physical
unit the element resides
Migrates-to, copy-migrates to: if
the allocation is dynamic
Required properties of software
elements
Provided properties of software
elements
Allocated to either static or
dynamic
unrestricted
Slide 38

From Clements etal

Slide 39

Common Architectural Styles (Adapted


from Shaw and Garlan)
Dataflow systems
Batchsequential
Processcontrol
Pipesandfilters
Call-and-return systems
Mainprogramandsubroutine
Object-orientedsystems
Hierarchicallayers

Slide 40

Common Architectural Styles (Contd)


Independent components
Communicatingprocesses
Eventsystems
Virtual machines
Interpreters
Rule-basedsystems
Repositories
Databases
Hypertextsystems
Blackboards

Slide 41

Reference
Bass, L., Clements, P. and Kazman, R., Software
Architecture in Practice, Second Edition (2006),
Addison-Wesley.
Clements, P., Bachmann, F., Bass, L., Garlan, D., Ivers,
j., Little, R., Nord, R. and Stafford, J., Documenting
Software Architectures: Views and Beyond, 2002,
Addison-Wesley. Documenting Software Architectures

42

Slide 42

Das könnte Ihnen auch gefallen