Thanks so much for the reply, Ashley!

It's interesting that you brought up the example of the "package" provider.
 I brought that one up internally as a well, because it seems like it has
some of the same challenges.  The package type currently has some
parameters that are only relevant for specific providers, and to some
degree it feels to me like that lessens the luster of the unified type,
because you might still end up with the same problem that you're describing
where if you need to migrate from one provider to another, you may still be
forced to tweak your manifests to account for the provider-specific details.

I guess the flip side of that coin is that without the unified type/model,
you are *guaranteed* to need to deal with this implementation-specific
stuff; whereas *with* the unified type, you are only *probably* going to
have to deal with provider-specific stuff.  :)

Thoughts?

Thanks again for the helpful feedback.

On Fri, May 25, 2012 at 11:49 AM, Ashley Penney <[email protected]> wrote:

> I would vote in favor of a single module with multiple providers.  As
> Puppet grows up and becomes more powerful I think this model is going to
> become more common anyway - once you move beyond basic modules you start
> relying on more and more functions and "real code".  The pool of people who
> are likely to contribute to community modules like these are the people
> that will either already use these more advanced features or will be
> interested in moving in that direction anyway.  I think the number of
> people who would contribute to a per database module but not a provider is
> relatively small and it is better to provide the best solution rather than
> the one that snares the most people.
>
> I'm mostly basing my experiences on the puppetlabs-firewall module.  I
> recently attempted to add pkttype to the provider and was able to get it to
> the stage that the tests pass and the code seems to work.  Anyone who knows
> me from #puppet knows that if I can stumble my way through this then so can
> the majority of puppet users.
>
> The other reason I vote in favorite of a generic database module is
> because it's much easier to support in other forge modules.  Nothing is
> more difficult than trying to make a module that works with three different
> database modules, all of which have different names for similar
> functionality as they've become closely entwined with their database of
> choice.
>
> We don't have different package{} resources for each kind of package and
> the same logic applies here.  The more we can abstract away the easier it
> is to build modules that can be used in a variety of environments without
> telling end users "Well sorry, you'll have to go through and replace all
> the database stuff with the way the postgres module handles adding users.
>
> So yes, it's definitely harder and puppetlabs will probably end up
> carrying more of the load of building this module up front than you would
> with database specific ones, but the benefits are definitely worth it.
>
> On Fri, May 25, 2012 at 1:44 PM, Chris Price <[email protected]> wrote:
>
>> Hey folks,
>>
>> I'm surveying the landscape of existing puppet modules that have to do
>> with relational database functionality.  I've talked with a few folks now
>> and it seems like there is a fairly broad range of opinions on what "ideal"
>> would look like w/rt managing rdbms with puppet.
>>
>> At one extreme, there is the opinion that each RDBMS should have its own
>> specific puppet module... so, one module for mysql, one for postgres, one
>> for sqlite, etc.  With this approach, the possibility exists that there
>> will be redundant code and divergent models from one module to the next.
>>  However, depending on how much functionality the module is trying to
>> provide, it's entirely possible that this divergence is inevitable (because
>> the deeper you get into an individual database server, the more their
>> implementation and behaviors differ).
>>
>> An obvious upside of this approach is that module authors and
>> contributors don't need to worry about implementation details of *other*
>> rdbms's.  If you know mysql and you want to contribute to the mysql module,
>> you can just do it.
>>
>> At the other end of the spectrum is the idea of having a sort of
>> uber-module for rdbms; this would contain some defined types that were
>> meaningful across several rdbms platforms, and providers for each supported
>> rdbms.  The main upside of this approach would be that it would be easy to
>> switch between your choice of rdbms by simply toggling a parameter in your
>> manifests.  Another upside would be the ability to share common code /
>> logic where applicable (and hopefully including a lot of the test logic,
>> meaning that all implementations would be more thoroughly and consistently
>> tested).
>>
>> The biggest downside here would be that the barrier to contribution would
>> be a bit higher; if you wanted to add a feature for a specific rdbms
>> instance, you'd potentially need to consider how the other several rdbms
>> providers would cope with this new feature.
>>
>> There are obviously some intermediate options in between those two
>> extremes.  At the moment, I think that I'm reasonably convinced that the
>> barrier to contribution to the modules is the most compelling variable in
>> this equation, and thus I'm leaning towards just keeping the modules
>> separated and isolated... though I'm struggling with the decision to give
>> up the possibility of re-usable test logic between the modules.
>>
>> Would love to hear any ideas, suggestions, thoughts that anyone has on
>> the topic!
>>
>> Thanks
>> Chris
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Developers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-dev?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>

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

Reply via email to