We Have Numbers Of Free Samples


For Each Subject To Make A Difference In Your Grade

 
 
 
 

Complex Ports and Roles Within Software Architecture



Total Views 707

Abstract

The Software Architecture community has developed a common vocabulary for describing software components and their interconnections. However, the structure of ports and roles have been too simplistic for capturing even simple examples. This paper explores the part that composition, inheritance, and interfaces playing denning ports and roles. We discuss these concepts within the context of the JavaBeans component model and show how to capture the complexity inherent in the interfaces of components and connectors.

Introduction

As the size of software applications increases, it becomes infeasible to implement software systems from scratch. Software developers are responding to this growing complexity by constructing software systems based on software components. However, it is still an elusive goal to construct applications entirely from pre-existing, independently developed software components. There are many obstacles tore using software components. First, one must locate a component with the exact functionality needed; then, once a component is found that (perhaps only closely) matches the desired need, the software developer must overcome incompatibilities between interfaces, implicit assumptions, and any hidden dependencies that components may have. The multivalent, such as the sample Bean Development Kit (BDK). BDK allows application builders to instantiate a collection of Beans that com- medicate with each other using events. The JavaBeans event model allows components to propagate state change motivations to one or more registered listeners. Each Bean contains a set of state properties (i.e., named attributes)that can be customized by application builders. For example, one can change the font, background colour, or dimensions of a Bean. A Bean also has public methods that other Beans can invoke.

JavaBeans is designed for simplicity { in theory every Java Class is already a Bean; there is no need to subclass from a special Bean class. A Bean is dined by its prop-retires, events, and methods. Properties sim-ply react an implicit naming scheme of pub-lice methods; for example, if a Bean has pub-lice methods void set Height (in the) and intent Height(), one can infer that the Bean has a property Height. Similarly, if a Bean implements a Java interface Control Listener and has a method void handle Control Event(Control Event e) then Control Event is an event that the Bean is prepared to handle There are many drawbacks of such an implicit approach to component construction. First, because there is no explicit speciation of the interactions between the component and its environment, Connectors, Ports, and Roles are implicit in JavaBeans. An architectural de-script ion of the component will simply be documentation of a very abstract nature. Also, interoperability between components from different component models is hindered if each fool-lows their own implicit scheme. A guiding principle of Software Engineering that we follow in this paper is to explicitly dene all implicit de-tendencies and dentition. To overcome this implicit approach, we concretely dene the various Port and Role types that are possible in Java Beans. In this way, we provide a means fora Bean developer to accurately document the interface of the Bean, thus allowing an application builder to fully understand how to reuse this Bean within a software application.

Software Architecture

At the architectural level, the first step is to characterize the style selected for the software application. The results of this paper are focused on JavaBeans, but they can be equally applied to any other component model. The seven basic entities common to ADLs [6] are: components, connectors, ports, roles, configurations, representations, and representation maps. Typically, representations have been responsible for describing the hierarchy found in software systems .However, these have only been applied to components and connectors; in this paper, we argue that hierarchy is essential to capture the complexity of ports and roles.Architectural descriptions use the terminology of components, ports, connectors and roles to describe a system. Ports dene the points of interaction of a component with its environment. Similarly, a role denes the interaction between a connector and a component. The design of a system is an arrangement of components where the connectors represent their interactions. A connector is composed of roles that are connected to specie ports. A connector can be as simple as a function call, but it can also be a complex protocol or an application in itself (e.g. distributed systems using CORBA). Within a style, ports and their corresponding roles have die rent properties. Components with complex interfaces are overloaded with many die rent ports. Ports should have an interface to allow interrelated functionalities to be grouped into one port. Interfaced-ports increase the level of abstraction of the interaction between components.

The roles are used to specify which interfaces of the port are being used. There are many ways to partition methods into die rent ports. If we allow a port to be composed of other ports, we can build a hierarchy of component interaction points.

2.1 JavaBeans Connections

In JavaBeans, a Bean is characterized by its properties, methods and by the type of events it can be fire. The JavaBeans model provides two ways for components to communicate with each other. The first type is direct method invocation, whereby a component directly invokes a method on another component. This corresponds to a simple connector with roles such as for caller, called. Connectors of this type can only be connected to ports that match the public interface of the Bean. There is no code requires for such connectors, but by requiring a Bean to access directly another Bean, this type of communication increases the coupling between the different components. The second type uses events for the interactions. A Bean registers itself as a listener for aseptic event produced by another Bean. The listener Bean only needs to understand how the event is constructed, and it can listener to any Bean that produces the same type of event. We refer to these connectors as event transporters with roles such as for consume event, deliver event. The underlying implementation for this connection is a simple method invocation to a predefined method special by an interface, such as handle Event (Eventer). Again no code is required for the connector; the Bean provides the necessary connection code as dined by the JavaBeans specialization. Methods such as Add Event Listener and Remove Event Listener serve this purpose. Beans can only listen to events that they have been created to handle. To overcome this limitation, the Bean Development Kit (BDK) dynamically generates new Java classes that transform events received from one Bean into method calls (most likely) on another Bean. The connector that is generated knows how to handle a particular event from a source Bean and can directly invoke any public method from the target Bean. This enables Beans to react to a wider set of events.3 Ports and Roles Ports and roles dene the interaction between components and connectors. We now completely classify the interactions of a Bean with its environment into two different types of ports, Incoming Method and Outgoing Method. These two types constitute the foundation of the hierarchy of all the ports used to describe the JavaBeans architectural style. The Incoming Method type denies the public interface of the Bean. All public methods of the Bean are indented by ports that inherit from this port type. This type is then furthered using the naming convention denied by the JavaBeans model specialization to create a hierarchy of all the services requested by another Bean. The Outgoing Method type identities method calls that are initiated by the Bean itself. Interactions of this kind can occur spontaneously (if a Bean has its own thread of control) or by the direct result of an Incoming Method invocation. This second type captures the dependencies between different components and helps to trace outgoing method invocations. These ports are not part of the Bean’s public interface, and capture the external dependencies that the Bean has on its environment. Events in JavaBeans are announced using a Fire Event port type that inherits from Outgoing Method.

3.1 Type Hierarchy

We now fully describe the JavaBeans core specialization by creating a hierarchy of port and role types. The ACME [1] specialization for these hierarchies are contained in Appendix A.

3.1.1 The Incoming Method Hierarchy

The first type hierarchy is based on the Incoming Method port type. This type is refined to capture the different types of method dined in the JavaBeans specialization. The port type associated with a method define the interaction with the Bean. Wrest differentiate between method invocations that result in an outgoing method invocation and those that don’t. Ports that correspond to methods that do not generate outgoing method invocation are of the primary type Incoming Method. This type is rented to capture the septicity of the simple set and get methods, respectively Property Setter and Property Getter that are subtypes of the Incoming Method type. The port type Receive Event that corresponds to the Handle Event type of methods is a sub type of Incoming Method that recognizes this method as an event handler. The Action Method port type is for methods that result in one or more outgoing method in-

3.1.2 The Outgoing Method Hierarchy

A Bean can also invoke methods from other components. The port types that capture this interaction are based on the Outgoing Method port type are shown in Figure 3. This first specialization is for the case where a Benares an event. Even though the fire Event method of a bean is typically a private method, we need to specify a port for the interaction between the Bean and the other components. To differentiate between different event types that are red, we can further specialize the Fire Event port type. The only event defined by the JavaBeans model is the Property Change Event, corresponding to the Fire Property Change Event port type.

4.1 Behavioral

The specification of the Table Bean interface in Figure 8 shows how the various ports are combined based upon their type; for example, all the get Property() methods are now part of the port TBSetter. The Table Bean component type is defined to contain an instance of each of these port types. This partitioning provides a simple two-level structure for the methods of

3 Ports and Roles

Ports and roles define the interaction between components and connectors. We now completely classify the interactions of a Bean with its environment into two different types of ports, IncomingMethod and OutgoingMethod. These two types constitute the foundation of the hierarchy of all the ports used to describe the JavaBeans architectural style.

3.3 Composition

To simplify the design, we need to be able to group different ports or interfaced-ports into one entity. For example, a behavioral approach would group together all the ports that inherit from Property Setter (i.e. Property Setter, Bound Property Setter and Veto able Property Setter).

An informational approach allows designers to partition the ports based on their relationships. Some attributes of an object can be interrelated; for example, a Bean may have a Width and Height property, as well as a combined Dimension property. To capture this type of nested inter dependencies we use a port Dimension that is composed of two sub-ports, one for Height and one for Width. The Dimension port is then composed of 4 ports corresponding to get-dimension, set-dimension and two other ports for Width and Height.

Composing ports makes it possible to have different level of depth at the design level. The designer groups the methods and their associated ports into logical and inter-dependent entities. The same composition rule can be applied to the roles of the connector. Without modifying the complexity of the specialization of the design, composition of ports associated to interfaced-ports introduce a hierarchy in the architectural design. In the same way we can look into the design of one component or connector by zooming” into the connection at the design level. Figure 6 presents a visual metaphor (based on fractals) for the hierarchy of ports. Connector B” simply attaches to the Dimension port while connector A” attaches to specie elements of the port, including the sub-port Height and the individual method get Dimension ().

5 Conclusion

This work is a preliminary investigation on capturing the complexity inherent in the interface of software components. We evaluated a simple application composed of nine Java Beans and, in doing so, revealed unexpected complexity in specifying the interconnections between the components. The goal of our efforts was to thoroughly specify the application using ACME, and our failures at doing forced us to question the simple notion of ports and roles.

We defined three possible views {informational, behavioural, functional {of a compo-net’s interface and fully special the interfaces of the individual components. Our initial endings support the idea that composition and inheritance should be more widely used in defining ports and roles. The essential understanding, we reached is that the interface of apart clearly define how the role for a connector should be attached. More work now needs to be performed on how useful these compel descriptions are when constructing applications from software components.

Our ultimate research goal is to develop techniques for adapting software components. This paper outlines a necessary’s step {the detailed specification of a complex component’s interface. Next we will define techniques to help application builders adapt a component by modifying the specification and providing new code to extend the component.  It is our expectation that sophisticated specifications will be necessary before sophisticated components can be reused and adapted.

References

1.  John E. Arnold and Steven S. Popovich. Integrating, Customizing and Extending Environments with a Message-Based Architecture. Technical Report CUCS-008-95, Columbia University, Department of Computer Science, September 1994.

2. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Software. Addison-Wesley, Reading, MA, 1995.

3. David Garlan and Mary Shaw. An Introduction to Software Architecture, volume I of Advances in Software Engineering and Knowledge Engineering. World Scientific Publishing Company, New Jersey, 1993.

4. George T. Heineman. A Model for Designing Adaptable Software Components. In Twenty-Second Annual International Computer Software and Applications Conference, Vienna, Austria, August 1998. To appear.

5. Sun Microsystems, Inc. JavaBeans 1.0 API Specification. Internet site (http://www.javasoft.com/beans), December 4, 1996.

6. Nenad Medvidovic and Richard N. Taylor. A Framework for Classifying and Comparing Architectural Description Languages. In Proceedings of the 6th European Software Engineering Conference ESEC ’97, 1997.

[Download not found]


Download

505

Size

140.91 KB

File Type

[contact-form-7 404 "Not Found"]

Subject Categories



Get Guaranteed Higher Grades
Book Your Order