Re; Upstart 0.5 Roadmap
Claes H
claesatwork at gmail.com
Wed Oct 31 18:50:22 GMT 2007
On 10/30/07, Rob Ubuntu Linux <rob.ubuntu.linux at googlemail.com> wrote:
> For example, why should run time scripts have to parse config files,
> provided to tweak other packages, rather than lookup up the values
> maintained in a standard place?
That is a very good point. This discussion reminds me of the
Dependency Injection pattern in OO programming. The script that does
"the job" should not be the same script that parses the configuration
files that defines what should to be done. Instead the worker job
should be passed these values when they are started and act upon them
without caring where the configuration came from. If jobs are split
in parts like this, it will be easier to change how configuration is
managed. It could come from text files in various formats, or from the
network, or from a database, doesn't matter. Define a data structure
to represent all configuration, make "worker" jobs declare what
configuration they depend on, make "configuration provider" jobs
declare what configuration they can provide, and use upstart to make
sure that worker jobs gets their configuration handed over prior to
starting.
Claes
--
C l a e s H o l m e r s o n
More information about the upstart-devel
mailing list