|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
TOP THREE LINKS YOU MUST CLICK ON Open Source Building SOA with Tuscany SCA
A simple service-oriented infrastructure
Nov. 9, 2007 08:30 AM
Based solely on this information Tuscany SCA makes three things available automatically;
• The Catalog JSONRPC 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; 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.
... 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 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.
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"> Step 3 uses the Web service binding (binding.ws) to retrieve stock from the Internet.
<reference name="StockQuoteReference" promote="AccountService/stockQuote"> 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 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 YOUR FEEDBACK
LATEST PERL DEVELOPER STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS BREAKING PERL DEVELOPER NEWS
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||