Upload
thea
View
47
Download
0
Embed Size (px)
DESCRIPTION
Building SOA With Apache Tuscany http://incubator.apache.org/tuscany/. JavaZone ‘07 - September 2007 Simon Laws (Apache Tuscany Committer) [email protected] [email protected] [email protected]. What We Are Going To Cover. The problem we are trying to solve - PowerPoint PPT Presentation
Citation preview
IBM Software Group
Building SOA With Apache Tuscanyhttp://incubator.apache.org/tuscany/
JavaZone ‘07 - September 2007
Simon Laws (Apache Tuscany Committer)
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
What We Are Going To Cover
The problem we are trying to solve
Building SCA applications
What’s inside the Apache Tuscany box?
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
What’s The Problem
Traditional Business* : tightly integrated
Today’s World-Class Business*:
Loosely coupled services
*Sources: CBDi
Economics: globalization demands greater flexibility
Business Agility: daily changes vs. yearly changes. Need to efficiently react to change.
Reusable assets can cut costs down
Need to embrace latest technologies where possible
Competitive pressure
Cost of maintenance, ease of development and management
Flexible business requires flexible IT
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Apache Tuscany and the Service Component Architecture
Apache Tuscany provides a simpler experience for developers who want to create applications using a service-oriented approach to address the issues of
Flexibility Business Agility Reusing existing assets
Integrating with existing and future technologiesSimplifying application construction and maintenance
Apache Tuscany achieves this by implementing the Service Component Architecture (SCA) specifications in Java and C++
SCA is specification developed by 17 companies at www.osoa.org and now going
through a formal standardization process in the OASIS Open Composite Services Architecture working group
SCA embodies good practice for SOA in a programming, assembly and deployment model
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
What Does SCA Do?
Imagine some distributed application made up of a number of components
Each component has some business function
SCA Defines a simple model for component construction, assembly and deployment.
Components expose services
Components referenceother services
Components are wiredtogether and grouped logically Components are contributedto physical runtimes
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
An SCA Component
public class CalculatorServiceImpl implements CalculatorService {
@Property private int decimalPlaces;
@Reference private AddService addService; @Reference private SubtractService subtractService; @Reference private MultiplyService multiplyService; @Reference private DivideService divideService;
… public double add(double n1, double n2) { return round(addService.add(n1, n2), decimalPlaces); }…
Implementation- Java, BPEL. Spring, Ruby, JavaScript, …
service
bindingWeb Services, EJB SLSB (RMI-IIOP)SCA JMSAtom/RSSJSONRPC
references
property
bindingWeb Services, EJB SLSB (RMI-IIOP)SCA JMSAtom/RSSJSONRPC
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Assembling An Application
ComponentAccountData
ComponentStockQuote
ComponentCalculator
ComponentAdd
ComponentSubtract
ComponentMultiply
ComponentDivide
Referencebinding.ws
Referencebinding.rmi
Servicebinding.ws
Servicebinding.rmi
Servicebinding.jsonrpc
CompositeBigBank
CompositeStockQuote
CompositeCalculator
wire
SCA is the component model
Allows you to assemble tightlycoupled components
But primarily focused on loosely coupled components
ComponentAccount
Java
Java
Java
Java
JavaScript
Ruby
Python
Groovy
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
The Assembly Mechanism – XML Defined By SCA
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0“ ... name="Calculator">
<component name="CalculatorServiceComponent">
<service name="CalculatorService"> <tuscany:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService"/> </service>
<implementation.java class="calculator.CalculatorServiceImpl"/>
<reference name="addService" target="AddServiceComponent" /> … </component>
<component name="AddServiceComponent"> <implementation.script script="calculator/AddServiceImpl.js"/> </component> …</composite>
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
The Service Reference<component name="AccountServiceComponent"> <service name="AccountService"> <tuscany:binding.jsonrpc uri="/AccountJSONService"/> <binding.ws uri=“http://localhost:8082/services/AccountWebService”/> <binding.sca/> </service>
<implementation.java class="bigbank.account.AccountServiceImpl"/>
<reference name="calculatorService"> <tuscany:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService"/> </reference>
<reference name="stockQuoteService"> <binding.ws uri="http://localhost:8081/services/StockQuoteWebService"/> </reference> <property name="currency">EURO</property></component>
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Demo – Big Bank
ComponentAccountData
ComponentStockQuote
ComponentCalculator
ComponentAdd
ComponentSubtract
ComponentMultiply
ComponentDivide
Referencebinding.ws
Referencebinding.rmi
Servicebinding.ws
Servicebinding.rmi
Servicebinding.jsonrpc
CompositeBigBank
CompositeStockQuote
CompositeCalculator
wire
ComponentAccount
Java
Java
Java
Java
JavaScript
Ruby
Python
Groovy
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Bindings
ComponentCalculator
ComponentAccount
Java
Java
Referencebinding.WS
Servicebinding.WS
Referencebinding.rmi
Servicebinding.rmi
ReferenceAn ESB
ServiceAn ESB
ReferenceBinding.sca
ServiceBinding.sca
Policy intents can be applied to bindings independently
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
SCA Domains
Node
Node
Node Node
Node
Node
Node
Domain
Domain
A single Node Multiple (Distributed) Nodes
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Leveraging The SCA Domain - Calculator Again<composite xmlns="http://www.osoa.org/xmlns/sca/1.0“ name="Calculator">
<component name="CalculatorServiceComponent"> <implementation.java class="calculator.CalculatorServiceImpl"/> <reference name="addService" target="AddServiceComponent" /> <reference name="subtractService" target="SubtractServiceComponent" /> <reference name="multiplyService" target="MultiplyServiceComponent"/> <reference name="divideService" target="DivideServiceComponent" /> </component>
<component name="MultiplyServiceComponent"> <implementation.java class="calculator.MultiplyServiceImpl" /> </component> <component name="DivideServiceComponent"> <implementation.java class="calculator.DivideServiceImpl" /> </component>
</composite>
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
The Distributed Components
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0“ name="Calculator">
<component name="AddServiceComponent"> <implementation.java class="calculator.AddServiceImpl" /> </component>
</composite>
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Distributed Calculator
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Deploying SCA Applications
There are several ways that the Apache Tuscany runtime can currently be deployed
Stand alone (1 or more nodes) Embedded, in the likes of Tomcat, Geronimo etc As a web application + Hot update option
SCA applications (Java files, SCDL and other resources) are contributed to the runtime.
The runtime makes services available according to the bindings specified in the assembly description (SCDL)
NodeImpl node = new NodeImpl(domainName, nodeName);
node.getContributionManager().startContribution(URL to my contribution);
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Databinding - Service Data Objects
Web App:Custom Code
EJB: Invoice
JCA
Web service
EJB: Customer
RDB
XML DBJDBC
XPath / XQuery
Local
XML/HTTP
CCI / Proprietary
Data Access Service
DataObjectGraph
ChangeSummary
Data GraphDataObject
Typically within a single process
Apache Tuscany also implements SDO and DAS in Java and C++Can be used to represent complex types passing through services and referencesTuscany SCA Java databindings allow other technologies to be used, e.g. JAXB
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Other Points Of Interest
SCA simplifies the use of policy to control infrastructure configuration
Interaction policies affect contract between service provider and consumero Authentication, Encryption, Non-Repudiation, Reliable Messaging, …
Implementation policies affect contract between component and containero Authorization, Transactions, Monitoring & Logging, …
Support is at early stages in Apache Tuscany
Not all of your application has to be written using SCA, SCA applications can be called (and it can call) applications using any of the
available binding technologies
SCA components can easily be used to wrap existing technologies You don’t need a new project to get benefit from Apache Tuscany and SCA
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Why Use SCA?
Embodies good practice for SOA Provides flexibility by decoupling implementation
technology choices from business service definitions Enables reuse through composition of existing service
assets into new service definitions with reconfigurable properties
Brings together a wide variety of new and existing assets into a consistent architecture
Widely supported by middleware vendors and open source implementations
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
What’s In The Box (http://incubator.apache.org/tuscany/)?
Java SCA 0.99 incubatingSDO 1.0 incubatingDAS 1.0 incubating M2
C++SCA 1.0 incubator M3SDO 1.0 incubator beta1 DAS under construction
There is also a sister project atPecl.php.net/sca_sdo
PHPSCA_SDO 1.2.2
Apache Tuscany Java SCA V1.0 Incubating Is Imminent
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Running A Sample From The Binary Java SCA DistributionDownload apache-tuscany-sca-0.90-incubating.zip/tar (and check signature)Unpack the zip or tar
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Tuscany Modules
Component Implementation TypesBPEL DASJavaNotificationOSGiResourceScript (Groovy, Ruby, Python, Javascript)SpringXQuery
HostingGeronimoJettyOSGiTomcat
Binding TypesAjaxFeed (RSS, Atom)JMS JsonRpcNotificationOSGiRmiSCAWs/Axis2XQuery
DatabindingsAxiomJaxbJsonSaxonSdoXmlBeans
There is a wide selection of modules in various stages of development .
There is lots more to be done. Come and join Tuscany.
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Extensibility
SCA Tuscany is based on an extensible, modularized architecture that can easily be extended.
There is a stable SPI defined for adding new technologies, e.g. bindings, databindings, implementations and hosting support.
If you find that SCA doesn’t support your technology of choice check with the Tuscany mailing list (see “How to find out more”) as it may already be in development and you could help develop or test it.
Alternatively it’s not too hard to add new ones yourself and you could come and help Tuscany build it
All contributions are most welcome!
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Use Cases
We are seeing people on our mail list who are using it for real now. For example,
A solution provider is building a service oriented solution for the finance industry.
Includes finance specific message formats Driving requirements for policy support
Independent product developers are using it as a component composition model to allow their products to be delivered in a way that
Allows the product to run as a set of distributed services That can be tailored to meet each customers needs and integrated easily into
existing customer infrastructure And that can be extended as requirements change
A platform for modelling the composition of the various steps (and load balancing required) in an analytics chain
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
How Do I Get Involved ?
Take a look at the latest release from the Apache Tuscany Web site http://incubator.apache.org/tuscany/
If you want the latest and greatest go to the Apache Tuscany source code repositoryhttp://svn.apache.org/repos/asf/incubator/tuscany/
Most importantly join the active developer and user communities on our mail lists by sending mail to
[email protected] and/or [email protected] or find us on the various archives
You are most welcome to get involved in the project in any way you want to, here are some examples.
Try out the software and give us your feedbackRecord bugs (JIRA) for any enhancements you want or problems you findSuggest new extensions Provide those bits of documentation that you think are missing or can be improvedWrite some codeGive a summary of how you have used Tuscany
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
Summary
SCA embodies good practice for the construction, assembly and deployment of service-oriented solutions
The open source Apache Tuscany provides Java, C++ runtimes now If you want to try it in PHP take a look at the PHP
SCA_SDO PECL extension
Give the software a spin and tell us what you think
Open Source SOAOpen Source SOA: SCA and SDO - http://incubator.apache.org/Tuscany
How To Find Out More
Apache Tuscany Web site and downloadshttp://incubator.apache.org/tuscany/
Apache Tuscany source code repositoryhttp://svn.apache.org/repos/asf/incubator/tuscany/
Mailing List, send mail to [email protected]
and/or
or find us on the various archives
PHP Implementation of SCA and SDO
http://pecl.php.net/SCA_SDO Open SOA Collaboration (SCA and SDO specs and articles)
http://www.osoa.org (soon to be -