tuscany runtime architecture. contents overview an example bootstrap kernel process of composite...
TRANSCRIPT
![Page 1: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/1.jpg)
Tuscany Runtime Architecture
![Page 2: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/2.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/3.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/4.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/6.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/7.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/8.jpg)
An example
• An online fruit store
![Page 9: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/9.jpg)
Bootstrap kernel
• Bootstrap sequence
![Page 10: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/10.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/11.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/12.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/13.jpg)
Discover Module Activators
• Previous classes implemented ModuleActivator
![Page 14: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/14.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/15.jpg)
Create Contribution Service
• Instantiate ContributionServiceImpl
![Page 16: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/16.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/17.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/18.jpg)
Create Composite Builder
• CompositeBuilder Impl
![Page 19: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/19.jpg)
Create Composite Activator
• Create CompositeActivatorImpl
![Page 20: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/20.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/21.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/22.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/23.jpg)
Build Composite
• Execute CompositeBuilder.build()
![Page 24: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/24.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/25.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/26.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/27.jpg)
Start Composite
• Start binding, implementation and associated policies, etc.
![Page 28: Tuscany Runtime Architecture. Contents Overview An example Bootstrap kernel Process of composite application](https://reader035.vdocuments.net/reader035/viewer/2022070403/56649f325503460f94c4da57/html5/thumbnails/28.jpg)
Start Composite
• In Online fruit store, – Store component:• WidgetImplementationProvider• HTTP binding
– shoppingcart component• JavaImplementationProvider
– Catalog component• Jsonrpc binding