Está en la página 1de 6

CONNECTORS

What is a Software Connector? Architectural element that models Interactions among components Rules that govern those interactions Simple interactions Procedure calls Shared variable access Complex & semantically rich interactions Client-server protocols Database access protocols Asynchronous event multicast Each connector provides Interaction duct(s) Transfer of control and/or data The connected ports must be compatible with each other: If two ports are connected, the required interface of one port must be compatible with the provided interface of the other port; that is, the operations required in one component required interface must be the same as the operations provided in the other components provided interface. The connector can be represented as an arrow (unidirectional) or a line (bidirectional) joining the connected ports. Software Connectors: An architect has a wide range of connector options that are applicable and often tailorable, to different development needs and scenarios. For example, an architect can choose to use: a connector that distributes a service request to specifically named recipient components or a connector that broadcasts a notification of a locally occurring event to any (unnamed and even unknown) interested component. The connector may require the sender component to suspend its processing until an acknowledgement of its request is received, or it may allow the sender component to continue its processing; the connector can route each request in the order it received it, or it can try to order, filter out, or combine requests according to some prespecified rule etc. Therefore, a very important dimension of a software architects job is to: Understand the component interaction needs. Carefully identify all of the relevant attributes of that interaction. Select the candidate connectors. Analyze the key properties of the resulting component-connector assemblies.

Software Connector Roles Locus of interaction among set of components Protocol specification (sometimes implicit) that defines its properties Types of interfaces it is able to mediate Assurances about interaction properties Rules about interaction ordering Interaction commitments (e.g., performance) Roles Communication Coordination Conversion Facilitation

Connectors as Communicators Main role associated with connectors Supports Different communication mechanisms o e.g. procedure call, RPC, shared data access, message passing Constraints on communication structure/direction o e.g. pipes Constraints on quality of service o e.g. persistence Separates communication from computation May influence non-functional system characteristics e.g. performance, scalability, security

Connectors as Coordinators Determine computation control Control delivery of data Separates control from computation Orthogonal to communication, conversion, and facilitation Elements of control are in communication, conversion and facilitation

Connectors as Converters Enable interaction of independently developed, mismatched components Mismatches based on interaction Type Number Frequency Order Examples of converters Adaptors Wrappers

Connectors as Facilitators Enable interaction of components intended to interoperate Mediate and streamline interaction Govern access to shared information Ensure proper performance profiles e.g., load balancing Provide synchronization mechanisms Critical sections Monitors

Connector Types: Connectors types are the level at which architects typically consider modeling interactions when modeling systems. Simple connectors can be modeled at the level of connector types; their details can often be left to low-level design and implementation. On the other hand more complex connectors often require that many of their details be decided at the architectural level so the impact of these decisions can be studied early. Connectors may be classified into different types based on the way in which they realize interaction services: Procedure call Data access Event Stream Linkage Distributor Arbitrator Adaptor

1. Procedure call connector: the most widely and best understood connectors; model the flow of control among components through various invocation techniques (coordination); perform transfer of data among interacting components through the use of parameters and return values (communication); serve as basis for composite connectors such as RPC (facilitation). Examples of procedure call connectors include object-oriented methods, fork and exec in Unix-like environments, callback invocation in event-based systems, and operating system calls.

2. Event connector: affect the flow of control among components (coordination); generate messages upon the occurrence of a single event or a specific pattern of events, whose contents can be structured to contain more information (communication). An Example is a windowing application, where GUI inputs serve as the events that activate the system. Finally, some events, such as interrupts, page faults, and traps, are triggered by hardware and then processed by software. These events may affect global system properties, making it important to capture them in software architectures. 3. Data access connector: allows components to access data maintained by a data store component (communication); may perform, if needed, translation of the information being accessed (conversion); the mechanism will vary according to whether the data access is transient or persistent Examples of persistent data access include query mechanisms, such as SQL for database access, and accessing information in repositories, such as the CORBA interface repository. An example of transient data access includes heap and stack memory access, and Information caching. 4. Linkage connector: used to tie the system components together and hold them in such a state during their operation; enable the establishment of ducts (the channels for communication and coordination) that are used by higher-order connectors to enforce interaction semantics; so they provide facilitation services. linkage connectors do not enhance the functionality of a system, but they are required to grow, monitor, and repair existing systems. Examples of linkage connectors are the links between components and buses in a C2 style Architecture and dependency relationships among software modules described by module interconnection languages. 5. Stream connector: used to perform transfer of large amounts of data between autonomous processes (communication); can be combined with other types, such as data access connector, to provide composite connectors for performing database and file storage access, and event connectors, to multiplex the delivery of a large number of events (facilitation). Examples: UNIX pipes, TCP/UDP communication sockets proprietary clientserver protocols.

6. Arbitrator connector: when components are aware of the presence of other components but cannot make assumptions about their needs and state, arbitrators streamline system operation and resolve any conflicts (facilitation), and redirect the flow of control (coordination). can provide facilities to negotiate service levels and mediate interactions requiring guarantee for reliability and atomicity; they also provide scheduling and load balancing. Example: multi-threaded systems that require shared memory access use synchronization and concurrency control to guarantee consistency and atomicity of operations. Arbitrators can provide facilities to negotiate service levels and mediate interactions requiring guarantees for isolation levels, reliability, and atomicity. 7. Adaptor connector: provide facilities to support interaction between components that have not been designed to interoperate; involve matching communication policies and interaction protocols among components (conversion). Examples of adaptors include virtual memory translation; Yellin and Strom's adaptors , which match incompatible interaction protocols; virtual function tables used for dynamic dispatch of polymorphic method calls and DeLine's packagers. XML metadata interchange (XMI) is a recent approach that supports interchange of models between applications and performs data presentation conversion. 8. Distributor connector: perform the identification of interaction paths and subsequent routing of communication and coordination among components along these paths (facilitation). They never exist by themselves, but provide assistance to other connectors, such as streams or procedure calls. Distributed systems exchange information using distributor connectors to direct the data flow. Distributed systems require identification of component Locations and paths to them based on symbolic names. Examples: Domain Name Service (DNS), routing, switching, and many other network services belong to this connector type.

Procedure call Event Data Access Linkage Stream Arbitrator Adaptor Distributor

Communication x x x x x

Coordination x x

Conversion

Facilitation x

x x x x x Fig: - Connector-Role Table x x x

También podría gustarte