[RCD] keep-alive changes
alec at alec.pl
Tue May 1 12:49:12 CEST 2012
Digging into session issues I've found this keep-alive thing a little
bit overcomplicated and unclear. The keep-alive setting handles two
things: session keeping and new-mail checking. Some plugins also bind to
keep-alive to do some recurring actions (e.g. to display calendar
I think we should split these functionalities. So keep-alive action
should be used only for session keeping. In such case we need to execute
keep-alive action only after some inactivity time (e.g. session_lifetime
- 1min [or 5%]). It means timer should be resetted on every reequest.
Also it means we don't need a separate config option, because the
interval would be calculated from session_lifetime. For
session_lifetime=0 there would be no keep-alive requests.
Another thing is recurring check for new-mail. This would work as is,
but... see below.
Last but not least. We should provide some "global" recurring action
which would work across all tasks so, plugins could bind to it. One
"global" action to minimize session race-conditions when few plugins
will create their own recurring requests on the same time. In mail task
we could "bind" our check-recent action to this global action.
In my opinion this would be a much clearer solution and would give as
some additional possibilities:
- possibility to disable recurring checks (for new mail etc.) at all,
- better overall performance because keep-alive out of mail task will be
executed less frequently
I think also, we could rename keep_alive option description ("Check for
new messages on") into something like "Update system state (check for
new mail, etc.) on", and move it to User Interface section, so we could
use it as our global action interval.
ps. I'm not sure we should change draft auto-save interval in any way to
fit into this. For simplicity would be nice to use the same global
action and its interval.
Aleksander 'A.L.E.C' Machniak
LAN Management System Developer [http://lms.org.pl]
Roundcube Webmail Developer [http://roundcube.net]
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
More information about the dev