Top Banner
Tuscany Runtime Architecture
28

Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Jan 05, 2016

Download

Documents

Arlene Mills
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Tuscany Runtime Architecture

Page 2: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Contents

• Overview• An example• Bootstrap kernel• Process of composite application

Page 3: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Overview

Extensions:1.Component implementation: BPEL, java etc.2.Binding: SOAP/HTTP web services, JSON-RPC , and RMI. 3.Interface Type: Java interfaces and WSDL4.Databinding: SDO, JAXB , and AXIOM

Page 4: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Extension Point Registry(EPR)

• Extension: achieving extensibility• Extension Point is the bridge between Tuscany

kernel and extensions

Page 5: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Extension Point Registry(EPR)

• e.g., ContributionScanner

FolderContributionScanner

JarContributionScanner

ZipContributionScanner

Page 6: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Extension Point Registry(EPR)

• Objects implemented ContributionScanner interface scan specific package and then build an artifact list– e.g., JarContributionScanner for resolving Jar

contributions• Each ContributionScanner object registers

itself with Tuscany runtime via ContributionScannerExtensionPoint

Page 7: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Extension Point Registry(EPR)

• Extension Point Registry(EPR) holds a list of all the extension points

• EPR is used to look up extension point

//create EPRExtensionPointRegistry registry = new Default ExtensionPointRegistry ();

//look upContributionScannerExtensionPoint factories = registry.getExtensionPoint(ContributionScannerExtensionPoint .class);

Page 8: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

An example

• An online fruit store

Page 9: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Bootstrap kernel

• Bootstrap sequence

Page 10: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Create Extension Point Registry

• Instantiate ExtensionPointRegistry

//Instantiate EPRExtensionPointRegistry registry = new Default ExtensionPointRegistry ();

Page 11: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Create Extension Point Registry

• Create necessary Extension Point– UtilityExtensionPoint– ModelFactoryExtensionPoint– ProxyFactoryExtensionPoint

//look up UtilityExtensionPointUtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);

Page 12: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Discover Module Activators

• Load ModuleActivator related configuration files in “/META-INF/services/”

Page 13: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Discover Module Activators

• Previous classes implemented ModuleActivator

Page 14: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Start Module Activators

• Call ModuleActivator.start() to start services• e.g., CorbaRuntimeModuleActivator– Register CorbaHostExtensionPoint– Start Corba server

Page 15: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Create Contribution Service

• Instantiate ContributionServiceImpl

Page 16: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Create Scope Registry

• Scope– Stateless: create a new component instance on

each call– Conversation: create a component instance for

each conversation– Composite: create a single component instance for

all calls

Page 17: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Create Composite Builder

• CompositeBuilder

• Create implementation classes that implemented CompositeBuilder

Page 18: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Create Composite Builder

• CompositeBuilder Impl

Page 19: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Create Composite Activator

• Create CompositeActivatorImpl

Page 20: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Load System SCA Definitions

• Load system definitions– ReliabilityPolicy– TransactionPolicy– SecurityPolicy– LoggingPolicy– WSBindingDefinitions– SCABindingDefinitions– JMSBindingDefinitions

Page 21: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Load Contributions

• Find and load contributions– e.g., Jar, Zip

Page 22: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Resolve composite

• Resolve elements in .composite file– <include>– <component>– <service>

Page 23: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Build Composite

• Execute CompositeBuilder.build()

Page 24: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Build Composite

• E.g., binding type is WSDL, ComponentServiceBindingBuilderImpl.build() will generate WSDL file

Page 25: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Activate Composite

• For each component defined in composite, adding related implementation provider, service binding provider, reference binding provider

Page 26: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Activate Composite

• In Online fruit store, – Store component’s implementation type is

widget, a WidgetImplementationProvider is needed

– shoppingcart component’s implementation type is Java, a JavaImplementationProvider is needed

– store component’s binding type is HTTP, a HTTPBindingProvider is needed

Page 27: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Start Composite

• Start binding, implementation and associated policies, etc.

Page 28: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application.

Start Composite

• In Online fruit store, – Store component:• WidgetImplementationProvider• HTTP binding

– shoppingcart component• JavaImplementationProvider

– Catalog component• Jsonrpc binding