Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColor#6699ff
bgColor#ffffff
titleBGColor#D5EFFF
titleApache Tuscany SCA Java Kernel Architecture Guide
borderStylesolid

This page is work in progress. Thanks for your contribution (smile)


 

Section

Anchor
Overview
Overview
Kernel Overview

This is a high level architecture document for Tuscany Java implementation of Service Component Architecture (SCA) which is defined in the specifications located at (http://wwww.osoa.org).

...

  • Infrastructure for creating, wiring, deploying and managing service assemblies in single runtime or across runtimes (federated)
  • Infrastructure for leveraging qualities of service provided by host environments (transactions, security)
  • Support for different host environments: Standalone, Tomcat, J2EE, OSG (in progress, more can be added)
  • plug-points for supporting variety of bindings such as Axis2, RMI, more can be added
  • plug-points for adding component implementations such as Java Script, Spring, JRuby, Python (started), more can be added

...

Anchor
Modules
Modules
Module Structure

[Note: Do we want to link to Kernel-Structure]?

As illustrated below, the Tuscany runtime consists of the following key modules/packages:

  1. SCA Spec API: The APIs defined by the SCA Java Client and Implementation Spec
  2. API: Tuscany APIs which extend the SCA spec APIs
  3. Core: The runtime implementation
  4. SPI: SPI and base classes to extend the Tuscany runtime. It defines all the contract that Core interacts with Container/Binding/Databinding extensions.
  5. Extensions:
    1. Container
    2. Binding
    3. Databinding
  6. Host API: The interface between hosting environments and the Tuscany runtime
  7. Host Platforms: The environments that host the Tuscany runtime

Anchor
Artifacts
Artifacts
Runtime Artifacts

  • Component
    • Basic unit of executable code
    • Offer services and have references
  • Service
    • A contract for component clients consisting of 0..n operations
    • Services may be local or remote
  • Reference
    • A dependency on a service
    • Component references are wired to services by the runtime

Anchor
Recursions
Recursions
Recursive Composite

Components may be Atomic or Composite

  • Composite components contain 0..n components
    Composite services are exposed over 1..n bindings (e.g. SOAP/HTTP, JMS, RMI)
    Composite references have 1..n bindings and may target
  • A service exposed by another composite
  • A service outside the SCA system, e.g. "Google search"
    A composite may contain just a service wired to a references (mediation) Clarify

Anchor
Kernel Wiring
Kernel Wiring
Wiring

Wiring

To understand how wiring works, we need to detail how Components function in the system. Let's start with Atomic Components and then discuss Composite Components.

...

The runtime provides components with InboundWires and OutboundWires. InvocationChains are held in component wires and are therefore stateless which allows for dynamic behavior such as introduction of new interceptors or re-wiring.

Anchor
Kernel Bootstrap
Kernel Bootstrap
Bootsrap

Bootstrap process is controlled by Host environment. The default process is implemented in DefaultBootstrapper.

...

Anchor
Kernel Composite Hierarchy
Kernel Composite Hierarchy
Composite Hierarchy

The sequence diagram for the bootstrapping

Anchor
Java SCA Deployment
Java SCA Deployment
Deployment

The runtime processes service assemblies serialized using SCA XML vocabulary, SCDL, but can take other forms.

  • The load phase processes SCDL and creates an in-memory model
  • The build phase evaluates the model and produces corresponding runtime artifacts (e.g. components, services, references)
  • The connect phase wires references to services

...

Anchor
Java SCA Loaders
Java SCA Loaders
Loaders

SCA service assemblies are deployed to the SCA domain in the format of SCDL files. Tuscany runtime uses loader to load the SCDLs into model objects which are a set of java beans to hold the metadata.

...

  • StAXElementLoader: Load the XML element from the StAX events
  • ComponentTypeLoader: Load the Component Type for an implementation either by introspection or paring a side file

...

Anchor
Java SCA model
Java SCA model
Model

Loading Component Type

Loads the component type definition for a specific implementation

...