AGENDA
SCA1
SCA Fundamentals2
Understanding Component3
Understanding Composite4
Using Policy5
SCA Implementation6
Example : Apache Tuscany7
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
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
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
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
3.UNDERSTANDING COMPONENTS
• Defining Services
Remote Service (Can be called local or remote client)Must specifty “binding”
Local Service (Can call from in same process)
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
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.
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
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
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.
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
7.Example : Apache Tuscany Impl
• Apache store SCA application
7.Example : Apache Tuscany Impl
Catalog.java
CatalogImpl.java
service
component
reference
properties
SCDL
service& binding
7.Example : Apache Tuscany Impl
• Composite
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
Thank you !!Our team blog : http://dev2dev.tistory.com
Top Related