YOUR FEEDBACK
Evripidis wrote: I downloaded and tried to run the SampleSolution through Visual Studio. Every ti...
Cloud Computing Conference
November 19-21 San Jose, CA
Register Today and SAVE !..

SYS-CON.TV

2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
TOP THREE LINKS YOU MUST CLICK ON


Building SOA with Tuscany SCA
A simple service-oriented infrastructure

Based solely on this information Tuscany SCA makes three things available automatically;

•  The Catalog JSONRPC service
•  The JSONRPC service description (SMD)
•  A generated JavaScript JSONRPC proxy for accessing this service

A browser-based application can access this service directly using either the generated JSONRPC proxy or whatever JSONRPC client the application developer is familiar with, for example, the store sample uses the following JavaScript to access the Catalog service:

catalog = (new JSONRpcClient("../Catalog")).Catalog;
catalog.get(catalog_getResponse);

Clearly this pattern can be extended to any service your Web 2.0 style application is required to communicate with. The full range of SCA features is then available to these services. For example, our Catalog service could easily be exposed as a Web service (binding.ws) by extending the SCA configuration description of the service.

...
<service name="Catalog">
    <t:binding.jsonrpc/>
    <binding.ws/>
</service>
...

Note that no changes to the Catalog component code are required. The Tuscany SCA runtime is doing all the hard work.

SCA has provided services to the Web 2.0 application with very little effort on behalf of the developer. What effort is expended is not particular to supporting Web 2.0 applications as the services are now part of the wider enterprise service orientation approach.

Tuscany SCA supports other modes of operation that will be of interest to Web 2.0 application developers. For example, the Tuscany Java SCA Chat sample [9] uses binding.dwr to implement a Direct Web Remoting [10] connection between a JavaScript browser-based application and an SCA service. Using this binding, service-to-browser communication is supported alongside browser to service communication (see Figure 3).

Data Integration
In a typical enterprise, business data comes from many different sources and is presented in many different formats. Tuscany SCA provides a databinding framework that seamlessly handles data format mapping and therefore frees the developers from such concerns.

Let's look at a simple scenario that deals with aggregation of XML data from different sources. This demo will be available in a future release of Tuscany. The business function here calculates the total value of all the accounts (checking, savings and stock) that a customer owns (see Figure 4).

In this scenario, data is received from various data sources and manipulated as XML. The following data exchanges are occurring.

  1. Use an RSS feed to retrieve currency exchange rates from the Web.
  2. Load the account data for a customer from an XML file or database.
  3. Invoke a live Web service to get quotes for a list of symbols.
  4. Calculate the total value by joining the XML data from 2 and 3.
The handling of different data formats in the enterprise can be complex. For example, business data may be represented in many different ways, even if they are for the same infoset. A Customer business object can be defined as JavaBean, SDO, JAXB, XMLBeans, or DOM. At the same time, protocol implementation stacks require different data representations. For example, in the Web service domain, Axis1 uses DOM, Axis2 uses AXIOM, and JAX-WS uses JAXB. Implementation technologies may also impose requirements on the data as well; for example, the Apache ODE BPEL engine consumes/produces data using DOM and the SAXON XQuery engine consumes/produces data using NodeInfo.

Application developers should have the freedom to choose their preferred data representation without being restricted by the above concerns and worrying about the mappings. Tuscany SCA automatically handles this for them. Tuscany provides the most popular databindings including SDO, JAXB, XMLBeans, AXIOM, JSON, DOM, SAX, and StAX. There are more than 50 transformers to convert data between the databindings. With the transformer graph, Tuscany SCA supports point-to-point transformations as well as multiple-hop transformations. This approach greatly reduces the number of transformers required and makes it possible to transform data without direct transformation logic.

In the sample, the exchange rate is retrieved (step 1) using the feed binding (binding.rss) as follows.

<reference name="exchangeRate">
   <tuscany:binding.rss
uri="http://ansuz.sooke.bc.ca/rippy/exchange/?M=R&B=USD&F=CAD,CNY,EUR&T=F&S=O&I=S" />
   </reference>

Step 3 uses the Web service binding (binding.ws) to retrieve stock from the Internet.

<reference name="StockQuoteReference" promote="AccountService/stockQuote">
    <binding.ws wsdlElement="http://swanandmokashi.com#wsdl.port(StockQuotes/StockQuotesSoap)" />
</reference>

The Java interface is interesting. The example uses StAX to streamline XML data exchange over Web services. The Tuscany SCA databinding framework allows component developers to choose their preferred XML Java databinding technology such as JAXB, SDO, DOM, or StAX no matter how the SOAP message is represented in the Web services stack (AXIOM is used by Axis2).

@Remotable
public interface StockQuote {
    public XMLStreamReader GetStockQuotes(XMLStreamReader input);
}

The various XML data are joined together using XQuery (implementation.xquery) in step 4. With the help of the databinding framework, XQuery mediates data from many services. The capability of XQuery can be extended by invoking other SCA components.

@Remotable
public interface StockValue {
    double calculate(XMLStreamReader quotes, XMLStreamReader accounts);
}


About Haleh Mahbod
Haleh Mahbod is a program director with IBM, managing the team contributing to the Apache Tuscany as well as SOA for PHP open source. She has extensive development experience with database technologies and integration servers.

About Raymond Feng
Raymond Feng is a senior software engineer with IBM. He is now working on the Service Component Architecture (SCA) runtime implementation in Apache Tuscany project as a committer. Raymond has been developing SOA for more than 4 years and he was a key developer and team lead for WebSphere Process Server products since 2002.

About Simon Laws
Simon Laws is a member of the IBM Open Source SOA project team working with the open source Apache and PHP communities to build Java, C++, and PHP implementations of the Service Component Architecture (SCA) and Service Data Object (SDO) specifications. Prior to this role he was working in the distributed computing space building service-oriented solutions for customers with a particular interest in grid computing and virtualization.

YOUR FEEDBACK
anonymous wrote: SCA sounds a lot like CORBA.. or is it just me seeing this?
anonymous wrote: SCA = CORBA CORBA = failure SCA = ??
LATEST PERL DEVELOPER STORIES
Virtualization carries the promises of flexibility, lower costs, ease of deployment and simplified server management. However, when condensing the physical resources of your enterprise, are you considering how to make applications easily accessible to the growing number of remote...
Writing shell scripts to automate the build and deploy process for ColdFusion applications is not very much fun. The Jakarta Ant project is an open-source, cross-platform alternative that makes it easy to automate the build and deploy process.
SYS-CON Events announced today that the leading global rich Internet technology provider Appcelerator named "Platinum Sponsor" of SYS-CON's upcoming AJAX World Conference & Expo 2008 West, which will take place October 20-22, 2008, at the Fairmont Hotel in the heart of Silicon Va...
Join Scott Guthrie as he discusses Microsoft’s commitment to web standards development, Rich Internet Applications and how Microsoft is contributing to help move the web forward. Join Adobe’s Kevin Lynch as he demonstrates how Flash and HTML come together to make the most eng...
Reminding people of how its backing was the making of Linux, IBM, to no one's surprise, has thrown its support behind cloud computing, that delicious nexus of every chi-chi buzzword technology currently in vogue: Web 2.0, rich Internet applications, software-as-a-service, SOA, gr...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING PERL DEVELOPER NEWS
Terralever, a leading full-service interactive marketing agency, today announced that Scott McAndrew...