Forum OpenACS Development: Re: Toughts on an Event Engine
i see the problem: when you put the chat into the master template then every user/client will become a member of the chat. The back-channel wont be closed, the server can't detect precisely, what connection should be reaped. Sending spaces (as in your changes) is not a good idea either, since one should keep the communication transparent. Furthermore, one has to cleanup not only the stale sockets, but as well the nsv-variables keeping the per-chat context. Doing the sweep over all chat clients for every message does not scale well.
What i have done now is to re-factor the subscriber logic a little to reduce potential code duplication and to call the subscriber sweeper from the (already preexisting) chat sweeper. The chat sweeper has configurable sweepinterval. The changes are in CVS head.
For watching the open files, i would recommend munin , for which i have written a set of plugins  mostly for naviserver, some of these work for aolserer as well. The set of plugins contains as well a monitor for open files to avoid surprises, when one is running out of file-handles (see sample view ).
 git clone git://alice.wu.ac.at/munin-plugins
I am learning a lot about comet and xotcl thanks to you lately, but I have started thinking that maybe I am killing flies with granades here. The kind of notifications I need could also be achieved by the 'notification' package...
Anyway, we had a chance to refresh xotcl comet, so it had been worth something.
At your convenience, let me know about the remaining changes I sent you.