Post on 07-Dec-2015
Slide 1
Lecture 15
Enterprise
Systems
Development( CSC447)
COMSATS Islamabad
Muhammad Usman, Assistant Professor
Slide 3
Overview
• Defines models consisting of
– elements having some runtime presence – processes, objects, clients, servers, data stores
– Pathways of interaction – communication links, protocols, information flows, access to shares storage
Slide 4
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 5
Summary of C&C ViewtypeElements 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 6
C&C Viewtype Styles
• Pipe-and-filter
• Shared-data
• Publish-subscribe
• Client-server
• Peer-to-peer
• Communicating processes
Slide 13
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 system’s structure change as it executes
Slide 14
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 15
C&C Viewtype Styles
• Pipe-and-filter
• Shared-data
• Publish-subscribe
• Client-server
• Peer-to-peer
• Communicating processes
Slide 17
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 18
What for ..
• Very useful in data transformation
– Signal processing
– compilers
• To reason about system performance, stream latency, pipe buffer requirements, schedulability
Slide 19
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 20
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 21
Shared data style
• Useful in exchange of persistent data, which has multiple accessors
• How does the consumer know data is available?
– Store informs the consumer – blackboard
– Consumer is responsible - repository
Slide 22
Shared data access -summary
Elements Component types: data stores, data accessors
Connectors: data reading and writing
Relations Which accessor is connected to which store
Computational model Communication between accessors mediated by the store; communication may be initiated by either
Properties Same as in C&C; types of data, data performance, data distribution
Topology Data accessors are attached to connectors that are attached to stores
Elements Component types: data stores, data accessors
Connectors: data reading and writing
Relations Which accessor is connected to which store
Computational model Communication between accessors mediated by the store; communication may be initiated by either
Properties of elements Same as in C&C; types of data, data performance, data distribution
Topology Data accessors are attached to connectors that are attached to stores
Slide 23
What for..
• Used when there are multiple accessors and persistence
• Decouple producer from consumer
• Data store performance, security, privacy, compatibility with other stores…
Slide 24
Similarity to others
• Client-server style
• Publish-subscribe is similar without persistence
Slide 25
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 26
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 27
Where to use ..
• To send events and messages to recipients
• Set of recipients are unknown – can be added dynamically
Slide 30
Client-Server
• Components interact by requesting services of other components
• Communication is initiated by a client
Slide 31
Client-Server summary
Elements Component types: clients – which ask for services; servers –which provide services
Connectors: request-reply
Relations 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 32
What for..
• Assignment of functionality is clear
• Can be independently assigned to tiers
• Can be used to argue about performance
• Example - WWW
Slide 33
Peer-to-peer
• Components interact with each other exchanging services
• No asymmetry as in client-server
• Connectors are bidirectional
Slide 35
Allocation viewtype styles
• Deployment style
• Implementation style
• Work assignment style
Slide 36
Summary of Allocation ViewtypeElements 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 38
Deployment style summary
Elements Software element: usually a process from the C$C view
Environmental Element: computing hardware, processor, disk, ..
Relations Allocated to: showing the physical unit the element resides
Migrates-to, copy-migrates to: if the allocation is dynamic
Properties of elements Required properties of software elements
Provided properties of software elements
Properties of relations Allocated to – either static or dynamic
Topology unrestricted
Slide 40
Common Architectural Styles (Adapted from Shaw and Garlan)
• Dataflow systems
– Batch sequential
– Process control
– Pipes and filters
• Call-and-return systems
– Main program and subroutine
– Object-oriented systems
– Hierarchical layers
Slide 41
Common Architectural Styles (Cont’d)• Independent components
– Communicating processes
– Event systems
• Virtual machines
– Interpreters
– Rule-based systems
• Repositories
– Databases
– Hypertext systems
– Blackboards
Slide 4242
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