...
- Represent the widely distributed nature of a typical SOA so that SCA presents a cross enterprise description of assembled components
- Support policy matching where components require particular resources and hence particular, and separate, nodes
- HA/Load balancing/Performance scenarios where a single component appears on multiple nodes
- Load balancing/Performance scenarios where domain is spread across multiple nodes (same as 1 & 2 I believe)
- Dynamic wiring/Registry based service location, i.e. the SCA binding is called upon to automatically locate services based on registry entries.(overlaps with all of the above)
Terminology
See http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Terminology
Scoping The Distribution Problem
...
So the initial area of consideration is how the components of a domain are associated with runtime nodes (2).
Cardinality
In the non-distributed case a single runtime node loads all contributions and runs all components.
In the distributed case, A Domain may span many nodes.
...
Answer: Yes. Multiple Domains can run on the same runtime. It is up to the runtime implementation to ensure that appropriate partitioning is achieved, since SCA Domains are intended to be isolated (for example, a reference in one domain cannot directly reference a service in another domain through it SCA component & service names).
Scenario - Simple Distributed
...
Components
Scenario - Web Application Cluster
A more specific scenario where a distributed domain is used to support an application within a web application configured as a cluster.
In this basic scenario a number of composites are started across nodes from the command line and once they are all started messages are send through the application
Demonstrates: the sca binding and service resolution within the domain.
Scenario - Standalone Node
Composites are added to the node through the node API and the node is started.
Demonstrates: Resolution of wires across composites with a single node
Scenario - Nodes Connected To A domain
Composites are added through the node API and each node is started
Demonstrates: Compilation of a domain view of the application as composites are started on nodes
Scenario - Nodes Running in a Web App
Nodes started in web apps run the composites from those applications and registers them with the domain
Demonstrated: Compilation of a domain view of the application a web apps are run
Scenario - Virtual Node
A node is associated with a domain that doesn't have a tuscany runtime.
Demonstrates: Ability of Tuscany domain to include components/services that are not running on an SCA runtime.
Scenario - Domain Adding Nodes
A node is started and it becomes part of the domain ready to run composites
Managing The Distributed Domain
Th logical view of how the different parts of the solution communicate is.
Messages - the application messages that flow between configured components. Messages will flow over bindings described excplicitly in the assembly model or across the default binding used when no explicit binding is specified.
...
Based on the calculator scenario can imagine the following.we can take a general view of how the domain organizes running application
Note that the assumption here is that there is a central process that represents the node and a proxy in each node that provides a window on the domain from that node/JVM.
However there are a number of specific configurations to consider which affect the way that configuration and events are distributed.
Domain Driven
Node Driven
Stand Alone Node
Remote Domain Control
APIs
SCADomainFactory
SCADomain
...
- public String getURI();
- public SCADomain getDomain();
- public void addContribution(String uri, URL url) throws DomainException;
- public void removeContribution(String uri) throws DomainException;
- public void addToDomainLevelComposite(QName compositeQName) throws DomainException;
- public void removeFromDomainLevelComposite(QName compositeQName) throws DomainException;
- public void startComposite(QName composite) throws NodeException;
- public void stopComposite(QName composite) throws NodeException;
- public void start() throws NodeException;
- public void stop() throws NodeException;
- public void destroy() throws NodeException;
...