Opened 14 years ago

Last modified 13 years ago

#152 closed enhancement

configure flappserver apps with .tac file? — at Initial Version

Reported by: Brian Warner Owned by:
Priority: major Milestone: undecided
Component: usability Version: 0.4.1
Keywords: Cc:

Description

It might be easier and more flexible to configure the flappserver's applications by writing out a .tac-like file (which instantiates a Service and assigns it to a well-known variable), rather than our current practice of writing a series of lines (including one repr() of a tuple) out to a text file. At least it would be easier to read the resulting file, so that when you look at an existing flappserver, you can figure out what it was supposed to do.

The app setup code should have a chance to do some work at "flappserver add" time, in particular to capture the cwd and file-permission mode, and to validate the arguments somewhat. But the later app-instantiation code should also get to do some work: upgrades to the code should not always require re-adding the app. So I'm not sure what exactly should be written into the .tac file: a literal argv array, a JSON dictionary of semi-processed arguments, or a pickled usage.Options instance. It may be sufficient to just write key=value pairs into the file, instead of positional arguments.

I'd also like to think about plugins here: how much work is necessary to start using a new app type (one which does not ship with foolscap)? The app directory could contain an .egg file, or the appserver could have a shared directory that is always added to PYTHONPATH.

Change History (0)

Note: See TracTickets for help on using tickets.