Data structures and methods in cfengine
These pages are being written, please be patient.
This part of the documentation is about the key, important structures and methods in cfengine. They are being documented here so that they may be understood independently of the current implementation. Since we are developing cfengine version 3, these are features that must be reproduced and improved upon in the new version.
The model on which cfengine is based is one of states and operations. In a simplistic sense, cfengine is a state machine -- a push-down automaton with some special properties.
Policy, in cfengine, is a specification of the desired states {qp} of the system. The cfengine model is one of states q and operations O. Basically, a cfengine action is represented by an operator. It takes the system in one state q to a system in another state q':
O q -> q'
Ideally, q' is the state that agrees with policy, i.e. q' = qpolicy. This is possible if the operation succeeds.
Cfengine is built from convergent operations, meaning that operators should have the property:
O q -> q'
O q' -> q'.
For a discussion on the difference between convergence and idempotence, see Analytical Network and System Administration, Mark Burgess.