The primary goal of the PolicyEngine is to encapsulate the potential complex computation of the TransitionGraph from the CurrentClusterState.
The PolicyEngine does not do any network IO, it only runs this algorithm.
The ClusterResourceManager starts the PolicyEngine on demand, or when becomes DesignatedCoordinator.
The PolicyEngine starts up and signs in with the ClusterResourceManager. This stage verifies the version numbers et cetera.
The PolicyEngine waits for orders from the ClusterResourceManager.
Either a ClusterInformationBase dump requesting a computation of a transition graph.
The answer is sent back to the ClusterResourceManager.
In case of the shutdown request, this message signs us out from the ClusterResourceManager.
Otherwise, we sent back the TransitionGraph.
To ease testing, the PolicyEngine shall have a commandline mode which only reads the ClusterInformationBase dump from stdin and outputs the TransitionGraph on stdout.
AndrewBeekhof: It would be nice if we could give you a ClusterInformationBase dump (possibly minus StateInformation) and the PolicyEngine gave a yes or no answer as to whether it was solvable/valid. We could then decide if an AdministrationUpdate was ok to apply to the ClusterInformationBase.