Objectives - Apache Tuscany

Download Report

Transcript Objectives - Apache Tuscany

IBM Software Group
SCA Tooling Assessments
Raymond Feng
IBM Software Group
Basic requirements
1. Setup the development environment in an IDE (such as classpath)
2. Visualize the SCA assembly (composite, componentType)


Produce the composite, componentType and other files graphically
Render existing SCA artifacts such as the composite files
3. Simplify the constructions of SCA components




Introspect existing implementations to create componentType/component, for
example, support drag-and-drop from a java class to add a java component
Generate SCA artifacts, for example, generate service implementation class
with SCA annotations based on the service interface
Provide “drag & drop” style assembly
Create composites from scratch
4. Validate the artifacts and provide meaningful messages
5. Build and deploy to a test environment to run the application
2
Open Source SOA
IBM Software Group
A sample scenario
 Developing a simple Calculator composite with several Java
components one of which exposes a service over Web Service
binding
 Create a project with the Tuscany jars set on the classpath
 Create service interfaces and implementations
 Create a composite file defining the Calculator composite, all the
components are implemented in java. The Calculator component is
wired to the AddComponent which provides the “add” service.
Configure the CalculatorService with binding.ws
 Run the CalculatorComposite
 Use WebService explorer to test it
 Turn the Calculator composite as web application (Test w/
Tomcat/Geronimo/…)
3
Open Source SOA
IBM Software Group
Tooling Options
 SCA Tooling and Composite Editor from STP
 SCA Composite Designer: http://www.eclipse.org/stp/sca/index.php
 Service Creation (SC) Subproject:
http://download.eclipse.org/stp/updates
 https://www6.software.ibm.com/developerworks/education/os-eclipsesoatptuscany/index.html
 Eclipse plugins in Apache Tuscany
 http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/tools/eclips
e/
 http://jsdelfino.blogspot.com/2007/10/developing-sca-application-withapache.html
4
Open Source SOA
IBM Software Group
STP SCA Service Creation
 Eclipse update site: http://download.eclipse.org/stp/updates/
 Tutorial: https://www6.software.ibm.com/developerworks/education/oseclipse-soatptuscany/index.html
 Can configure Tuscany 1.0 as an installed SCA runtime
 A wizard is available to create a SCA project and generate a skeleton of SCA
composite containing a java component with a service interface and service
implementation.
 Only binding.ws and binding.rmi are supported
 Open the composite file with a XML editor. Only the default SCA namespace is
associated with the XSD to provide schema validation and content assistance,
no Tuscany extensions are supported
 Basic annotation assistance is provided using the Eclipse’s Annotation
Properties view
 A launcher class with main() is generated to start up the default composite
 WSDL is generated from Java interface if binding.ws is selected
 I’m able to successfully develop the simple Calculator
5
Open Source SOA
IBM Software Group
SCA composite editor from STP
 Sebastien’s review: http://dev.eclipse.org/mhonarc/lists/stpdev/msg01424.html. The plugin has been improved since then.
 This is purely a graphic editor to produce SCA composite file
 The look-and-feel is nice, with all the icons covering base SCA
models and Tuscany extensions
 Cannot render the existing composite files
 No validation and refactoring
 No introspection of component impl types, Drag&Drop is not
supported
 Additional tooling models without synchronization with the
SCA XML configuration files
 No code-gen is supported
6
Open Source SOA
IBM Software Group
Tuscany plugins
 The steps are documented at:
http://jsdelfino.blogspot.com/2007/10/developing-scaapplication-with-apache.html
 The plugins ease the Tuscany development with the following:
 Define a Tuscany User Library containing all the Tuscany JARs to
make it easier to add them to my project buildpath.
 Associate .composite files with the XML editor and register the SCA
and Tuscany XML schemas to get code-assist in the editor and
validation of my composite files.
 Write programs to launch Tuscany configured with my various
composites... wishing that I could just right-click on the .composite and
select a Run As / Tuscany...
 No graphic editor for the SCA artifacts
7
Open Source SOA
IBM Software Group
Feature matrix (I): STP Wizard
Steps
STP SCA Creation Wizard
Configure the Tuscany Runtime
Y
Windows  Preferences page in Eclipse
Create a project and set up the classpath
Y
Wizard (New  SOA Tools  SCA Java Component
Project)
Create the default composite
Y
Create a new java component as part of the wizard
Create the Calculator interface and implementation
Use regular java tooling. Annotation Properties view
Add the CalculatorComponent to the composite
It can be created as part of the new SCA Java
Component Project wizard
Declare binding.ws for CalculatorService
It can be specified as part of the new SCA Java
Component Project wizard
Create the AddService and AddServiceImpl
Use regular java tooling. Annotation Properties view
Add AddServiceComponent
N
Manually update the composite file w/ the XML
editor. Content assistance is only available for the
default SCA namespace. No Tuscany extensions are
supported.
Add a reference to the CalculatorComponent and wire
it to the AddServiceComponent
N
Manually update the composite file
Build and deploy
Y
Use the Eclipse build and run the generated
launcher class
Validation
8
Schema-based validation for the SCA namespace
Open Source SOA
IBM Software Group
Feature matrix (II): STP SCA Composite Designer
Steps
STP SCA Composite Designer
Configure the Tuscany Runtime
N
Create a project and set up the classpath
N
Create the default composite
Y
Create the Calculator interface and implementation
Add the CalculatorComponent to the composite
No runtime integration with Tuscany
A wizard to create an empty composite file. New 
SOA Tools  SCA Tools  New Composite
Model/New Composite Diagram
Use regular java tooling.
Y
Declare binding.ws for CalculatorService
Use the composite designer. Icons available for SCA
artifacts including Tuscany extensions
Use the composite designer
Create the AddService and AddServiceImpl
N
Use regular java tooling. Annotation Properties view
Add AddServiceComponent
Y
Use the composite designer
Add a reference to the CalculatorComponent and wire
it to the AddServiceComponent
N
Use the composite designer
Build and deploy
N
Validation
N
9
Open Source SOA
IBM Software Group
Feature matrix (III): Tuscany Plugins
Steps
STP SCA Creation Wizard
Configure the Tuscany Runtime
Y
The Tuscany runtime is bundled in the plugins
Create a project and set up the classpath
Y
Add the TUSCANY_LIBRARY class variable
Create the default composite
Use XML editor with content assistance based on
the XSDs
Create the Calculator interface and implementation
Use regular java tooling.
Add the CalculatorComponent to the composite
Use XML editor with content assistance based on
the XSDs
Declare binding.ws for CalculatorService
Use XML editor with content assistance based on
the XSDs
Create the AddService and AddServiceImpl
Use regular java tooling. Annotation Properties view
Add AddServiceComponent
N
Use XML editor with content assistance based on
the XSDs
Add a reference to the CalculatorComponent and wire
it to the AddServiceComponent
N
Use XML editor with content assistance based on
the XSDs
Build and deploy
Y
Right-click on the composite file and select “Run As
Tuscany”
Validation
10
Schema-based validation for the SCA namespace
and Tuscany namespace
Open Source SOA
IBM Software Group
Recommendations
 For users, use the STP SCA Creation Wizard and the STP
composite designer. These two features are not integrated, but
it seems that they can co-exist.
 For developers, use the Tuscany Eclipse plugins for now until a
fully-fledged GUI-based tooling is available.
11
Open Source SOA