420 likes | 429 Views
This lecture provides an overview of the Component and Connector (C&C) viewtype in enterprise systems development. It covers models consisting of elements with runtime presence, pathways of interaction, runtime entities and their interactions, C&C viewtype styles, and the purpose and limitations of C&C viewtype.
E N D
Lecture 15 Enterprise Systems Development ( CSC447) COMSATS Islamabad Muhammad Usman, Assistant Professor
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
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)
C&C Viewtype Styles • Pipe-and-filter • Shared-data • Publish-subscribe • Client-server • Peer-to-peer • Communicating processes
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
What is C&C not for? • Can not represent design elements which do not have a runtime presence • Example – interface of an element - usability
C&C Viewtype Styles • Pipe-and-filter • Shared-data • Publish-subscribe • Client-server • Peer-to-peer • Communicating processes
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
What for .. • Very useful in data transformation • Signal processing • compilers • To reason about system performance, stream latency, pipe buffer requirements, schedulability
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..
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
What for.. • Used when there are multiple accessors and persistence • Decouple producer from consumer • Data store performance, security, privacy, compatibility with other stores…
Similarity to others • Client-server style • Publish-subscribe is similar without persistence
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
Where to use .. • To send events and messages to recipients • Set of recipients are unknown – can be added dynamically
Client-Server • Components interact by requesting services of other components • Communication is initiated by a client
What for.. • Assignment of functionality is clear • Can be independently assigned to tiers • Can be used to argue about performance • Example - WWW
Peer-to-peer • Components interact with each other exchanging services • No asymmetry as in client-server • Connectors are bidirectional
Allocation viewtype styles • Deployment style • Implementation style • Work assignment style
Deployment style • Elements of the C&C styles are allocated to execution platforms
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
Common Architectural Styles (Cont’d) • Independent components • Communicating processes • Event systems • Virtual machines • Interpreters • Rule-based systems • Repositories • Databases • Hypertext systems • Blackboards
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