Panel |
---|
borderColor | #6699ff |
---|
bgColor | #ffffff |
---|
titleBGColor | #D5EFFF |
---|
title | Apache Tuscany SCA Java Kernel Architecture Guide |
---|
borderStyle | solid |
---|
|
This page is work in progress. Thanks for your contribution
|
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
...
Module Structure[Note: Do we want to link to Kernel-Structure]?
As illustrated below, the Tuscany runtime consists of the following key modules/packages:
- SCA Spec API: The APIs defined by the SCA Java Client and Implementation Spec
- API: Tuscany APIs which extend the SCA spec APIs
- Core: The runtime implementation
- SPI: SPI and base classes to extend the Tuscany runtime. It defines all the contract that Core interacts with Container/Binding/Databinding extensions.
- Extensions:
- Container
- Binding
- Databinding
- Host API: The interface between hosting environments and the Tuscany runtime
- Host Platforms: The environments that host the Tuscany runtime
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
Recursive CompositeComponents 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 |
---|
|
WiringWiring
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 |
---|
|
DeploymentThe 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 |
---|
|
LoadersSCA 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
...