[TransWarp] PROPOSAL: rename Local->App, Global->System in peak.config

Phillip J. Eby pje at telecommunity.com
Thu Mar 6 23:10:32 EST 2003


After my recent attempts to explain how the peak.config configuration 
hierarchy works, it has occurred to me that some of the concepts are 
perhaps named badly.  :)

'peak.config' has a notion of a "local" configuration component, and a 
"global" configuration component.  But my recent attempts to explain this 
have shown that these names are too vague as to the intended scope of what 
"global" and "local" are.

In the absence of better ideas, I propose to rename the "local" 
configuration to "App" configuration, and the "global" configuration to 
"System" configuration.  Thus, for example, 'config.getLocal()' would 
become 'config.getAppConfig()' and 'config.getGlobal()' would become 
'config.getSystemConfig()' respectively.

An "application config" object represents configuration for an application, 
which is composed of one or more "root" components.  There is a default 
"application config" that is used for all root components unless you create 
and register an "application config" for a specific root component.  Any 
root component which has not had an app config explicitly registered for 
it, uses the default app config.  You may replace the default app config 
object with a custom app config object, so long as the PEAK-supplied 
default has not yet been used.

Only one "system config" object exists per Python interpreter; an 
application may replace this object with a custom "system config", so long 
as PEAK's default system config object has not yet been used.  The "app 
config" objects are all child components of the "system config" object, and 
so fall back to it for any configuration data that they have not 
specifically defined themselves.  That is, the "system config" supplies the 
default configuration for all application configurations, and thus the 
default for all root components.

The two preceding paragraphs have "always" been true of the way the config 
system works, but it was harder to explain before now.  :)  Thus, I propose 
to rename all of the 'peak.config' APIs and classes dealing with the 
application-level or system-level configuration components, so that they 
reflect the idea of "app" and "system" rather than "local" and "global".

Comments, questions, or objections, anyone?




More information about the PEAK mailing list