[mnet-devel] config policy
Zooko
zooko at zooko.com
Sun Aug 17 20:57:36 BST 2003
1. Libraries and modules do not get a config file. Instead whichever code
*uses* the library or module passes configuration options in at runtime.
1a. Applications that end-users actually use get to have a config file.
2. Things that end-users shouldn't change unless they are Python hackers
should *not* be config file options -- they should be hardcoded constants
in ALL_CAPS at the top of the relevant .py file.
3. Algorithms should be designed so that they have as few "voodoo constants"
and "tweakable parameters" as possible. Once you have more than three or
so tweakable parameters, then you have a combinatorial explosion of
possibilities which means (a) you'll never understand how the algorithm
actually behaves in *general*, and (b) the vast majority of possible
combinations will never have been tested.
Also, if you need to add voodoo constants and tweakable parameters to make
your code perform well then this is a strong indication that your
underlying algorithm sucks.
In example, the final version of Mojo Nation had uncounted hundreds of config
variables. A functionally similar program that obeyed these policies should
ideally have less than a dozen -- three booleans to indicate whether you run
content tracker, relay server, or block server, plus an integer for MB to
allocate to the block server, plus bandwidth throttling settings, and an IP
address and port number override to enable firewalls tunnels.
There were more config policy statements that we had sort of informally agreed
on in an IRC discussion, but I can't find my notes. Anyone else want to jump
in?
--Z
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel
More information about the Mnet-devel
mailing list