Software Connectors Acknowledgement slides mostly from Software Architecture



























- Slides: 27
Software Connectors Acknowledgement: slides mostly from Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons
What is a Software Connector? l An architectural element that models u u l Interactions among components Rules that govern those interactions Interactions u Simple l l u Complex & semantically rich interactions l l Procedure calls Shared variable access Client-server protocols Database access protocols Asynchronous event multicast Connectors provide u u Interaction duct(s) Transfer of control and/or data 2
Where are Connectors in Software Systems? 3
Implemented vs. Conceptual Connectors in software system implementations u u Frequently no dedicated code Frequently no identity Typically do not correspond to compilation units Distributed implementation l l l Across multiple modules Across interaction mechanisms Connectors in software architectures u u First-class entities Have identity Describe all system interaction Entitled to their own specifications & abstractions 4
Why Treat Connectors Independently? l Connector Component u u Components provide application-specific functionality Connectors provide application-independent interaction mechanisms l Abstractions of interaction, parameterization l Specification of complex interactions u u u Binary vs. N-ary Asymmetric vs. Symmetric Interaction protocols 5
Treating Connectors Independently (cont’d) l l Localization of interaction definition Extra-component system (interaction) information Component independence Component interaction flexibility 6
Benefits of First-Class Connectors l l l Separate computation from interaction Minimize component interdependencies Support software evolution u l l At component-, connector-, & system-level Potential for supporting dynamism Facilitate heterogeneity Become points of distribution Aid system analysis & testing 7
An Example of Explicit Connectors 8
A Taxononomy of Connectors Protocol specification (sometimes implicit) defines component interaction properties u u l Types of interfaces it is able to mediate Assurances about interaction properties Rules about interaction ordering Interaction commitments (e. g. , performance) Connector Roles u u Communication Coordination Conversion Facilitation 9
Connectors as Communicators l l The main role associated with connectors Supports u Different communication mechanisms l u Constraints on communication structure/direction l u l e. g. pipes Constraints on quality of service l l e. g. procedure call, RPC, shared data access, message passing e. g. persistence Separates communication from computation May influence non-functional system characteristics u e. g. performance, scalability, security 10
Connectors as Coordinators l l Determine computation control flow Control delivery of data Separates control from computation Orthogonal to communication, conversion, and facilitation u Yet there are elements of control are in all these three 11
Connectors as Converters l l Enable interaction of independently developed, mismatched components Mismatches based on interaction u u l Type Number Frequency Order Examples of converters u Adaptors/wrappers 12
Connectors as Facilitators l Enable interaction of components intended to interoperate u l Mediate and streamline interaction Examples u u Govern access to shared information Ensure proper performance profiles l u e. g. , load balancing Provide synchronization mechanisms l l Critical sections Monitors 13
Connector Types l l l l Procedure call Data access Event Stream Linkage Distributor Arbitrator Adaptor 14
Procedure Call Connectors 15
Event Connectors 16
Data Access Connectors 17
Stream Connectors 19
Arbitrator Connectors 20
Adaptor Connectors 21
Distributor Connectors 22
Discussion l l Connectors allow modeling of arbitrarily complex interactions Connector flexibility aids system evolution u l Support for connector interchange is desired u u l l Aids system evolution May not affect system functionality Libraries of OTS connector implementations allow developers to focus on application-specific issues Possible difficulties u u l Component addition, removal, replacement, reconnection, migration Rigid connectors Connector “dispersion” in implementations Key issue u Performance vs. flexibility 23
Role and Challenge of Software Connectors How do we enable Attach adapter to A or B“essence” B’s components A and B to Separate interact? Introduce intermediate form from its packaging Publish. Provide abstraction B with Transform on the converter fly import/export of A’s form Maintain multiple Negotiate to find is the right of to AWhat form for Aanswer? and BMake B multilingual Changeversions A’s form B’scommon form 24
How Does One Select a Connector? l Determine a system’s interconnection and interaction needs u l Determine roles to be fulfilled by the system’s connectors u l Which of: Communication, coordination, conversion, facilitation For each connector u u u l Software interconnection models can help Determine its appropriate type(s) Determine its dimensions of interest Select appropriate values for each dimension For multi-type, i. e. , composite connectors u Determine the atomic connector compatibilities 25
Simple Example l System components will execute in two processes on the same host u u l l Mostly intra-process Occasionally inter-process The interaction among the components is synchronous The components are primarily computation-intensive u There are some data storage needs, but those are secondary 26
Simple Example (cont’d) Ø Ø Select procedure call connectors for intra-process interaction Combine procedure call connectors with distributor connectors for inter-process interaction Ø Ø RPC Select the values for the different connector dimensions Ø Ø What are the appropriate values? What values are imposed by your favorite programming language(s)? 27
Two Connector Types in Tandem Select the appropriate values for PC and RPC! 28