This is a set of notes aimed at describing how we can update the Apache Tuscany Java SCA runtime to create an Endpoint structure to represent a configure reference or service binding.
Motivating mail thread http://www.mail-archive.com/dev@tuscany.apache.org/msg04531.html
Motivation
- The OSOA reference binding list was used to represent resolved/configured bindings which meant breaking the model to resolve references
- OASIS have a different approach to matching references/service so factoring out endpoint references/enpoints from references/services will allow a switchable algorithm to be deployed
- New policy model can use endpoint models as policy subjects
- Support late reference resolution
Scenarios
- Static domain - where all composites are present before nodes are started
- as now composites will automatically be configured with unwired bindings
- Incremental deployment - where nodes are started with composites before the domain is complete
- Endpoint logic will ask the domain for information required to resolve endpoint references with endpoints
- Service Location Transparency - a future scenario where nodes can be moved
- Endpoint/binding logic can again be used to ask the domain for new endpoint information
- Could just let each binding handle it but maybe some advantage to having the enpoint reference handle it by stopping/reconfiguring/starting the binding
- Dynamic Domain - in the future but some scenarios call for components to be reconfigured at runtime
- Endpoint reference and endpoint concepts focus the effort of adding removing wires
Overview
Model
Callback
Promotion
Endpoint and EnpointReference creation algorithm
|
EndpointReference |
Endpoint |
---|---|---|
Location |
Leaftmost component reference |
leaftmost component service |
Multiplicity |
One for each binding on a leaf reference + promoted references |
One for each binding on a service |
Interface |
From the reference |
From the service |
Binding |
If target then from service |
Binding on service |
Intents |
Sum of intents on references at all levels |
Sum of intents on services at all levels |
Policy Sets |
Use attached policy sets |
Use attached policy sets |
Results expected in itest/builder
Scenario |
CAS1 |
CBS2 |
CCS2 |
CDS3 |
Endpoints at CD |
---|---|---|---|---|---|
1 Binding |
binding.ws |
|
|
|
CD/S3/binding.sca |
2 Binding |
|
binding.ws |
|
|
CD/S3/binding.sca |
3 Binding |
|
|
binding.ws |
|
CD/S3/binding.sca |
4 Binding |
|
|
|
binding.ws |
CD/S3/binding.sca |
Scenario |
CAR1 |
CBR2 |
CCR2 |
CDR3 |
Calculated CDR3 |
---|---|---|---|---|---|
5 Binding |
binding.ws uri= |
X |
X |
X |
binding.ws uri= |
5 Interface |
|
|
|
|
|
6 Binding |
X |
binding.ws target=CBS2a |
X |
X |
binding.ws uri= |
6 Interface |
|
|
|
|
|
7 Binding |
X |
X |
binding.ws target=CBS2a |
X |
binding.ws uri= |
7 Interface |
|
|
|
|
|
8 Binding |
X |
X |
X |
binding.ws target=CDS3a |
binding.ws uri= |
8 Interface |
|
|
|
|
|
Scenario |
CAR1a |
CBR2a |
CCR2a |
CDR3a |
Calculated CDR3a |
---|---|---|---|---|---|
9 Binding |
binding.ws uri= |
X |
X |
X/target=CES3 |
Wire to CES3 binding.sca, binding.ws uri= |
9 Interface |
|
|
|
|
|
10 Binding |
X |
binding.ws/target=CFS3 |
X |
X/target=CES3 |
Wire to CES3 binding.sca, CFS3 binding.ws |
10 Interface |
|
|
|
|
|
11 Binding |
X |
X/target=CFS3 |
binding.ws |
X/target=CES3 |
Wire to CES3 binding.sca, CFS3 binding.ws |
11 Interface |
|
|
|
|
|
12 Binding |
X |
X/target=CFS3 |
X |
binding.ws/target=CES3 |
Wire to CES3 binding.ws, CFS3 binding.ws |
12 Interface |
|
|
|
|
|
13 Binding |
X |
X |
X |
binding.ws/target=CES3 |
Wire to CES3 binding.ws |
13 Interface |
|
|
|
|
|
Creation and Activation
Event |
Action |
---|---|
Create/Start Node |
Read Model |
Message through reference |
(if not resolved) EndpointReference resolution |
Service Not Available |
TBD - possible future event |
Add Service |
TBD - Possible future event |
Remove Service |
TBD - Possible future event |
Action |
Description |
---|---|
Read Model |
read composite file into in-memory model |
Resolve Model |
resolve composite against other artifacts in the composite and domain |
Build model |
create the appropriate relationships between parts of the model bases on SCA validation rules, Inludes:
|
Activate Runtime |
Create the runtime infrastructure. Includes:
|
Start Runtime |
Start all runtime providers |
EndpointReference resolution |
Locate the services that endpoint references refer to |
Build Reference Chains |
use the wire configuration to build the runtime interceptor chains |
EndpointReference States
State |
EndpointReference |
Endpoint |
---|---|---|
Wired - service specified but unresolved |
unresolved |
unresolved |
Wired - service resolved - binding not matched |
resolved |
unresolved |
Wired - service resolved - binding matched |
resolved |
resolved |
Unwired |
resolved |
resolved |