On Wednesday, July 10, 2013 9:03:02 AM UTC-5, Trevor Vaughan wrote:
>
> Just out of curiosity, has anyone done a performance analysis on moving to 
> the Anchor -> Class dependency structure?
>
> Since these classes are small, it shouldn't be *too* bad but I can see 
> issues with using this pattern blindly in terms of memory usage and catalog 
> size/transmission size.
>


I don't know about performance, but there are worse problems than that 
associated with blindly using anchors.  In particular, if two or more 
different classes anchor the same third class into themselves, then there 
is a significant risk of creating dependency cycles.  All you need beyond 
that is a direct or transitive relationship between any two of the 
containing classes.

This is not an issue for the NTP module because module users are supposed 
to declare only the front-end class "ntp", not the internal classes.  The 
whole point, however, is that anchoring classes is not always the right 
thing to do.  In fact, I think that can manifest in a single class, in that 
it may be appropriate for some classes to anchor some of the other classes 
it declares into itself, but not others.

As usual, it is all about modeling.  Anchoring class B into class A 
effectively says "class B is *part of* class A".  If the truth is that 
class A merely relies on class B, then anchoring is inappropriate.

I think Trevor recognizes it, but to be clear: the real question is not 
whether to anchor or not, but whether to implement modules with fewer, 
larger classes or more, smaller classes.  With a given set of classes, 
anchoring is a correctness issue, not a performance issue.  Breaking up 
classes into collection of smaller classes tends to create a need for 
anchoring, however, and with Trevor, my suspicion is that that will tend to 
reduce performance (and increase resource consumption).  How much of an 
impact that might be, however, I cannot say.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to