Composite Application Deployment with SCA Domain
The sample scenarios
A retail application is built using SCA. The application is developed and packaged as 3 contributions:
- Asset: The common interfaces such as Catalog, Cart, Total
- Store: The java implementation of Catalog, ShoppingCart and CurrencyConverter
- Store-Client: The store client implementation
Both Store and Store-Client have dependency (importing the interfaces) on Asset.
There are two deployable composites:
- StoreClient: It contains the StoreClient component with references to Catalog, Cart and Total
- Store: It contains the ShoppingCart, Catalog and CurrencyConverter components
The application will be deployed to different machines or JVMs:
- StoreClient: Run the store client
- Store: Run the store services
Illustration of an SCA domain
Add Assets, Store, and StoreClient contributions to the domain
We can build different ways to make contributions available to the SCA domain.
Parse the contributions
Resolve dependencies across contributions
We need to find out a collection of contributions to support a composite application based on the import/export statements
Find/Load/Resolve the composites from the contributions:
The assembly builders
The endpoints using SCA addresses or relative URIs should be resolved against the physical base URIs for the bindings based on the node configuration.
Deployable composites can be designated by the contributions. It's also possible that the assembler to define a deployment composite on the fly.
Configure two nodes to the SCA domain, one to run the StoreClient and the other for Store. The Store one requires WS, ATOM and JSONRPC
The node represents the computing capabilities in the SCA domain.
Assign a deployment composite to a node:
Run the composite application by a node
The deployable image of an SCA composite application to a node is the composite and a list of contributions to support the composite application.
Monitor and control the services running on a node
See what's going on, start/stop the services