Quoted:
“…but our perception and wall-clock timing tells us there
is at least a 300% increase in speed, if not more.”
-Dan Miser
DistribuCon
is at least a 300% increase in speed, if not more.”
-Dan Miser
DistribuCon
I don’t recall mentioning the ISAPIThreadPool unit here and
recently Allen pointed out a Borland public newsgroup post
where a customer was talking about the dramatic performance difference between
his PHP application and his Delphi Webbroker application. In the
post he mentioned:
to have high speed I have pooled connections using a threadvar,
every IIS thread has one datamodule with opened connection
every IIS thread has one datamodule with opened connection
If I understand
this correctly the above is unnecessary and instead this developer should
leverage the ISAPIThreadPool
unit available with Delphi as well as from CodeCentral. The ISAPIThreadPool unit
leverages the technologies discussed in the following documents (also mentioned
in the source code):
- John Vert “Writing
Scalable Applications for Windows NT” - Ruediger Asche “Writing
Windows NT Server Applications in MFC Using I/O Completion Ports” - Gregory Leake “Architecture Decisions for Dynamic Web Applications:
Performance, Scalability, and Reliability” (unfortunately, it appears that this
document is no longer available from MSDN)
A few key points:
- ISAPIThreadPool.pas should be included in your webbroker DPR at the end of
the uses clause as it reimplements GetExtensionVersion, HttpExtensionProc and
TerminateExtension. - This unit is only useful for applications running on Microsoft‘s web server (IIS).
Dan Miser has also mentioned this
unit on his blog. Thanks Dan!