Hi,

I'm working on the policy matching between an EndpointReference and an Endpoint. Thinking in a big picture, the following is a list of things we have to deal with. I hope we can further refine our code as part of this exercise.

1. Check if an endpoint is a suitable target for a given endpoint reference
   a) Check the compatibility of interface contracts
       * InterfaceContractMapper
b) Check the compatibility of policy configurations (intents and policySets)
       * PolicyBuilder?  (I'm trying to come up some SPIs here)

2. Find the local target endpoint during build phase
   * EndpointReferenceBuilderImpl
a) via @target (look up an endpoint in the same composite that matches the structural URI) b) via autowiring (look up an endpoint in the same composite that is compatible)

NOTE: the current implementation looks up the target component/service and create endpoints out of them. I think we should match against the existing endpoints and (we set the matching endpoint as the "targetEndpoint" attribute of endpoint reference).

3. Bind an endpoint reference to an endpoint in the EndpointRegistry (if the endpoint reference uses an SCA URI)
   * EndpointReferenceBinder
* There is no binding configured on the reference (get the binding configuration from the endpoint)
       * There is a binding configured on the reference

NOTE: 2 and 3 will follow the same criteria to find the matching endpoint(s) for a given endpoint reference.

4. Create an endpoint reference from the endpoint (ComponentContextImpl)
   * Lookup a service proxy (or ServiceReference) from the Node API
   * Create a service proxy for SCA client API

Thanks,
Raymond
---
Raymond Feng
Apache Tuscany PMC Member: http://tuscany.apache.org
Co-author of Tuscany In Action (A book on Tuscany SCA): http://tuscanyinaction.com/


Reply via email to