sca assembly model anish karmarkar oracle michael rowley bea n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA PowerPoint Presentation
Download Presentation
SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA

Loading in 2 Seconds...

play fullscreen
1 / 30

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


  • 91 Views
  • Uploaded on

SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA . 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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'SCA Assembly Model Anish Karmarkar – Oracle Michael Rowley – BEA' - virgil


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
what is sca assembly
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
outline
Outline
  • Bigbank composite example
  • Java implementation example
  • Interaction models
  • Interfaces: local, remote, bidirectional, conversational
  • ComponentType
  • Recursive composition
  • Top-down design: constrainingType
  • Autowiring
  • Packaging & deployment
  • Reuse
  • Extensibility
  • Summary
slide4

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

bigbank composite multiple components service reference property
Bigbank Composite – multiple components, service, reference & property

bigbank.accountcomposite

Reference

Reference

StockQuote

StockQuote

Service

Service

AccountService

Service

Component

AccountService

AccountData

Service

Component

slide6

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"

targetNamespace="http://example.org"

name="bigbank.accountcomposite">

<composite>

<service name="AccountService" promote="AccountServiceComponent">

<interface.java interface="services.account.AccountService"/>

<binding.ws port="http://www.example.org/AccountService#

wsdl.endpoint(AccountService/AccountServiceSOAP)"/>

</service>

<component name="AccountServiceComponent">

<implementation.java class="services.account.AccountServiceImpl"/>

<reference name="StockQuoteService"/>

<reference name="AccountDataService"

target="AccountDataServiceComponent/AccountDataService"/>

<property name="currency">EURO</property>

</component>

bigbank.accountcomposite

StockQuote

Reference

Reference

StockQuote

StockQuote

Service

Service

<component name="AccountDataServiceComponent">

<implementation.bpel process=“QName"/>

<service name="AccountDataService">

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

</service>

</component>

AccountService

Service

Component

AccountService

AccountData

Service

Component

<reference name=“StockQuoteService" promote="AccountServiceComponent/StockQuoteService">

<interface.java interface="services.stockquote.StockQuoteService"/>

<binding.ws port="http://example.org/StockQuoteService#

wsdl.endpoint(StockQuoteService/StockQuoteServiceSOAP)"/>

</reference>

slide7

Java Implementation Example: Service Interface

Interface is callable remotely

eg. as a Web service

package org.example.services.account;

@Remotable

public interface AccountService {

public AccountReport getAccountReport(String customerID);

}

slide8

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 serviceinterface

Defines a property“currency”

Defines references “accountDataService” and “stockQuoteService”

slide9

SCA Interaction Model

  • Synchronous & Asynchronous service relationships
  • Conversational services
    • stateful service interactions
  • Asynchronous support
    • “non-blocking” invocation
    • asynchronous client to synchronous service
    • callbacks
slide10

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 @remotable annotation
  • WSDL portType/interface: always remote
  • ‘local’ attribute override on the <composite> element
slide11

Bidirectional Interfaces (Callbacks)

  • Useful for asynchronous messaging
  • Support for callbacks using Java interfaces

<interface.java interface="services.invoicing.ComputePrice"

callbackInterface="services.invoicing.InvoiceCallback"/>

  • 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)"/>

slide12

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”

<portType name="LoanService" sca:requires="conversational">

<operation name="apply">

<input message="tns:ApplicationInput"/>

<output message="tns:ApplicationOutput"/>

</operation>

<operation name="cancel" sca:endsConversation="true">

</operation>

...

</portType>

componenttype
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
java implementation example componenttype
Java Implementation Example: componentType

<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<service name="AccountService">

<interface.java interface="services.account.AccountService"/>

</service>

<reference name="accountDataService">

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

</reference>

<reference name="stockQuoteService">

<interface.java interface="services.stockquote.StockQuoteService"/>

</reference>

<property name="currency" type="xsd:string"/>

</componentType>

recursive composition
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
    • <implementation.composite../> as component implementation
    • component can be implemented by “atomic” implementation or by composite
implementing accountdataservice using a composite
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

slide17

AccountDataService ComponentType

<componentType>

<service name="AccountDataService">

<interface.java

interface="services.accountdata.AccountDataService"/>

</service>

</componentType>

slide18

bigbank.AccountData Composite

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"

targetNamespace="http://example.org"

name="bigbank.AccountData">

<service name="AccountDataService" promote="AccountData">

<interface.java interface="services.accountdata.AccountService"/>

</service>

<component name="AccountDataServiceComponent">

<implementation.bpel process=“..."/>

<reference name=“LoggingService"

target=“LoggingServiceComponent"/>

</component>

<component name=“LoggingServiceComponent">

<implementation.spring location=“..."/>

</component>

<composite>

bigbank account composite recursion
bigbank.account Composite (recursion)

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"

targetNamespace="http://example.org"

name="bigbank.accountcomposite">

<service name="AccountService" promote="AccountServiceComponent">

<interface.java interface="services.account.AccountService"/>

<binding.ws port="http://..."/>

</service>

<component name="AccountServiceComponent">

<implementation.java class="services.account.AccountServiceImpl"/>

<reference name="StockQuoteService"/>

<reference name="AccountDataService"

target="AccountDataServiceComponent/AccountDataService"/>

<property name="currency">EURO</property>

</component>

<component name="AccountDataServiceComponent">

<implementation.bpel process=“QName"/>

<service name="AccountDataService">

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

</service>

</component>

<reference name="" promote="AccountServiceComponent/StockQuoteService">

<interface.java interface="services.stockquote.StockQuoteService"/>

<binding.ws port="http://..."/>

</reference>

<composite>

<implementation.composite name=“bb:bigBank.AccountData"/>

slide20

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
slide21

constrainingType Example

<constrainingType name=“myCT” ... >

<service name="MyValueService">

<interface.java interface="services.myvalue.MyValueService"/>

</service>

<reference name="customerService">

<interface.java interface="services.customer.CustomerService"/>

</reference>

<property name="currency" type="xsd:string"/>

</constrainingType>

<component name="MyValueServiceComponent" constrainingType="myns:myCT”>

<implementation.bpel process=“..."/>

<service name=“MyValueService”>

<interface.java interface="services.myvalue.MyValueService"/>

<binding.jms .../>

</service>

<reference name="customerService" target="CustomerService">

<binding.ws ...>

</reference>

<property name="currency">EURO</property>

</component>

slide22

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

packaging and deployment domains
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
    • containscomponents, 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
packaging and deployment contributions
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

<contribution xmlns=http://www.osoa.org/xmlns/sca/1.0>

<deployable composite="xs:QName"/>*

<import namespace="xs:String" location=”xs:AnyURI”?/>*

<export namespace="xs:String"/>*

</contribution>

  • Interoperable packaging format: ZIP
  • Other formats possible: filesystem directory, OSGi bundle, JAR file
sca runtime example
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

slide26

Reuse in SCA

  • Inclusion
  • Recursive composition
  • Implementation reuse through configurable components
  • Reusable services through composite references
extensibility in sca
Extensibility in SCA
  • Designed for extensibility
  • Extensible artifacts:
    • Implementation types
      • <implementation.*>
    • Interface types
      • <interface.*>
    • Binding types
      • <binding.*>
assembly summary
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
slide29
Questions?

OpenCSA Member Section: http://www.oasis-opencsa.org/

Archived Presentations: http://www.oasis-open.org/events/webinars/

additions to consider
Additions to consider
  • Multiplicity
  • Overriding
  • Inclusion
  • Domain deployment ops (e.g. addToDomainComposite)