Forum OpenACS Development: Re: Toughts on an Event Engine

Collapse
Posted by Gustaf Neumann on
Dear Antonio,

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 [1], for which i have written a set of plugins [2] 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 [3]).

I did not have the chance yet to look at last javascript/character coding changes.

best regards
-gustaf neumann

[1] http://munin-monitoring.org/
[2] git clone git://alice.wu.ac.at/munin-plugins
[3] https://openacs.org/xowiki/file/naviserver_production_lsof-month.png
[4] http://cvs.openacs.org/changelog/OpenACS?cs=MAIN%3Agustafn%3A20130221123133

Collapse
Posted by Antonio Pisano on
Thanks for having checked and solved the issue properly. Among the various changes, I see you now test the channel by reading instead than by writing... I fell a bit dumb for not having tought about it 😊

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.

Best regards

Antonio