|
|
YOUR FEEDBACK
SYS-CON.TV |
TOP LINKS YOU MUST CLICK ON Open Source
Building SOA with Tuscany SCA
A simple service-oriented infrastructure
Nov. 9, 2007 08:30 AM
Digg This!
Page 2 of 4
« previous page
next page »
This very simple mechanism of applying bindings to the services and references defined by a component is at the root of SCA's ability to separate business logic from deployment concerns. It works regardless of whether the component implementation is brand new or wraps some existing business logic. It is also the mechanism by which SCA components communicate with services outside of SCA. Bindings can be defined such that existing applications can access SCA services or can be referenced by SCA components. This flexibility allows the SCA approach to be introduced incrementally within an organization. SCA simplifies business logic development with dependency injection by providing an Inversion of Control (IoC) container. As you can see from the Java code snippet below, the component simply declares references and properties using Java annotations. The account service talks to account data service, stock quote service, and calculator service by making direct calls on the interfaces. The code here deals with business logic only and no traditional technology API calls are required. Tuscany handles how the services are located, who provides the services, and how messages are delivered based on information in the SCA configuration.
@Service(AccountService.class) SCA also provides a mechanism to separate organizational infrastructure concerns from business logic through policy statements that enable agreed constraints to be applied at deployment time. This could range from dictating which communications should be encrypted to describing which level of monitoring and logging is required. For example, the helloworld-ws-service-secure sample [6] shows how to express the intention that clients accessing a service must be authenticated before doing so.
<component name="HelloWorldServiceComponent"> Note that the <service> element carries a policy intent that interactions require "authentication." How authentication is actually implemented is then a matter of policy within the organization. We have demonstrated how the flexibility of the SCA programming model helps address enterprise challenges. Another area to point out is the ability to use any implementation language and therefore leverage existing skills and investments. Tuscany SCA provides support for a selection of languages for building business logic, for example, XQuery, BPEL, script. The BigBank demo implements the various operations of the calculator using scripting languages. Tuscany SCA's implementation.script currently supports JavaScript, Groovy, Ruby, and Python. In the SCA configuration example below, implementation.script indicates that the business logic of the AccountServiceComponent is written in JavaScript. <component name="AddServiceComponent"> <tuscany:implementation.script script="calculator/AddServiceImpl.js"/> </component> Tuscany SCA also supports Spring and OSGi implementation types. New or existing Spring applications or OSGi bundles can be used to provide the implementation for SCA components. These components can be easily composed with other service components and deployed consistently in a distributed network of Tuscany SCA runtimes with the full range of communication methods made available to them.
Enabling Web 2.0 Tuscany demonstrates how a Web 2.0 application, and the services it relies on, can be constructed using an Internet shopping example called "Store" [7]. There is a guide that walks through the steps required to build this sample [8]. From Figure 2 you can see a Catalog component providing a service to the Web 2.0 application over JSONRPC. The Catalog component provides information about the products the store has for sale and has been constructed without regard for how it might be accessed. Using Tuscany SCA the Catalog component's Java implementation is associated with the JSONRPC binding (binding.jsonrpc).
<component name="Catalog"> Page 2 of 4 « previous page next page »
LATEST ECLIPSE 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 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||