Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Panel
borderColor#6699ff
bgColor#ffffff
titleBGColor#D5EFFF
titleA quick guide to SCA
borderStylesolid

Purpose of this guide is to help you understand the high level concepts in SCA so that you can build a simple application. For more details on SCA please refer to the various specifications available at www.osoa.org.

Section
Column
width50%
Column
width50%

 

Section

Anchor
what is SCA
what is SCA
What is SCA?

SCA is an executable model for assembly of services into business solutions. It simplifies component programming model for implementation of business services that can be implemented in any language. The key benefits of SCA are:

...

Now let's get into description of SCA building blocks.

Anchor
sca component implementatino
sca component implementatino
SCA Component

...

Provides the code necessary to execute a component
Support for different implementation technologies, samples are
Java class
BPEL Process Definition
PHP script
SCA Composite (recursive composition)
Declares SCA visible and configurable features
Services provided
References to required services
Properties required
Policy Intents required
Maybe used and configured by multiple components
Services and References are typed by Interfaces

Implementation

The basic building block for SCA is a component implementation. When you're writing code for SCA, you are typically writing code that will either be the implementation of a component or will be used by such an implementation. A component implementation is described by the following attributes:

  • Services: This describes the function this type of component provides
  • References: This describes the dependencies this type of component has in order to function
  • Properties: This defines configuration parameters for this type of component. This that can controls how the component program logic can behave. For example, what currency to use.
  • Intent Intents or policies: This describes assumptions on how it will be used, for example security is a policythe component will behave. There are two types of policies.
    • Implementation policy- Impact the behavior of an implementation. For example, transaction, monitor and logging
    • Interaction policy - defines how the components behave with one another. For example, security.

A typical component implementation can be illustrated as:

The implementation of a component can be in any language that is suitable for the user, for example BPEL for business processes or XSL-T for transformations or Ruby for scripting or pure Java. How the services, references, properties and intents are defined for an implementation is specific to that particular implementation type.

Anchor
sca component implementatino
sca component implementatino
SCA Component Implementation

(lightbulb) A component implementation is the business logic. A component is an instance of a configured component implementation. More than one component can use the same implementation. A component lives in a composite that is described next.

Anchor
sca composite
sca composite
SCA Composite

Individual components like those above can be used on their own, or they can be grouped together to form in a composite components. A composite is a type of component whose implementation is not code but an aggregation of other one or more components co-operating to provide Services as a whole. Think of composite as a solution, for example credit check composite. A composite can also be used within a larger solution, for example credit check can be part of a order processing composite. A composite has the same charactersitics as a component. It provides Services, has References to other dependencies, and can be configured using Properties and can have intent policies in just the same way as an individual components can. In the example below, you see a calculator composite which consists of 5 components, a calculator service has references to four components:Add, Subtract, Multiply and Divide.

The typical implementation of a composite is described using XML defined by the SCA Assembly Specification (known as SCA Component Definition Language or SCDL).
Image Removed

...

Image Added
(lightbulb) The assembly or wiring is defined in .composite file through Service Component Definition Language (SCDL). For example, calculator.composite would define that calculator component references the other four components.

Anchor
sca
Anchor
sca domain
sca domain
SCA Domain

The implementations of components above, either individual or composite, all form reusable units that can be run multiple times in different environments (in much the same way as you have multiple instances of a Java class). A composite, with its configuration information, gets packaged into a deployable unit called a contribution which gets contributed to the domain. Artifacts may be shared between contributions, for example Java classes, XSD files, WSDL files,etc.

An SCA Domain represents a complete runtime configuration, potentially distributed over a
series of interconnected runtime nodes. A component or composite becomes Domain configuration is the overall configuration for service dependencies, properties, policies. A domain is a logical view of the running applications or a coherent grouping of components that are working together, connected to each other using SCA wiring. A composite gets instantiated when it is actually used in an SCA environment. This is done by using it as part of the assembly of an SCA Domain.

SCA Domains can vary in size from the very small to the very large:

  • a very small domain could be one within a test environment inside an IDE
  • a medium sized domain could be a single server or small cluster supporting a single application
  • a large domain could describe all the services within a department or company

A domain is a logical view of running applications or a coherent grouping of components that are working together, connected to each other using SCA wiring. In a large domain there may be all sorts of policies about where components can run and how they connect to each other or to external services. However, during development one is not concerned with all this. The code is packaged and made available for deployment. Tuscany provides some build-time tools to help with packaging. For example, a war Maven plugin to package a self contained web application.

place holder for text

SCA Java supports contributions in the form of JAR or filesystem.

Below is an example of domain with two contributions.
Image Addedyou develop an app and package it as a contribution. The app may consist of one or more composites.
Contribution is an installable piece. So, you then install the contribution and then activate the deployed composites in the contribution. The SCA domain is the logical view of running applications that can span multiple SCA runtimes.