Presentation is loading. Please wait.

Presentation is loading. Please wait.

SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA.

Similar presentations


Presentation on theme: "SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA."— Presentation transcript:

1 SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA

2 What is SCA Assembly? n SCA Assembly has been alternately described as: l Vendor-, technology- and language-neutral representation of the composition of services into business solutions l Unified declarative model for describing and deploying service assemblies l Deployment descriptors on steroids l Component implementation technology for configuring and deploying other component implementation technologies n supports recursion of components to create hierarchical composition

3 Outline n Bigbank composite example n Java implementation example n Interaction models n Interfaces: local, remote, bidirectional, conversational n ComponentType n Recursive composition n Top-down design: constrainingType n Packaging & deployment n Autowiring n Reuse n Extensibility n Summary

4 Warehouse Service WarehouseComposite Warehouse Broker Component Warehouse Component EventLog Component Order Processing Service OrderProcessing Component EventLog Reference External Warehouse Reference Payments Component Payment Service AccountsComposite External Banking Reference Accounts Ledger Component Example SCA assembly

5 Bigbank Composite – multiple components, service, reference & property bigbank.accountcomposite AccountService Component Service AccountService Reference StockQuote Service AccountData Service Component Reference StockQuote Service

6 <binding.ws port="http://example.org/StockQuoteService# wsdl.endpoint(StockQuoteService/StockQuoteServiceSOAP)"/> <binding.ws port="http://www.example.org/AccountService# wsdl.endpoint(AccountService/AccountServiceSOAP)"/> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://example.org" name="bigbank.accountcomposite" > <reference name="AccountDataService" target="AccountDataServiceComponent/AccountDataService"/> EURO StockQuote bigbank.accountcomposite AccountService Component Service AccountService Reference StockQuote Service AccountData Service Component Reference StockQuote Service

7 Java Implementation Example: Service Interface package org.example.services.account; @Remotable public interface AccountService { public AccountReport getAccountReport(String customerID); } Interface is callable remotely eg. as a Web service

8 Java Implementation Example – Implementation package org.example.services.account; import org.osoa.sca.annotations.*; @Service(AccountService.class) public class AccountServiceImpl implements AccountService { private String currency = "USD"; private AccountDataService accountDataService; private StockQuoteService stockQuoteService; public AccountServiceImpl( @Property("currency") String currency, @Reference("accountDataService") AccountDataService dataService, @Reference("stockQuoteService") StockQuoteService stockService) { this.currency = currency; this.accountDataService = dataService; this.stockQuoteService = stockService; } // end constructor... } Defines the service interface Defines a property “currency” Defines references “accountDataService” and “stockQuoteService ”

9 SCA Interaction Model n Synchronous & Asynchronous service relationships n Conversational services l stateful service interactions n Asynchronous support l “non-blocking” invocation l asynchronous client to synchronous service l callbacks

10 Interfaces: Local v. Remotable n Supports multiple components within a single process or separate processes n Local interface l Pass-by-reference l Tightly-coupled l Fine-grained n Remote interface l Pass-by-value (with pass-by-reference override) l Loosely-coupled l Coarse-grained n Java interface l Local: default l Remotable: using @remotable annotation n WSDL portType/interface: always remote n ‘local’ attribute override on the element

11 Bidirectional Interfaces (Callbacks) n Useful for asynchronous messaging n Support for callbacks using Java interfaces <interface.java interface="services.invoicing.ComputePrice" callbackInterface="services.invoicing.InvoiceCallback"/> n Support for callbacks using WSDL portTypes/interfaces <interface.wsdl interface="http://example.org/inv# wsdl.interface(ComputePrice)" callbackInterface="http://example.org/inv# wsdl.interface(InvoiceCallback)"/>

12 Conversational Interfaces n Frees application programmer from conversation/correlation management n Imposes requirements on bindings n Interfaces marked as conversational using SCA Policy intent n Specific operations can be marked as “endsConversation” n WSDL extensions for “conversational” and “endsConversation”...

13 ComponentType n Describes component implementation type details l Services l References l Properties l Extensibility elements n Can be introspected from the implementation or specified in an XML sidefile l Typically will be introspected from the implementation l Component implementations may use annotations to specify componentType information n eg Java

14 Java Implementation Example: componentType <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

15 Recursive Composition n Composites and Implementations look the same l services l references l properties l composites have associated ComponentType n “Recursive composition” = nesting of composites l composite can be a component implementation in a higher level composite l promotes reuse of assemblies l as component implementation l component can be implemented by “atomic” implementation or by composite

16 Implementing AccountDataService Using a Composite bigbank.accountcomposite AccountService Component Service AccountService Reference StockQuote Service AccountData Service Component bigbank.accountcomposite AccountService Component Service AccountService Reference StockQuote Service AccountData Service Component implements Service AccountDataService AccountDataLogging bigbank.accountdata

17 AccountDataService ComponentType <interface.java interface="services.accountdata.AccountDataService"/>

18 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://example.org" name="bigbank.AccountData" > <reference name=“LoggingService" target=“LoggingServiceComponent"/> bigbank.AccountData Composite

19 bigbank.account Composite (recursion) <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://example.org" name="bigbank.accountcomposite" > <reference name="AccountDataService" target="AccountDataServiceComponent/AccountDataService"/> EURO

20 Top-Down Design: constrainingType n constrainingType l Implementation independent l Specifies the shape -- constraints in terms of services/references/properties l composites, components, componentType and implementations can be constrained using the “constrainingType” attribute l Allows an architect to specify constrainingTypes which can be used by developers as a template l SCA provides runtime validation of artifacts with its constrainingType

21 constrainingType Example EURO

22 Packaging and Deployment: Domains n Composites deployed, configured into SCA Domain l Defines the boundary of visibility for SCA l Typically an area of functionality controlled by single organization/division n E.g.: accounts n Configuration represented by virtual composite l potentially distributed across a network of nodes l contains components, services, references, wires l configured using composites n Composites make deployment simpler l individual composites created, deployed independently l may contain only wires or components or externally provided services or references n Abstract services provided for management of the domain

23 Packaging and Deployment: Contributions n Contributions hold artifacts available for use in the Domain n Package containing artifacts necessary for SCA l SCA defined artifacts n E.g.: composites, constrainingType, etc l Non-SCA defined artifacts n E.g.: WSDL, XML schema, Java classes, object code etc n Packaging must be hierarchical n Metadata included in the “META-INF” directory * n Interoperable packaging format: ZIP n Other formats possible: filesystem directory, OSGi bundle, JAR file

24 SCA Runtime Example SCA PHP Container Assigned to be hosted by SCA Java container Assigned to be hosted by SCA CPP container Runtime Topology Deployment Mapping Service Compositions SCA Domain bigbank.accountmanagement bigbank.stockquote SCA JEE ContainersSCA CPP Containers … SCA Java Containers SCA BPEL Container

25 Autowiring n Allows component references to be wired to component services automatically (without explicit wires) n Matches references to services based on compatible interfaces, bindings, policy intents/sets Payments Component Payment Service AccountsComposite External Banking Service Accounts Ledger Component Product Pricing Component Customer Account Component

26 Reuse in SCA n Inclusion n Recursive composition n Implementation reuse through configurable components n Reusable services through composite references

27 Extensibility in SCA n Designed for extensibility n Extensible artifacts: l Implementation types n l Interface types n l Binding types n

28 Assembly: Summary n SCA Assembly models systems composed of reusable services n A model for service-based system: l construction l assembly l deployment n Heterogeneity l Multiple languages l Multiple container technologies l Service access methods n Metadata driven


Download ppt "SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA."

Similar presentations


Ads by Google