On Apr 8, 2011, at 6:42 AM, Markus Roberts wrote:

> Brice --
> 
> > This is a rather complex set of structural changes.  But to understand it 
> > you
> > really only need to grasp two key sections; the rest is cleanup.
> 
> Can you explain for people like me that didn't had time to try to
> understand the patch what it brings, how (roughly) the internals
> changed, and why it was needed?
> That'd be terrific (and in the meantime I promise I'll read the patch).
> 
> Sure.  Here's a rundown of the "features" that result:
> 
> 1) Stable ordering.  Changes in the definition or application of a resource 
> now will not change the ordering of any other pair of resources (apart from 
> changes that may be forced by new dependencies).  This eliminates post 
> deployment reordering of resource application; which means that catalogs  
> that worked in testing should work "the same way" when pushed to production.

To add a bit more info here:

In this upcoming release, resources that don't otherwise have relationships 
will apply in the same order consistently.

That order is essentially random, but that randomness is consistent across 
runs.  The actual order is determined by the sort order of the resource title's 
MD5, so you can't determine your own order but at least it won't change.

> 2) Sententials.  We're preparing some graphics to make this clearer, but it's 
> not to bad in words.  Instead of replacing containers with an edge from each 
> of the content nodes to all of the dependencies (which is a multiplicative 
> explosion with sibling containers and an exponential one with nested 
> containers) we replace them with a pair (think of open/close brackets) which 
> drastically reduces the "edge explosion" with nested classes, stages, etc.  
> This caused puppet to suck up all available ram and peg the cpu on certain 
> loads, and it won't do that anymore.

Currently as we switch from containment edges (e.g., classA contains resourceA) 
to dependency edges (e.g., classB requires classA), containment edges basically 
get multiplied by dependency edges.  This causes an explosion in edges and poor 
resulting performance.

This change adds some constructs to the graph (termed 'sentinals' here by 
Markus) that eliminate that multiplication, thus drastically reducing the edge 
count and also making it easier to model both containment and dependency edges 
at the same time.

> 3) Frontiers.  By dynamically determining the application order and 
> eliminating the topological sort we enable all sorts of dependency-aware 
> features (sub-states, external dependencies, eventual parallelism, etc.).  In 
> the process we cleaned up a number of subtle ordering bugs and created the 
> opportunity for more fixes on future passes.

This feature will allow us to do things like group package operations - we can 
collect all yum packages that have no other dependencies and group-install them.

-- 
Love truth, and pardon error.       -- Voltaire
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   http://about.me/lak



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to