Recent changes to 82: Transaction Monitoring and Controlhttp://sourceforge.net/p/webware/patches/82/2007-10-03T03:25:03ZTransaction Monitoring and Control2007-10-03T03:25:03Z2007-10-03T03:25:03ZSteve Schwarzhttp://sourceforge.net/u/saschwarz/http://sourceforge.netfcd61b22103dd9d1a2b3ad45dc2d9b63aaa7425b<div class="markdown_content"><p>Hi,<br />
I've been running a local patch for a couple weeks now with following features:</p>
<p>1 - Added two methods to ThreadedAppServer: startRequest() and endRequest() methods. These methods can be used to implement page statistics and/or click tracking by session. Default implementation supports feature 2 below.</p>
<p>2 - Allow real time monitoring of the requests being processed by each thread. A new ThreadControl page has been added to the Admin context. Setting 'TrackThreads' to True in AppServer.config enables this feature. If the supplied thread2.py module is loaded requests can be cancelled via this page.</p>
<p>3 - Support automatically cancelling requests taking more than a configurable amount of time. Setting 'CancelLongRequests' to the number of seconds after which a request should be cancelled in the AppServer.config file enables this feature. This feature also requires 'TrackThreads' to be enabled.</p>
<p>The patch is relatively small, if there is interest in looking at these changes and moving them into the mainline I'd be happy to forward them to anyone interested. Of course, comments and suggestions are very welcome.</p>
<p>The performance penalty for feature 1 is the cost of some accessors into the current transaction, a couple time() calls and two function calls. I would guess these changes should have a negligible impact on performance.</p>
<p>Features 2 and 3 use a new class which is basically a locked dictionary. So the cost is two additional mutex lock/unlocks for each transaction. If WebKit didn't support adding/removing threads dynamically that mutex could be removed and the additional overhead is some dictionary accesses.</p>
<p>I'd be happy to get feedback on these enhancements.</p>
<p>Thanks,<br />
Steve</p></div>