MartinoMensio / DP2-Labs

Distributed Programming 2 Laboratories @ Polytechnic University of Turin
MIT License
1 stars 0 forks source link

policies placement #4

Closed MartinoMensio closed 7 years ago

MartinoMensio commented 7 years ago

Policies should be placed inside each NFFG or stored apart? Read the javadoc

MartinoMensio commented 7 years ago

If policies are outside NFFG element, how to specify the keyref selector to src and dst? I would need to filter by using the correct NFFG (retrievable by name), because one NFFG has a different scope for node names and the keyref must refer to the right NFFG.

<xs:keyref name="policy_src_keyref" refer="node_key[@name=right_nffg_name]">
    <xs:selector xpath="policy/src" />
    <xs:field xpath="@ref" />
</xs:keyref>

But this is impossible (?) to do in practice.

Instead if the policy is kept inside the NFFG, the implementation is straightforward.

To follow exactly the specifications, I only need to make a global scope for policy names. This has to be done in order to deny the existence of two policies with same name, also if they belong to different NFFGs.

MartinoMensio commented 7 years ago

I leave the policies inside the nffg element. This reduces data redundacy, since the name of the nffg elements does not need to be repeated inside the policies. I only need to move the key up in the root scope