INTRODUCING SCA

18
INTRODUCING SCA Byungwook Cho ([email protected]) Nov.2007

description

INTRODUCING SCA. Byungwook Cho ([email protected]) Nov.2007. AGENDA. 1. SCA. 2. SCA Fundamentals. 3. Understanding Component. 4. Understanding Composite. 5. Using Policy. 6. SCA Implementation. 7. Example : Apache Tuscany. 1.SCA. Service Component Architecture - PowerPoint PPT Presentation

Transcript of INTRODUCING SCA

Page 1: INTRODUCING SCA

INTRODUCING SCAByungwook Cho ([email protected])Nov.2007

Page 2: INTRODUCING SCA

AGENDA

SCA1

SCA Fundamentals2

Understanding Component3

Understanding Composite4

Using Policy5

SCA Implementation6

Example : Apache Tuscany7

Page 3: INTRODUCING SCA

1.SCA

• Service Component Architecture– Define “A way to create components and a mechanism for describin

g how those components work together”– Owned by OASIS– Created by BEA,IBM,Oracle,SAP and others

Page 4: INTRODUCING SCA

2.SCA Fundamentals

• COMPONENTS AND COMPOSITES– SCA application is built from one o

r more components– Components

• Fundamental building block in SCA• can be implemented as Java class

es, others written in C++, others defined in BPEL etc.

• Components can be run in one or more processes in one or more machines

– Composite• Specifies how those components

can be combined into larger structures

• Described in configuration file named SCDL(Service Component Definition Language-”skiddle” / *.compositefile)

SCDL

Page 5: INTRODUCING SCA

2.SCA Fundamentals

• DOMAINS– Runtime

• SCA Container– Domain

• SCA runtimes provided by single vendor and managed by single group.

• It is similar concept with WLS or Tuxedo domain• A domain can contain one or more composites, each of which

has components implemented in one or more processes running on one or more machines.

Inter-domain communication

Page 6: INTRODUCING SCA

3.UNDERSTANDING COMPONENTS

• SERVICES– Components implements some biz logic, exposed as one or

more services.– Provides some number of operation that can be accessed by

the component’s client– Can be provided in technology that’s used to implement

comp.• Java Component / Java Interface• BPEL / WSDL

Page 7: INTRODUCING SCA

3.UNDERSTANDING COMPONENTS

• Defining ServicesRemote Service (Can be called local or remote client)Must specifty “binding”

Local Service (Can call from in same process)

Page 8: INTRODUCING SCA

3.UNDERSTANDING COMPONENTS

• REFERENCE– A component might rely on other services provided by other compon

ents in its domain or outside its domain.– Define an interface containing operations that this component need

s to invoke– Advantages

• Express component’s dependency.• Allow Dependency Injection. (cf. DI in spring framework)

• PROPERTIES– Contains value that can be read by SCDL config file.– Example)

• Locale,Currency

Page 9: INTRODUCING SCA

3.UNDERSTANDING COMPONENTS

• BINDINGS– Define how communication happens between Service &

reference– In same domain, component might or might not have

explicitly specified binding. (runtime determines binding)– To communicate outside its domain, component must be

specified one or more bindings for communication.

Page 10: INTRODUCING SCA

4.UNDERSTANDING COMPOSITE

• COMPOSITE– Component is “atom” of SCA, Composite is “molecule” of SCA– Composite group components into useful combinations.– It can be further combined.– Component in composite might be run in same proccess,in different process on a singl

e machine ,or in different processes on different machine.• WIRES

– Wire is abstract representation of the relationship between reference and service. • PROMOTION

– Service of composite– Just component expose services or references , a composite can also expose one or m

ore services or references

PROMOTION

WIRE

PROMOTION

Page 11: INTRODUCING SCA

4.UNDERSTANDING COMPOSITE

• CONFIGURING COMPOSITE– All of relationship in a composite are expressed in SCDL conf.– ‘autowrire’ attribute

• Indicate that the SCA runtime should automatically attempt to connect services and references defined by the components.

– ‘wire’ element• Define explicit wires between components

Promote Component1 / Service A as a service of this composite

Promote Component2/ Service T, Component3/U as references of this Composite

autowiring

autowiring

Page 12: INTRODUCING SCA

5.USING POLICY

• POLICY– To remove complication in interaction between parts of distributed

application. Make things more manageable is to let developers user policies to specify their intent. To support this SCA provide SCA framework

• SCA Framework Category– Interaction policies

• How a component interacts with other components• Security, Reliable messaging• Applied to ‘bindings’

– Implementation policies• How a component behaves locally.• Transaction (* SCA 1.0 doesn’t define transactional policy)

• SCA Framework– Policy can be declared in SCDL.– For Java SCA components, policies can also be defined using

annotation.– SCA doesn’t define how policies should be described within a

domain.– Between domains, policies can be specified in vendor-neutral

form using WS-Policy.

Page 13: INTRODUCING SCA

6.IMPLEMENTING SCA

• SCA IMPLEMENTATION– SCA runtime might provide a number of container

s, one for each component technology it supports.

– SCA runtime provides all bindings, allowing components created using any technology to use any available binding.

• JBI– Java Business Interface– Make public interface between runtime & contain

er. – Allow 3’rd party to create their own containers

• OSGI– SCI runtime can be implemented by OSGI– OSGI defines how to package code into bundles,

and while it’s also java-only,some creators of SCA runtimes might allow extensions such as a new binding to be added as an OSGI bundles

• Tools– SOA Tools platform project

• Create SCA-based development tools for eclipse

JBI

Page 14: INTRODUCING SCA

7.Example : Apache Tuscany Impl

• Apache store SCA application

Page 15: INTRODUCING SCA

7.Example : Apache Tuscany Impl

Catalog.java

CatalogImpl.java

service

component

reference

properties

SCDL

service& binding

Page 16: INTRODUCING SCA

7.Example : Apache Tuscany Impl

• Composite

Page 17: INTRODUCING SCA

REFERENCE

• Reference– July.2007, David Chappell, Introducing SCA.

• Reference Implementation– Apache tuscany : incubator.apache.org/tuscany/ – Fabric3 : incubator.apache.org/tuscany/

• SCA tools– http://www.eclipse.org/stp/

• OSGI– http://www2.osgi.org/Specifications/HomePage

• JBI– http://jcp.org/en/jsr/detail?id=208

• For more– Various binding types

• Hessian,Burlap,ATOM,REST,RSS,Json rpc,dojo

Page 18: INTRODUCING SCA

Thank you !!Our team blog : http://dev2dev.tistory.com