The Tuscany Project in the Apache Incubator
and
The Service Component Architecture

Jeremy Boynes

Simon Nash

28 June 2006

Outline

Introduction to the Service Component Architecture Specification

The state of the Tuscany Project

Looking forward …

Service Component Architecture

A programming model for developing services using component assembly

Multiple languages, multiple container technologies, and multiple service access methods

Declarative policies for infrastructure services

security, transactions, reliable messaging

Business-level model for implementing services

service components with service interfaces

no technical APIs like JDBC, JCA, JMS, …

Binding model for multiple access methods

WSDL, SOAP over HTTP, messaging, RMI-IIOP, …

Java interfaces, WSDL portTypes, …

Flexible data binding for data exchanged between services

SDO (Service Data Objects), JAXB, …

Service Assembly Model

Model for assembling tightly coupled code (Composites)

Model for assembling loosely coupled services (Systems)

Composite

Composite

External Web Service

System

Composite

SCA Interaction Model

Synchronous & Asynchronous service relationships

Scoping and Lifecycle

Conversational services

Asynchronous support

“non-blocking” invocation

asynchronous client to synchronous service

callbacks

Example

sca file for bigbank.accountcomposite

<?xml version="1.0" encoding="ASCII"?>

<composite xmlns="http://www.osoa.org/xmlns/sca/0.9"

name="bigbank.accountcomposite" >

<service name="AccountService">

<interface.java interface="services.account.AccountService"/>

<binding.ws port="http://www.bigbank.com/AccountService#

wsdl.endpoint(AccountService/AccountServiceSOAP)"/>

<reference>AccountServiceComponent</reference>

</service>

<component name="AccountServiceComponent">

<implementation.java class="services.account.AccountServiceImpl"/>

<property name=“currency”>EURO</property>

<reference name="accountDataService" target="AccountDataServiceComponent"/>

<reference name="stockQuoteService" target="StockQuoteService"/>

</component>

<component name="AccountDataServiceComponent">

<implementation.java class="services.accountdata.AccountDataServiceImpl"/>

</component>

<reference name="StockQuoteService">

<interface.java interface="services.stockquote.StockQuoteService"/>

<binding.ws port="http://www.quickstockquote.com/StockQuoteService#

wsdl.endpoint(StockQuoteService/StockQuoteServiceSOAP)"/>

</reference>

</composite>

State of the Tuscany Project

M1 for Java in May 06

Based on the programming model from the 0.9 spec

Runtime integrated with Apache Tomcat

Support for Java and JavaScript components

Support for Axis2, Celtix and JSON-RPC bindings

Release Candidate now available for C++ runtime

Support C++ and WSDL interface types

Support for C++ components

Support for Axis2 bindings

Simple Component Implementation

@Service(HelloWorldService.class)

public class HelloWorldImpl implements HelloWorldService {

@Property

public String message;
private UserService userService;

@Reference
public void setUserService(UserService service) {

this.userService = service;

}

public String getGreetings(String id) {

String name = userService.getName(id);

return message + name;

}

}

Service Interface exposed by the component

Property used to configure the component

Reference to a service used by this component

Command Line Client

public static final void main(String[] args) {

// Create a Tuscany runtime for the sample module component

TuscanyRuntime tuscany = new TuscanyRuntime("HelloWorldModuleComponent",

"http://helloworld");

// Start the Tuscany runtime and associate it with this thread

tuscany.start();

// Get the SCA module context.

ModuleContext moduleContext = CurrentModuleContext.getContext();

// Locate the HelloWorld service

HelloWorldService helloworldService =

(HelloWorldService) moduleContext.locateService("HelloWorldComponent");

// Invoke the HelloWorld service

String value = helloworldService.getGreetings("World");

System.out.println(value);

// Disassociate the runtime from this thread

tuscany.stop();

// Shut down the runtime

tuscany.shutdown();

}

Locate the

running composite

Locate a
specific component

Looking Forward …

Series of spec revisions coming up

Spec APIs being developed in Tuscany

Proposals for new functionality

Prototype in project sandbox

Need to improve current codebase

M1 a little fragile, SPIs could use improvement

Support for SOA policies e.g. security

Support additional languages and protocols

Interop and integration between Java and C++ runtimes

Basically, we need more stuff

Really Looking Forward …

Tuscany is a framework for supporting SOA applications

Multi-language, multi-protocol, multi-platform

Allows developers to write applications their way

Naturally supports programming models most suited to the application

Provides the glue needed to connect the service components together

Mediations to fix impedance mismatch between services

Policies to support infrastructure requirements

Stuff just works together

And we’ve taken the arm-waving out of SOA

Get Involved

http://incubator.apache.org/projects/tuscany

mailto:tuscany-dev@ws.apache.org

Wide variety of implementations

Runtimes in both Java and C++

SCA component framework

Language and protocol integration plugins

SDO data binding technology

SOA Data Access Service

BOF at 8PM Thursday

PowerPoint Presentation

j j

2006-06-05T20:51:23

IBM