You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Raymond Feng <en...@gmail.com> on 2009/09/25 20:10:12 UTC

[2.x] Determining SCA wire validity with policies (TUSCANY-3242)

When I investigate TUSCANY-3242, I realized that the matching algorithm [2] 
is NOT correct. The check against the size of the intents and policySets is 
bogus.

For an SCA wire, the endpoint reference and endpoint can be configured with 
interaction policies. Some of the intents are realized by policySets while 
the rest are natively supported by the bindings. Depending on the policy 
language, there can be different cases to apply a policy.

a. The policy can only be applied to references
b. The policy can only be applied to services
c. The policy can be applied to both references and services
     c.1: The policies on both sides are coupled and have to be compatible
     c.2: The policies on both sides can be enforced independently

Two players should be involved to check the compatibility of the policy 
configuration on the wired endpoint reference and enpoint:
* Binding (to handle the natively supported intents)
* Policy Language Provider (to check the compatibility of the policies in 
case c.2)

IMO, we should come up an ExtensionPoint that collects the Policy/Intent 
mappers which can be contributed from binding and policy language 
extensions. Thoughts?

I'll comment out the code in [2] so that I can use itest/policies to 
validate the policy builders I'm working.

Thanks,
Raymond

[1] https://issues.apache.org/jira/browse/TUSCANY-3242
[2] 
org.apache.tuscany.sca.endpoint.impl.EndpointReferenceBuilderImpl.haveMatchingPolicy(EndpointReference, 
Endpoint)

---
Raymond Feng
Apache Tuscany PMC Member: http://tuscany.apache.org
Co-author of Tuscany In Action: http://www.manning.com/laws
 


Re: [2.x] Determining SCA wire validity with policies (TUSCANY-3242)

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Sep 25, 2009 at 7:10 PM, Raymond Feng <en...@gmail.com> wrote:
> When I investigate TUSCANY-3242, I realized that the matching algorithm [2]
> is NOT correct. The check against the size of the intents and policySets is
> bogus.

It's a fir point about the size of the collections.

>
> For an SCA wire, the endpoint reference and endpoint can be configured with
> interaction policies. Some of the intents are realized by policySets while
> the rest are natively supported by the bindings. Depending on the policy
> language, there can be different cases to apply a policy.
>
> a. The policy can only be applied to references
> b. The policy can only be applied to services
> c. The policy can be applied to both references and services
>    c.1: The policies on both sides are coupled and have to be compatible
>    c.2: The policies on both sides can be enforced independently
>
> Two players should be involved to check the compatibility of the policy
> configuration on the wired endpoint reference and enpoint:
> * Binding (to handle the natively supported intents)
> * Policy Language Provider (to check the compatibility of the policies in
> case c.2)
>
> IMO, we should come up an ExtensionPoint that collects the Policy/Intent
> mappers which can be contributed from binding and policy language
> extensions. Thoughts?

I put a comment in the code to this effect but didn't get to doing
anything about it. It seems, for this post, that we need a binding
extension to work out which intents and policy sets are actually in
force and then a policy language extension to work out if the policy
sets that are in force are compatible between reference and service.

>
> I'll comment out the code in [2] so that I can use itest/policies to
> validate the policy builders I'm working.
>

ok

Simon