Building SOA with Tuscany SCA
A simple service-oriented infrastructure
Nov. 9, 2007 08:30 AM
This article will walk you through what is available in Apache Tuscany Incubator and therefore highlight the benefits of SCA.
Using Tuscany SCA
SCA provides a consistent model of distributed applications and of the components from which they are constructed. This model explicitly separates business logic (Component/Services/References) from the details of how a running application is assembled (Composite/Wire) and deployed. This promotes a common terminology and supports a common understanding of the capability of applications and the way those applications work together. This common model also provides the hooks for tooling, governance, monitoring, and management in the service-oriented world.
When it comes to building a solution for real, one of the most important questions is likely to be "how can existing IT infrastructure and skills be used?" Tuscany SCA does not invent new technologies for component implementations (Implementation) and message exchange (Binding). It neither requires you to learn a new programming language nor communications protocols. You are free to leverage your existing investment in applications, technology, and skills as long as suitable support exists in Tuscany SCA. This is not much of a hurdle; Tuscany SCA has a straightforward extensibility model so new or proprietary technologies can easily be included.
The following sections describe Tuscany SCA in the context of three familiar scenarios. It should be noted that Tuscany SCA is not restricted to these scenarios. The sample code and configuration used here can be found in the Tuscany SCA Java distribution  and is available under the Apache License .
• Business applications are tightly coupled with the IT infrastructure and early design decisions have to be made before real deployment.
SCA separates business services from the concerns related to specific hardware, software and network protocols by providing a unified programming model that allows the SCA runtime to handle these issues transparently. Let's look at a simple business scenario to see how Tuscany SCA can help enterprise application integration. The scenario here is the BigBank demo from the Tuscany SCA distribution . As illustrated in Figure 1, the application comprises a number of assembled components and ultimately returns a total account balance in response to account inquires.
The use of the SCA programming model allows the BigBank developer to decouple the process of designing and creating the scenario from infrastructure concerns. In the BigBank composite, basic units of business logic are modelled as SCA components called AccountComponent, StockQuoteComponent, etc. Their business logic is implemented using Java and various scripting languages. Components are assembled by wiring references to services. Once all business logic is implemented, appropriate bindings are applied to references and services to indicate how the components should communicate.
The XML-based SCA configuration language describes all of the information about loosely coupled enterprise services and the bindings to be used. Since binding information can be changed in the SCA configuration without changing the business logic, the implementation code is not polluted with protocol handling information and, furthermore, bindings can be changed during deployment without impacting the application.
The following SCA configuration shows the AccountService exposed using JSONRPC (binding.jsonrpc) and Web services (binding.ws). The service can easily be made accessible over RMI by simply adding binding.rmi.
The following SCA configuration shows bindings applied to component references. Again these bindings can be changed or augmented without changing the business logic.
Reader Feedback: Page 1 of 1
SOA World Latest Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week