durusmail: quixote-users: Re: rtemplate: utility for reloading changed PTL files
rtemplate: utility for reloading changed PTL files
2003-12-06
Re: rtemplate: utility for reloading changed PTL files
2003-12-06
2003-12-06
2003-12-06
2003-12-06
Re: rtemplate: utility for reloading changed PTL files
2003-12-07
Re: rtemplate: utility for reloading changed PTL files
2003-12-07
Re: rtemplate: utility for reloading changed PTL files
2003-12-08
2003-12-07
2003-12-08
2003-12-06
Re: rtemplate: utility for reloading changed PTL files
2003-12-08
Re: rtemplate: utility for reloading changed PTLfiles
2003-12-08
2003-12-08
Re: rtemplate: utility for reloading changed PTL files
Graham Fawcett
2003-12-07
Greg Ward wrote:
 > On 06 December 2003, Graham Fawcett said:
 >
 >>Attached is a utility module that lets you "wrap" a PTL module in a proxy
 >>that will reload itself automatically if the source file changes. Since
 >>reloading is only done on modules that you wrap explicitly, there should be
 >>a minimum of side-effects.
 >
 >
 > Yep, I definitely like it.  Simple, explicit, and most importantly,
 > non-magical.  I would add a proviso to the docs that module reloading is
 > sometimes useful, but impossible to implement correctly for all cases.
 > Still, if this hack works 70% or 80% of the time, it's worth adding to
 > Quixote.
 >

Thanks, Greg. Good idea about the documentation change. And I'd be happy to see
it added to Quixote if there's sufficient consensus.


 > I would rename the module to quixote.reloadable.  (A module that
 > provides one primary class should be named after that class.)  (Although
 > arguably the class could be better named: Reloader?  ReloadProxy?)

Yes, I'm not sure either. Originally it was ReloadableTemplate (hence the
module name, rtemplate), but that's not really accurate either. I like
Reloader, but perhaps it should be something more specific to modules?

 >
 > Graham, what execution mechanism have you used this with -- SCGI?
 > FastSCGI? mod_python? other?  I'll give it a try with FastCGI and see
 > how it works.


Thanks for testing it. I use Medusa almost exclusively -- I find that it
performs very well, and have had no surprises with it. I play with Twisted
sometimes, and did write a Quixote handler for it, though I don't know if
anyone's actually using it. I should probably give it a try with the Reloadable
class just to be on the safe side.

Martin, your comments about CGI are well-taken, though I suspect it wouldn't
work well in my own case. (I'm using ZODB on the back-end, and though I've
never tried it with CGI, I imagine the latency of my app would become
unbearable even for development use.)

Regards,

-- Graham




reply