enterprise service assembly with sca using apache tuscany

Post on 30-Nov-2014

3.018 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

This is the presentation we gave at JavaOne 2009.

TRANSCRIPT

Enterprise Service Assembly with Apache Tuscany SCARaymond Feng, Luciano Resende, Simon Laws IBMPMC members of Apache Tuscany Project

2

Agenda

> Apache Tuscany> SCA Benefits> SCA Tours - Online Travel Sample Scenario

Demo Features

Building components with Java, Spring, JEE Wiring components with Web services, JMS, HTTP Web2.0 in the service assembly Your app goes mobile with Android Deploying applications standalone, in OSGi, in JEE

Apache Tuscany

> Apache Tuscany provides a component based programming model which simplifies development, assembly and deployment and management of composite applications in SOA.

> Apache Tuscany implements SCA standards defined by the OASIS OpenCSA and also provides extensions based on real user feedback.

3

What’s new with Apache Tuscany

> 1.x Code Stream OSOA Based SCA Specification Stable code base SCA Java 1.5 Released 05/31/2009

> 2.x Code Stream OASIS OpenCSA Specification OSGi enabled runtime SCA Java 2.0 M2 Released on 04/15/2009

M3 Released being prepared

4

The power of Tuscany/SCA

> Quick prototype for PoC to convince your boss in hours Mock up new functions (POJOs)

> Reuse existing assets (Java classes, BPEL, Spring, JEE, OSGi)

> Talk to external services transparently (WS, RMI, CORBA, EJB, JMS, …)

> Expose services to other clients transparently (WS, JSONRPC, FEED, RMI, CORBA …)

> Built-in interaction patterns: Req/Res, Oneway, Callback

> Run and debug directly within the IDE

5

6

SCA Tours Online Travel Sample Scenario

http://svn.apache.org/repos/asf/tuscany/sandbox/travelsample

SCA Tours - Travel Booking (Page #1)

TuscanySCAToursUI

TravelCatalog

TripBooking

HotelPartner

FlightPartner

CarPartner

CurrencyConverter

TripPartner

Java

Java

Java

Java

W idget

fullapp-ui (8080) fullapp-frontend (8084) fullapp-packagedtrip (8085)

fullapp-bespoketrip (8086)

fullapp-currency (8083)

EJB

Java

Java

> ls - ls a

SCATours

Java

1 2 34 5 67 8 9

7

SCA Tours - Travel Booking (Page #2)

ShoppingCart Paym entP rocessCreditCard

Em ailGateway

Spring

Script

Java

credicard (8082)fullapp-shoppingcart (8087)

CreditCardUI

Servlet

Java

CartS tore

Java

paym ent (8081)

> ls - ls a

paym entweb

8

9

SCA Tours Online Travel Sample Scenario

DEMO

http://svn.apache.org/repos/asf/tuscany/sandbox/travelsample

Web 2.0 Client Application

10

Embedded TomcatEmbedded Tomcat

implementation.widgetImplementation.java

SCA Tours

Implementation.java

TravelCatalog

Implementation.java

TripBooking

Implementation.java

ShoppingCart

SCA Composite for Tuscany Widget

11

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://scatours" xmlns:scatours="http://scatours" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" xmlns:pp="http://www.example.org/PaymentProcess" name="ui"> <component name="scatours"> <tuscany:implementation.widget location="scatours.html"/> <service name="Widget"> <tuscany:binding.http uri="/scatours"/> </service> <reference name="scaToursCatalog" target="SCAToursComponent/SCAToursSearch"> <tuscany:binding.jsonrpc/> </reference> <reference name="scaToursBooking" target="SCAToursComponent/SCAToursBooking"> <tuscany:binding.jsonrpc/> </reference> <reference name="scaToursCart" target="SCAToursComponent/SCAToursCart"> <tuscany:binding.jsonrpc/> </reference> </component> </composite>

Mobile Client Application with Android

12

Implementation.java

SCA Tours

Implementation.java

TravelCatalog

Implementation.java

TripBooking

Implementation.java

ShoppingCart

13

Credit Card Payment Scenario

CurrencyConverter

Credit CardPayment

binding.rmibinding.ws

implementation.osgi implementation.osgi

creditcard.jsp

implementation.web

TomcatTomcat

EquinoxEquinoxWeb ServiceClient EquinoxEquinox

RFC 119: Distributed OSGi

14

SCA composite for the Web component<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" targetNamespace="http://creditcard" name="CreditCardPaymentWeb"> <component name="CreditCardPaymentWeb"> <implementation.web web-uri="" /> <reference name="service"> <interface.java

interface="scatours.payment.creditcard.CreditCardPayment"/> <binding.ws uri="http://localhost:8082/CreditCardPayment" /> </reference> </component></composite>

> JSP<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca"%>

<sca:reference name="service"type="scatours.payment.creditcard.CreditCardPayment" />

15

Distributed OSGi with Tuscany/SCA

RMIRMI

CreditCard

PaymentWeb

ServiceWeb

Service

SCA proxiesSCA proxies

Local ServiceLocal Service

Local OSGi ServiceImplementation

OSGi Service Registry

Currency

Converter

SCA Service

SCA References

16

OSGi services in the SCA domain

CurrencyConverter

Credit CardPayment

binding.rmi

binding.ws

Currency Converter Bundle

Currency

Converter

Credit Card PaymentBundle

CreditCard

Payment

SCA DomainNode #1 Node #2

implementation.osgi implementation.osgi

17

SCA composite for the OSGi bundle<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://creditcard" name="CreditCardPaymentComposite">

<component name="CreditCardPaymentComponent"> <tuscany:implementation.osgi

bundleSymbolicName="scatours.creditcard.payment" bundleVersion="1.0.0" /> <service name="CreditCardPayment"> <binding.ws uri="http://localhost:8082/CreditCardPayment"/> </service> <reference name="currencyConverter"> <tuscany:binding.rmi uri="rmi://localhost:8085/CurrencyConverter"/> </reference> </component>

</composite>

18

Raymond Feng (rfeng@apche.org)Luciano Resende (lresende@apache.org)

http://tuscany.apache.org

top related