Forum OpenACS Development: Re: cache statistics
The asynchrounous background delivery requires a small patch (2 changes, one is a backport from naviserver) and the tcl thread library (by zoran). The application code is in XOTcl is only a few lines of code and is included in xotcl-core (bgdelivery-procs.tcl).
One needs the following patch to aolserver 4.0.10
with this patch and xotcl-core, you can replace
ns_returnfile 200 $mime_type $filename
ad_returnfile_background 200 $mime_type $filename
e.g. in cr_write_content in acs-content-repository/tcl/revision-procs.tcl
to activate it and to deliver files from the content-repository (file-store) in the background.
The connection thread is only used for permission management, localization of the file and writing the the reply header, the actual delivery of the file is performed via asychronous io without using up many resources. This can handle probably a couple of thousand concurrent file deliveries without running out of resources.
Btw, the streaming variety of the xowiki chat uses the same infrastructure to implement synchronous chats without polling.
That's cool stuff. Neophytos uses this on phigita.net since at least half a year and is as well very happy with it.
What about this patch on Aolserver 4.5?