Slide 1 Extending Tuscany Raymond Feng Apache Tuscany committer.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

NetServ Dynamic in-network service deployment Henning Schulzrinne (Columbia University) Srinivasan Seetharaman (Georgia Tech) Volker Hilt (Bell Labs)
An Introduction to Web Services Sriram Krishnan, Ph.D.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Interactive Systems Technical Design Seminar work: Web Services Janne Ojanaho.
Why OSGi matters for Enterprise Java Infrastructures
Liang,Introduction to Java Programming,revised by Dai-kaiyu 1 Chapter 10 Object-Oriented Modeling.
Comparison of the RMI and the socket APIs
The SMS project WP 4.2: Service Repository & Runtime Environment ICCS.
Introduction to EJB INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
Using Ant to build J2EE Applications Kumar
INTRODUCING SCA Byungwook Cho Nov.2007.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
Introducing Axis2 Eran Chinthaka. Agenda  Introduction and Motivation  The “big picture”  Key Features of Axis2 High Performance XML Processing Model.
CPSC 410.  Build on previous Connector lectures  Learn how to implement flexible connector implementations  Learn the Dependency Injection pattern.
THE GITB TESTING FRAMEWORK Jacques Durand, Fujitsu America | December 1, 2011 GITB |
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
Parsley Introduction Kui Huang Oct. 13, Topics Background Dependency Injection Object Lifecycle Message Bus Sample FW Extensions.
+ A Short Java RMI Tutorial Usman Saleem
Unified Modeling Language, Version 2.0
SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA.
Tuscany 2.x Extensibility and SPIs Raymond Feng. Tuscany Extensibility Cx2x/Tuscany+2.x+Extensibility+and+SPIs#extensions.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Expressing Workflows Using Grid Enabled Computer Algebra Systems Palaiseau, France, January 19-21, 2009 Alexandru CÂRSTEA Georgiana MACARIU Marc FRÎNCU.
Tu sca ny 1 Extending The Tuscany Java SCA Runtime 21 August 2006.
Component frameworks Roy Kensmil. Historical trens in software development. ABSTRACT INTERACTIONS COMPONENT BUS COMPONENT GLUE THIRD-PARTY BINDING.
Slide 1 Extending Tuscany Raymond Feng Apache Tuscany committer.
Architectural pattern: Interceptor Source: POSA II pp 109 – 140POSA II Environment: developing frameworks that can be extended transparently Recurring.
Tuscany: a SOA framework Jeffrey Guo Accelrys, Inc.
Tu sca ny 1 The Tuscany Java SCA Runtime 20 August 2006.
SCA Bindings Simon Holdsworth Piotr Przybylski. Agenda n SCA Bindings Overview l Bindings TC Charter n Bindings l Web Services Binding l JMS Binding l.
Drawing System Sequence Diagrams
Grid Services I - Concepts
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.
Cairngorm Microarchitecture. Pronunciation Cairngorm (kârn gôrm) n. yellowish-brown variety of quartz, especially found in Scottish Cairngorm mountain.
Tu sca ny 1 The Tuscany Project in the Apache Incubator and The Service Component Architecture Jeremy Boynes Simon Nash 28 June 2006.
Jini Architecture Introduction System Overview An Example.
1 G52IWS: Web Services Chris Greenhalgh. 2 Contents The World Wide Web Web Services example scenario Motivations Basic Operational Model Supporting standards.
Slide 1 Extending Tuscany Raymond Feng Apache Tuscany committer.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
1 Unified Modeling Language, Version 2.0 Chapter 2.
1 G52IWS: Web Services Description Language (WSDL) Chris Greenhalgh
© 2009 by IBM; made available under the EPL v1.0 | Feb 1, 2009 Seneca 2009 Tim deBoer Gorkem Ercan Extend WTP Server Tools.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Apache Cocoon – XML Publishing Framework 데이터베이스 연구실 박사 1 학기 이 세영.
Apache Web Server v. 2.2 Reference Manual Chapter 2 Starting Apache.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Apache Tuscany 2.x Domain/Node Raymond Feng
Apache Tuscany 2.x Domain/Node
Overall Architecture and Component Model
Tuscany Java SCA Architecture
Processes The most important processes used in Web-based systems and their internal organization.
Intent (Thanks to Jim Fawcett for the slides)
Presented by Jinpeng Zhou
30 Java Applets.
What is an Architecture?
Building easily and quickly an SCA composite with the SCA Composite Designer Stéphane Drapeau Obeo.
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Could Jiro™ Extend the Jini™ Pattern Lanuguage?
What is an Architecture?
Plug-In Architecture Pattern
Java Chapter 7 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Slide 1 Extending Tuscany Raymond Feng Apache Tuscany committer

Slide 2 Contents What can be extended? How to add an extension module? How to add an implementation type? How to add a binding type? How to add a interface type How to add a data binding type?

Slide 3 What can be extended? The SCA assembly model can be extended with support for new interface types, implementation types. and binding types. Tuscany is architected for extensibilities including:  Implementation types  Binding types  Data binding types  Interface types

Slide 4 Add an extension module The Tuscany runtime allows extension modules to be plugged in. Tuscany core and extension modules can also define extension points where extensions can be added.

Slide 5 Life cycle of an extension module During bootstrapping, the following sequence will happen:  All the module activators will be discovered by the presence of a file named as META-INF/services/org.apache.tuscany.spi.bootstrp.ModuleActivator.  The activator class is instantiated using the no-arg constructor.  ModuleActivator.getExtensionPoints() is invoked for all modules and the extension points contributed by each module are added to the ExtensionRegistry.  ModuleActivator.start(ExtensionRegistry) is invoked for all the modules. The module can then get interested extension points and contribute extensions to them. The contract bwteen the extension and extension point is private to the extension point. The extension point can follow similar patterns such as Registry. If it happens that one extension point has a dependency on another extension point, they can linked at this phase. During shutting down, the stop() method is invoked for all the modules to perform cleanups. A module can choose to unregister the extension from theextension points.

Slide 6 Add an extension module Implement the org.apache.tuscany.core.ModuleActivator interface. The implementation class must have a no-arg constructor. The same instance will be used to invoke all the methods during different phases of the module activation. Create a plain text file named as META- INF/services/org.apache.tuscany.core.ModuleActivator. List the implementation class name of the ModuleActivator in the file. One line per class. Add the module jar to the classpath (or whatever appropriate for the hosting environment).

Slide 7 Add an implementation type SCA allows you to choose from any one of a wide range of implementation types, such as Java, Scripting, BPEL or C++, where each type represents a specific implementation technology.

Slide 8 Add a new implementation type Define an interface to represent the metadata for the implementation Implement the StAXArtifactProcessor to read/resolve/write the model Add the runtime logic by implementing the ImplementionProvider SPI Control the component lifecycle by implementing the ImplementationActivator SPI Contribute an extension module

Slide 9 Define and process the model A component implementation requires some metadata The model typically consists of 4 parts  The CRUDImplementation interface which extends org.apache.tuscany.assembly.Implementation  The CRUDImplementationFactory interface which defines createImplementation() method  The default implementation of CRUDImplementation  The default implementation of CRUDImplementationFactory Provides an implementation of StAXArtifactProcessor to read/write the model objects from/to XML  CRUDImplementationProcessor

Slide 10 Provide the invocation logic The logical model can be augmented with ImplementationProvider interface to provide invocation logic for the given component implementation type  CRUDImplementationProvider extends CRUDImplementationImpl by implementing the ImplementationProvider interface  Methods on ImplementationProvider SPI createInterceptor(): Create an interceptor to invoke a component with this implementation type createCallbackInterceptor(): Create a callback interceptor to call back a component with this implementation type configure(): Configure the RuntimeComponent with more information specific to this implementation type

Slide 11 Control the life cycle of components The model implementation class can optionally implement the ImplementationActivator SPI to control the life cycle of components with this implementation type  CRUDImplementationProvider extends CRUDImplementationImpl by implementing the ImplementationActivator interface  Methods on ImplementationActivator SPI start(): A method to be invoked when a component with this implementation type is started. (We simply print a message for the CRUD) stop(): A method to be invoked when a component with this implementation type is stopped. (We simply print a message for the CRUD)

Slide 12 Plug the implementation type into Tuscany The extension module containing the CRUD implementation type can be plugged into Tuscany as follows:  Implement the ModuleActivator SPI and register the implementation class in META- INF/services/org.apache.tuscany.core.ModuleActivator  Interact with the ExtensionPointRegistry start(): Register the CRUDImplementationProcessor with StAXArtifactProcessorExtensionPoint stop(): Unregister the CRUDImplementationProcessor

Slide 13 The big picture (class diagram)

Slide 14 Add a binding type References use bindings to describe the access mechanism used to call a service. Services use bindings to describe the access mechanism that clients have to use to call the service.

Slide 15 Add a new binding Define an interface to represent the metadata for the binding Implement the StAXArtifactProcessor to read/resolve/write the models Add the runtime logic by implementing the ReferenceBindingProvider, ServiceBindingProvider SPIs Control the component lifecycle by implementing the ReferenceBindingActivator, ServiceBindingActivator SPI Contribute an extension module to Tuscany

Slide 16 Define and process the model A binding requires some metadata, for example, The model typically consists of 4 parts  The EchoBinding interface which extends org.apache.tuscany.assembly.Binding  The EchoBindingFactory interface which defines createEchoBinding() method  The default implementation of EchoBinding (EchoBindingImpl)  The default implementation of EchoBindingFactory (DefaultEchoBindingFactory) Provides an implementation of StAXArtifactProcessor to read/write the model objects from/to XML  EchoBindingProcessor

Slide 17 Provide the outbound invocation logic The logical model can be augmented with ReferenceBindingProvider interface to provide invocation logic for the given binding type  EchoBindingProvider extends EchoBindingImpl and implements the ReferenceBindingProvider interface  Methods on ReferenceBindingProvider SPI createInterceptor(): Create an interceptor to invoke a component with this binding type createCallbackInterceptor(): Create a callback interceptor to call back a component with this binding type getBindingInterfaceContract(): Get the interface contract imposed by the binding protocol layer

Slide 18 Provide the inbound invocation logic The logical model can be augmented with ServiceBindingProvider interface to provide invocation logic for the given binding type  EchoBindingProvider extends EchoBindingImpl and implements the ServiceBindingProvider interface  Methods on ReferenceBindingProvider SPI getBindingInterfaceContract(): Get the interface contract imposed by the binding protocol layer

Slide 19 Control the life cycle of bindings The binding implementation class can optionally implement the ReferenceBindingActivator/ServiceBindingActivator SPI to control the life cycle of components with this implementation type  EchoBindingProvider extends EchoBindingImpl and implements the ReferenceBindingActivator and ServiceBindingActivator interfaces  Methods on ImplementationActivator SPI start(): A method to be invoked when a component reference/service with this binding type is started. (We simply print a message for the Echo reference) stop(): A method to be invoked when a component reference/service with this binding type is stopped. (We simply print a message for the Echo reference)

Slide 20 Plug the binding type into Tuscany The extension module containing the ECHO binding type can be plugged into Tuscany as follows:  Implement the ModuleActivator SPI and register the implementation class in META- INF/services/org.apache.tuscany.core.ModuleAc tivator  Interact with the ExtensionPointRegistry start(): Register the EchoBindingProcessor with StAXArtifactProcessorExtensionPoint stop(): Unregister the EchoBindingProcessor

Slide 21 The big picture (class diagram)