Chapter 6. SCA Concepts and Notation

The service-component architecture (SCA) provides a programming model for building applications and systems based on a Service Oriented Architecture (SOA). It provides a model both for the composition of services and for the creation of service components, including the reuse of existing application function within SCA compositions. The SCA specifications can be found on the OSOA Web site,1 and Marino and Rowley’s Understanding SCA (Service Component Architecture)2 provides an excellent overview.

The TIBCO ActiveMatrix™ suite of products is based heavily upon SCA concepts and uses the graphical notation for SCA as one of its design interfaces. Consequently, a basic understanding of SCA concepts and notation is essential to effectively work with TIBCO products. The purpose of this chapter is to provide that overview. However, the chapter is not intended to be comprehensive in this respect.

Despite its name, the service-component architecture does not define complete architectures in the sense that we have been discussing. It only provides the mechanisms for defining architecture patterns that are based on service-oriented architecture principles. For this reason, a variety of Unified Modeling Language (UML) notations will be used to provide a more comprehensive view of the architectures and reference architectures as they are discussed.

In this chapter we will examine four major SCA concepts: components, services, references, and composites. We will see how these elements can be wired together to form larger design components and, ultimately, complete solutions.

An Example Service Design

To illustrate the use of SCA concepts and notation we will use the simple architecture pattern shown in Figure 6-1. This pattern shows a service for managing an account balance that, internally, uses a second data management service to actually store and retrieve values. The account balance management is intended to support simple Internet banking.

Figure 6-1. Account Management Example

image

Looking at the pattern more closely, it involves three components and two service interfaces. The components are the ConsumerAccountApplication, the AccountBalanceManager, and the DataManager. The services are the BalanceManagementService and the DataManagementService.

The focus of the following discussion will be the AccountBalanceManager component, which implements the functionality of the BalanceManagementService. The AccountBalanceManager, in turn, uses the functionality of the DataManager through the facilities of the DataManagementService.

Components and Composites

The basic unit of functional implementation in SCA is the component. Figure 6-2 shows the AccountBalanceManager being implemented as an SCA component. This component is contained within an SCA composite, which is the basic unit of assembly (and deployment) in SCA. Note that while this example is technically correct, from a practical perspective it is not particularly useful since it has no interface for accessing the AccountBalanceManager functionality.

Figure 6-2. Components and Composites

image

A key aspect of SCA is that it allows designs to be assembled from components of various types. Consistent with this philosophy, TIBCO supports a wide variety of implementation types, including:

• TIBCO ActiveMatrix BusinessWorks™

• The Mediation implementation type in TIBCO ActiveMatrix™ Service Bus

Java

• C++

• Spring

• WebApp

• An SCA composite

In addition to these possibilities, TIBCO Business Studio™ allows components to be created without specifying the implementation type to allow flexibility during the formative stages of designs. Designers can thus sketch an initial design structure and postpone the decision about the actual technology that will be used to implement the functionality.

Services

In order to make the functionality of the AccountBalanceManager component accessible, we need to add a service to the component (Figure 6-3). In ActiveMatrix Service Bus, a service is an interface (portType) defined in a WSDL file. Placing the service icon on the boundary of the component associates the service with the component.

Figure 6-3. Component with Service

image

Component services are only accessible to other components within the composite. In order to make the service available outside the composite you need to add a service to the composite and then wire it to the component service (Figure 6-4). A composite service is said to be promoted, meaning that it is visible outside the composite, as opposed to the component service that is only visible within the composite. Note that in order to wire the composite service to the component service in ActiveMatrix, both services must be associated with the same WSDL portType.

Figure 6-4. Composite with Promoted Service

image

When a composite with a promoted service is deployed in ActiveMatrix Service Bus, the service becomes bound to an endpoint. This makes it available as a web service and thus accessible to the ConsumerAccountApplication or any other external service consumer.

References

In our example, the AccountBalanceManager makes use of some functionality provided by the DataManager through the Data-ManagementService. In SCA when a component makes reference to a service, you add an icon indicating the reference to the component (Figure 6-5). In ActiveMatrix Service Bus this reference is associated with the WSDL portType that defines the service interface.

Figure 6-5. Component with Reference

image

The icon indicates that a reference is being made but does not indicate where the service itself is located. In ActiveMatrix Service Bus it is an error to have a component reference without wiring it to something—hence the error indication in the figure. One way of resolving the reference is to promote the reference as in Figure 6-6. With this approach, when the composite is either deployed or incorporated into a larger composite, the promoted reference is wired.

Figure 6-6. Promoted Reference

image

Component Type

The services and references associated with a component, together with the component’s parameters, define the component type. The component type fully defines the component from an external perspective, including the means by which other components can interact with it (the services and references) and the means by which it can be configured (the parameters). Any implementation that conforms to this type specification is an acceptable implementation.

Implementation Type

An implementation type defines the type of technology used to implement a component. SCA allows you to choose from a wide range of implementation types. The implementation types supported in TIBCO ActiveMatrix Service Grid and Service Bus are described in Chapter 9. Be careful not to confuse the component type with the implementation type—they are two different concepts!

Complex Composites

The alternative to using a promoted reference is putting the referenced service and the component providing it into the same composite as the reference and wiring the two together (Figure 6-7).

Figure 6-7. Composite Containing a Referenced Service

image

Composites can also be used as components in other composites. Figure 6-8 shows the full example as a single composite comprised of two other composites: one containing the ConsumerAccountApplication and the other containing the BalanceManager and DataManager.

Figure 6-8. Composite of Composites

image

Summary

The service-component architecture standards establish, among other things, a graphical notation for describing architecture patterns. TIBCO Business Studio, provided as part of the TIBCO ActiveMatrix Service Bus, uses this graphical notation as one of its design interfaces.

SCA defines a design in terms of components, services, references, and composites. Components comprise the functional elements of a design and may be of different types. Services are interfaces exposed by components, and components access external services via references. Each service and reference is characterized by a WSDL portType that defines the service interface. A component’s services and references, along with its parameters, define its component type. The implementation type of a component indicates the type of technology chosen to implement the component.

SCA assembles components, services, and references into composites. Within a composite, services and references may be wired together. Services and references may also be promoted to the composite, making them accessible from outside the composite. Composites themselves may be used as components in forming other composites.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.195.111