280 likes | 376 Views
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 WSDL
E N D
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 WSDL • 4.Databinding: SDO, JAXB , and AXIOM
Extension Point Registry(EPR) • Extension: achieving extensibility • Extension Point is the bridge between Tuscany kernel and extensions
Extension Point Registry(EPR) • e.g., ContributionScanner FolderContributionScanner JarContributionScanner ZipContributionScanner
Extension Point Registry(EPR) • Objects implemented ContributionScannerinterface scan specific package and then build an artifact list • e.g., JarContributionScannerfor resolving Jar contributions • Each ContributionScannerobject registers itself with Tuscany runtime via ContributionScannerExtensionPoint
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 EPR ExtensionPointRegistryregistry = new Default ExtensionPointRegistry (); //look up ContributionScannerExtensionPointfactories = registry.getExtensionPoint(ContributionScannerExtensionPoint.class);
An example • An online fruit store
Bootstrap kernel • Bootstrap sequence
Create Extension Point Registry • Instantiate ExtensionPointRegistry //Instantiate EPR ExtensionPointRegistryregistry = new Default ExtensionPointRegistry();
Create Extension Point Registry • Create necessary Extension Point • UtilityExtensionPoint • ModelFactoryExtensionPoint • ProxyFactoryExtensionPoint //look up UtilityExtensionPoint UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
Discover Module Activators • Load ModuleActivator related configuration files in “/META-INF/services/”
Discover Module Activators • Previous classes implemented ModuleActivator
Start Module Activators • Call ModuleActivator.start() to start services • e.g., CorbaRuntimeModuleActivator • Register CorbaHostExtensionPoint • Start Corbaserver
Create Contribution Service • Instantiate ContributionServiceImpl
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
Create Composite Builder • CompositeBuilder • Create implementation classes that implemented CompositeBuilder
Create Composite Builder • CompositeBuilderImpl
Create Composite Activator • Create CompositeActivatorImpl
Load System SCA Definitions • Load system definitions • ReliabilityPolicy • TransactionPolicy • SecurityPolicy • LoggingPolicy • WSBindingDefinitions • SCABindingDefinitions • JMSBindingDefinitions
Load Contributions • Find andload contributions • e.g., Jar, Zip
Resolve composite • Resolve elements in .composite file • <include> • <component> • <service>
Build Composite • Execute CompositeBuilder.build()
Build Composite • E.g., binding type is WSDL, ComponentServiceBindingBuilderImpl.build() will generate WSDL file
Activate Composite • For each component defined in composite, adding related implementation provider, service binding provider, reference binding provider
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
Start Composite • Start binding, implementation and associated policies, etc.
Start Composite • In Online fruit store, • Store component: • WidgetImplementationProvider • HTTP binding • shoppingcartcomponent • JavaImplementationProvider • Catalogcomponent • Jsonrpcbinding