Puppet: System Administration Automated

My Submission to RubyConf


This is a post from Luke's old blog; it is saved here statically for historical purposes, as of October 2008

I've once again submitted to RubyConf, but I've decided to skip much mention of Ruby, since I was getting no traction there. Instead, I've decided to try to get a talk accepted on how I manage Puppet's model. Here's the short abstract:

Model-based programming is based on constructing a model that matches reality, but Godel has shown that for sufficiently complex systems the model can never quite match reality. Viewing model-matching as a constant, fractal process rather than a static fit provides more flexibility in modeling and thus informs both design and ongoing maintenance of the model. This talk uses the model of Puppet, a server automation tool, to demonstrate how model refinements are always fractal and even at best cannot completely model reality.

And the long abstract:

One of the most important mathematical theorems of the 20th century is Kurt Godel's Theorem of Essential Incompleteness, which proved that the real numbers are incomplete, meaning that there are true but unprovable statements in them. This proof immediately and drastically changed mathematics, because mathematicians had to come to terms with the fact that the real numbers did not perfectly model reality -- if they did, then you could use them to arrive at any valid statement in reality. Where mathematicians were previously treating the real numbers as a perfect model, their theorems now had to take the imperfection of the model used to create those same theorems.

A more general form of Godel's theorem, rephrased to better suit programming, is that any model of a sufficiently complex system contains valid but unreachable states. You cannot hope for a perfect model, and assuming that you can will only result in missed deadlines and plenty of pain. While Godel in some ways presents a limitation, seeing the limitation can itself be powerful as long as we treat it appropriately.

Thankfully, most programming models are not sufficiently complex to be subject to Godel -- in particular, Godel's proof requires some support for self-reference. Unfortunately for me, the system that Puppet is meant to model is sufficiently complex, because it is meant to model and manage the full range of configuration possibilities on a network of arbitrary numbers of operating systems, services, and any other aspects.

It's immediately clear that this model is complex, but understanding that this model is actually impossible to entirely model -- according to Godel -- gives us the power to understand that our real problem is not modeling the system but building a process for managing our model so that it can always be refined as we get more data. Knowing that we will never perfectly succeed frees us from seeking perfection in the first place.

This model-finding process, enabled by the impossibility of success, becomes fractal and asymptotic. We can continually refine pieces of it, and with each refinement the model becomes higher-resolution and better approaches reality. Because I have retained flexibility in how I define Puppet's model, it has been able to change to reflect our better understanding of the system it is meant to model, and it can even respond to changes in that system. If I had somehow convinced myself that it was possible to achieve completeness in my model, then I would either be stuck seeking perfection yet accomplishing nothing or being convinced that the current solution is already complete, either of which would quickly leave me behind.

This talk will provide a high-level view of how Godel has enabled refinements of Puppet's model over the years, with some pointers for how your own modeling can be made both more flexible and more powerful by acknowledging its essential incompleteness.

I expect I'll get the same response as before, since the Ruby world doesn't know me from Adam and doesn't seem to care one way or another that I've got a large, interesting project written in Ruby, but I figure taking a different tack can't hurt.

add to del.icio.us Add to Blinkslist add to furl Digg it add to ma.gnolia Stumble It! add to simpy seed the vine TailRank post to facebook

Mon, 20 Aug 2007 | Tags: , , , ,