Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
    targetNamespace="http://bigbank" name="BigBank">

    <component name="AccountService">
        <implementation.java class="bigbank.AccountServiceImpl" />
        <reference name="accountData" target="AccountData" />
        <reference name="stockValue" target="StockValue" />
        <reference name="exchangeRate" target="ExchangeRate"/>
        <property name="currency">EUR</property>
    </component>

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

    <component name="AccountData">
        <implementation.java class="bigbank.AccountDataImpl" />
    </component>

    <component name="StockValue">
        <tuscany:implementation.xquery location="stock.xq" />
    </component>

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

</composite>

...

Assembling and Deploying Tuscany Solutions - Simon

Distribution
Policy
Alternative impl Scripting BPEL

The service oriented approach to building applications promotes the benefits of deploying running solutions as a collection of loosely coupled services. Tuscany Java SCA provides a runtime that will host these loosely couple services in a single JVM or across multiple JVMs.

Tuscany Java SCA uses the term Node to describe a single Tuscany SCA runtime and the term Domain to describe a collection of nodes that together run related but distributed services in an SCA application

Image Removed

You will have see previously in this paper the use of specific binding configuration access remote services, for example,

Code Block

binding.ws with uri set

SCA promotes a clear distinction between the construction of business logic and the assembly and deployment of these component implementations into working applications.

Another feature of SCA that enables this separation is the support for policy and policy intents that allow organisation wide statements of intent to be made about the way that an application will behave.

For example, the helloworld-ws-service-secure sample 5 shows how the intention that clients accessing a service must be authorized to do so can be expressed.

Code Block

<component name="HelloWorldServiceComponent">
    <implementation.java class="helloworld.HelloWorldImpl" />
    <service name="HelloWorldService" requires="authentication">
        <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
        <binding.ws uri="http://localhost:8085/HelloWorldService"/>
    </service>
 </component>

Note that the <service> element carries an intent that interactions require "authentication". How authentication is actually implemented is then a matter of policy with the organization. Again this brings consistency of operation and understanding across and organization.

The service oriented approach to building applications promotes the benefits of deploying running solutions as a collection of loosely coupled services. Tuscany Java SCA provides a runtime that will host these loosely couple services in a single JVM or across multiple JVMs.

Tuscany Java SCA uses the term Node to describe a single Tuscany SCA runtime and the term Domain to describe a collection of nodes that together run related but distributed services in an SCA application

Image Added

SCA allows the location of target service to be described explicitly, for example, from the bigbank-account demo 6

Code Block

 <component name="AccountServiceComponent">
     <implementation.java class="bigbank.account.AccountServiceImpl"/>
     <reference name="stockQuoteService">
         <binding.ws uri="http://localhost:8081/services/StockQuoteWebService"/>
     </reference>
 ...

This is very useful for contacting external services but, if used for all reference and services, would mean that the SCA application requires changing as services are moved between nodes in a domain.

As a convenient alternative any service within the SCA Domain can be identified simply by name.

Code Block

 <component name="AccountServiceComponent">
     <implementation.java class="bigbank.account.AccountServiceImpl"/>
     <reference name="stockQuoteService" target="StockQuoteServiceComponent/StockQuoteService">
         <binding.ws/>
     </reference>
 ...

Tuscany SCA will use a default binding to communicate with the target service Tuscany SCA brings an easier to use mechanism for providing communication with remote services within a domain. As Tuscany SCA knows where all services are in the domain you can simply refer to the target service by names and Tuscany SCA will use a default SCA binding to communicate with it regardless of whether the service is local or remote to the calling component.

Code Block

target based reference

The benefit of this approach is that In this way the infrastruture can be adjusted and the components redeployed without having to change any .composite file information.

...