SCA Assembly Model Anish Karmarkar Oracle Michael Rowley BEA - PowerPoint PPT Presentation

About This Presentation
Title:

SCA Assembly Model Anish Karmarkar Oracle Michael Rowley BEA

Description:

Order. Processing. Service. OrderProcessing. Component. EventLog. Reference ... component can be implemented by 'atomic' implementation or by composite ... – PowerPoint PPT presentation

Number of Views:108
Avg rating:3.0/5.0
Slides: 29
Provided by: chris784
Category:

less

Transcript and Presenter's Notes

Title: SCA Assembly Model Anish Karmarkar Oracle Michael Rowley BEA


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

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

4
AccountsComposite
Example SCA assembly
External Banking Reference
Payments Component

Payment Service


OrderProcessing Component

Order Processing Service


Accounts Ledger Component


EventLog Component

WarehouseComposite
External Warehouse Reference
Warehouse Broker Component

Warehouse Component
Warehouse Service





EventLog Reference
5
Bigbank Composite multiple components, service,
reference property
bigbank.accountcomposite
Reference
Reference
StockQuote
StockQuote
Service
Service
AccountService
Service
Component
AccountService
AccountData
Service
Component
6
ltcomposite xmlns"http//www.osoa.org/xmlns/sca/1.
0" targetNamespace"http//example.org"
name"bigbank.accountcomposite"
gt ltcompositegt
ltservice name"AccountService"
promote"AccountServiceComponent"gt
ltinterface.java interface"services.account.Accoun
tService"/gt ltbinding.ws
port"http//www.example.org/AccountService
wsdl.endpoint(AccountService/AccountServiceSO
AP)"/gt lt/servicegt
ltcomponent name"AccountServiceComponent"gt
ltimplementation.java class"services.account.
AccountServiceImpl"/gt ltreference
name"StockQuoteService"/gt ltreference
name"AccountDataService"
target"AccountDataServiceComponent/AccountDataSer
vice"/gt ltproperty name"currency"gtEUROlt/pr
opertygt lt/componentgt
bigbank.accountcomposite
StockQuote
Reference
Reference
StockQuote
StockQuote
Service
Service
ltcomponent name"AccountDataServiceComponent"gt
ltimplementation.bpel processQName"/gt
ltservice name"AccountDataService"gt
ltinterface.java interface"services.accountdat
a.AccountDataService"/gt lt/servicegt
lt/componentgt
AccountService
Service
Component
AccountService
AccountData
Service
Component
ltreference nameStockQuoteService"
promote"AccountServiceComponent/StockQuoteService
"gt ltinterface.java interface"services.sto
ckquote.StockQuoteService"/gt ltbinding.ws
port"http//example.org/StockQuoteService
wsdl.endpoint(StockQuoteService/StockQuoteServ
iceSOAP)"/gt lt/referencegt
7
Java Implementation Example Service Interface
Interface is callable remotely eg. as a Web
service
package org.example.services.account _at_Remotable
public interface AccountService public
AccountReport getAccountReport(String
customerID)
8
Java Implementation Example Implementation
package org.example.services.account import
org.osoa.sca.annotations. _at_Service(AccountServi
ce.class) public class AccountServiceImpl
implements AccountService private String
currency "USD" private AccountDataService
accountDataService private StockQuoteService
stockQuoteService public
AccountServiceImpl( _at_Property("currency")
String currency, _at_Reference("accountDataS
ervice") AccountDataService dataService,
_at_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
  • Synchronous Asynchronous service relationships
  • Conversational services
  • stateful service interactions
  • Asynchronous support
  • non-blocking invocation
  • asynchronous client to synchronous service
  • callbacks

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

11
Bidirectional Interfaces (Callbacks)
  • Useful for asynchronous messaging
  • Support for callbacks using Java interfaces
  • ltinterface.java interface"services.invoicing.Comp
    utePrice"
  • callbackInterface"services.invoicing.Invoi
    ceCallback"/gt
  • Support for callbacks using WSDL
    portTypes/interfaces
  • ltinterface.wsdl interface"http//example.org/inv
  • wsdl.interface(ComputePrice
    )"
  • callbackInterface"http//example.
    org/inv
  • wsdl.interface(InvoiceCallb
    ack)"/gt

12
Conversational Interfaces
  • Frees application programmer from
    conversation/correlation management
  • Imposes requirements on bindings
  • Interfaces marked as conversational using SCA
    Policy intent
  • Specific operations can be marked as
    endsConversation
  • WSDL extensions for conversational and
    endsConversation
  • ltportType name"LoanService" scarequires"convers
    ational" gt
  • ltoperation name"apply"gt
  • ltinput message"tnsApplicationInput"/gt
  • ltoutput message"tnsApplicationOutput"/
    gt
  • lt/operationgt
  • ltoperation name"cancel"
    scaendsConversation"true" gt
  • lt/operationgt
  • ...
  • lt/portTypegt

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

14
Java Implementation Example componentType
  • ltcomponentType xmlns"http//www.osoa.org/xmlns/sc
    a/1.0"
  • xmlnsxsd"http//www.w3.org/2001/XMLSchema"gt
  • ltservice name"AccountService"gt
  • ltinterface.java interface"services.accoun
    t.AccountService"/gt
  • lt/servicegt
  • ltreference name"accountDataService"gt
  • ltinterface.java interface"services.accoun
    tdata.AccountDataService"/gt
  • lt/referencegt
  • ltreference name"stockQuoteService"gt
  • ltinterface.java interface"services.stockq
    uote.StockQuoteService"/gt
  • lt/referencegt
  • ltproperty name"currency" type"xsdstring"/gt
  • lt/componentTypegt

15
Recursive Composition
  • Composites and Implementations look the same
  • services
  • references
  • properties
  • composites have associated ComponentType
  • Recursive composition nesting of composites
  • composite can be a component implementation in a
    higher level composite
  • promotes reuse of assemblies
  • ltimplementation.composite../gt as component
    implementation
  • component can be implemented by atomic
    implementation or by composite

16
Implementing AccountDataService Using a Composite
bigbank.accountcomposite
bigbank.accountcomposite
Reference
Reference
StockQuote
StockQuote
Service
Service
AccountService
AccountService
Service
Service
Component
Component
AccountService
AccountService
AccountData
AccountData
Service
Service
Component
Component
implements
bigbank.accountdata
Service
AccountData
Logging
AccountDataService
17
AccountDataService ComponentType
ltcomponentTypegt ltservice name"AccountDataServi
ce"gt ltinterface.java
interface"services.accountdata.AccountDataService
"/gt lt/servicegt lt/componentTypegt
18
bigbank.AccountData Composite
ltcomposite xmlns"http//www.osoa.org/xmlns/sca/1.
0" targetNamespace"http//example.org"
name"bigbank.AccountData" gt
ltservice name"AccountDataService"
promote"AccountData"gt ltinterface.java
interface"services.accountdata.AccountService"/gt
lt/servicegt ltcomponent name"AccountDataSe
rviceComponent"gt ltimplementation.bpel
process..."/gt ltreference
nameLoggingService"
targetLoggingServiceComponent"/gt
lt/componentgt ltcomponent nameLoggingServiceC
omponent"gt ltimplementation.spring
location..."/gt lt/componentgt ltcompositegt
19
bigbank.account Composite (recursion)
ltcomposite xmlns"http//www.osoa.org/xmlns/sca/1.
0" targetNamespace"http//example.org"
name"bigbank.accountcomposite" gt
ltservice name"AccountService"
promote"AccountServiceComponent"gt
ltinterface.java interface"services.account.Accoun
tService"/gt ltbinding.ws
port"http//..."/gt lt/servicegt ltcomponent
name"AccountServiceComponent"gt
ltimplementation.java class"services.account.Accou
ntServiceImpl"/gt ltreference
name"StockQuoteService"/gt ltreference
name"AccountDataService"
target"AccountDataServiceComponent/AccountDataSer
vice"/gt ltproperty name"currency"gtEUROlt/pr
opertygt lt/componentgt ltcomponent
name"AccountDataServiceComponent"gt
ltimplementation.bpel processQName"/gt
ltservice name"AccountDataService"gt
ltinterface.java interface"services.accountdata.Ac
countDataService"/gt lt/servicegt
lt/componentgt ltreference name""
promote"AccountServiceComponent/StockQuoteService
"gt ltinterface.java interface"services.sto
ckquote.StockQuoteService"/gt ltbinding.ws
port"http//..."/gt lt/referencegt ltcompositegt
ltimplementation.composite
namebbbigBank.AccountData"/gt
20
Top-Down Design constrainingType
  • constrainingType
  • Implementation independent
  • Specifies the shape -- constraints in terms of
    services/references/properties
  • composites, components, componentType and
    implementations can be constrained using the
    constrainingType attribute
  • Allows an architect to specify constrainingTypes
    which can be used by developers as a template
  • SCA provides runtime validation of artifacts with
    its constrainingType

21
constrainingType Example
ltconstrainingType namemyCT ... gt ltservice
name"MyValueService"gt ltinterface.java
interface"services.myvalue.MyValueService"/gt
lt/servicegt ltreference name"customerService"gt
ltinterface.java interface"services.custom
er.CustomerService"/gt lt/referencegt
ltproperty name"currency" type"xsdstring"/gt
lt/constrainingTypegt ltcomponent
name"MyValueServiceComponent" constrainingType"m
ynsmyCT gt ltimplementation.bpel
process..."/gt ltservice nameMyValueService
gt ltinterface.java interface"services.myva
lue.MyValueService"/gt ltbinding.jms .../gt
lt/servicegt ltreference name"customerService
" target"CustomerService"gt ltbinding.ws
...gt lt/referencegt ltproperty
name"currency"gtEUROlt/propertygt lt/componentgt
22
Packaging and Deployment Domains
  • Composites deployed, configured into SCA Domain
  • Defines the boundary of visibility for SCA
  • Typically an area of functionality controlled by
    single organization/division
  • E.g. accounts
  • Configuration represented by virtual composite
  • potentially distributed across a network of nodes
  • contains components, services, references, wires
  • configured using composites
  • Composites make deployment simpler
  • individual composites created, deployed
    independently
  • may contain only wires or components or
    externally provided services or references
  • Abstract services provided for management of the
    domain

23
Packaging and Deployment Contributions
  • Contributions hold artifacts available for use in
    the Domain
  • Package containing artifacts necessary for SCA
  • SCA defined artifacts
  • E.g. composites, constrainingType, etc
  • Non-SCA defined artifacts
  • E.g. WSDL, XML schema, Java classes, object code
    etc
  • Packaging must be hierarchical
  • Metadata included in the META-INF directory
  • ltcontribution xmlnshttp//www.osoa.org/xmlns/sca/
    1.0gt
  • ltdeployable composite"xsQName"/gt
  • ltimport namespace"xsString"
    locationxsAnyURI?/gt
  • ltexport namespace"xsString"/gt
  • lt/contributiongt
  • Interoperable packaging format ZIP
  • Other formats possible filesystem directory,
    OSGi bundle, JAR file

24
SCA Runtime Example
Runtime Topology
SCA Java Containers
SCA JEE Containers
SCA CPP Containers

SCA BPEL Container
SCA PHP Container
Assigned to be hosted by SCA Java container
Deployment Mapping
Assigned to be hosted by SCA CPP container
SCA Domain
bigbank.accountmanagement
bigbank.stockquote




Service Compositions
25
Autowiring
  • Allows component references to be wired to
    component services automatically (without
    explicit wires)
  • Matches references to services based on
    compatible interfaces, bindings, policy
    intents/sets

 
AccountsComposite
External
Banking
Payment
Service
Service
Payments
Component
Customer
Account
Component
Product
Pricing
Component
Accounts
Ledger
Component
26
Reuse in SCA
  • Inclusion
  • Recursive composition
  • Implementation reuse through configurable
    components
  • Reusable services through composite references

27
Extensibility in SCA
  • Designed for extensibility
  • Extensible artifacts
  • Implementation types
  • ltimplementation.gt
  • Interface types
  • ltinterface.gt
  • Binding types
  • ltbinding.gt

28
Assembly Summary
  • SCA Assembly models systems composed of reusable
    services
  • A model for service-based system
  • construction
  • assembly
  • deployment
  • Heterogeneity
  • Multiple languages
  • Multiple container technologies
  • Service access methods
  • Metadata driven
Write a Comment
User Comments (0)
About PowerShow.com