The Metapolicy Service Mobile Agent must be made aware that an action is executed which can change the state of objects. The decision for the approach implemented is founded by the following considerations using the alteration of a policy object as an example. Various possibilities exist to realise the observation:
An advantage of this is that no changes to the system are necessary such as introducing a modified flag or changing methods like in the following suggestion, because an external agent could monitor this independently. A disadvantage is the need for an additional component in the system.
This differs from the one before in that the state of modification of a policy is somewhere explicitly noted, e.g. in the agent, or by an (extra) attribute of the policy.
The advantage over the first method is the fact that the state lives longer than the event. Components which are not able to receive the event due to a failure of transmission or just due to the fact that the components are not started can check the state of the policy on their own. A disadvantage of this method is clearly the fact that the state of the policy must be stored somewhere. Using this mechanism could result in changes of the agent or policy, which makes it very expensive to add other state variables. Reduced flexibility may result from this.
Here, no additional components are necessary, but each program or method which changes a part of the policy is responsible to produce a notification. If changes are only possible through one API, which would be not a massive restriction, only the methods implementing this API must be adjusted. In case of the NoCScontrol the parameters are almost always typed as strings making the invocation of a special method easy. Due to the small numbers of public methods, this approach is feasible. The integration of a proxy mechanism for a large existing system may be a better solution in this case.
The third possibility was chosen due to its advantages and the disadvantages of the others. The notifications are realised with the help of events.