[Kolab-devel] event triggered freebusy data generation

hede kolab983 at der-he.de
Tue Feb 25 20:34:27 CET 2014


Hi,

I asked for documentation to the kolabs freebusy system on the users list. If it is really needed to run a cron job every x minutes to generate the data (kolab-freebusyd). 

I didn't find any configuration option to let the freebusy data get generated on demand and because no one answered, I implemented it myself, in "my way. (The "my way" means I expect it to be an ugly hack and not accepted upstream. I'm pretty sure there are better ways to implement this. At least my chosen names will hurt any english native speaker...)

Instead of running kolab-freebusyd every x minutes, for my use-case it's better to start it on demand. So I do so. The freebusy web script triggers kolab-freebusyd to regenerate and aggregate the data for the corresponding user, if needed, e.g. if the cached ifb-file is too old. If it's not too old, the old one gets used and no kolab-freebusyd is triggered. This way even on high load systems it won't hurt to use this (with a triggertime of 900 it would be like a regular cron job every 15 minutes).

This patch adds two new config-options for [directory] type ldap and type static with fbsource of type "file": triggertime and trigger. With this I can configure how old the ifb file must be to get regenerated (in seconds), which value is forwarded to kolab-freebusyd and if its triggered at all or simply using the old style. (Yes, it's backwards compatible; if "trigger" is not set, it behaves as without the patch)

See attached patch. I've added my config.ini as an example.
(the patch uses /lib/Kolab as base directory, it won't apply in the source directories root)

Everything using the "kolab-freebusy" web service should trigger the generation. I tested roundcube and kontact so far. Clients using the imap Freebusy-folder won't trigger anything. That's the drawback.

Btw: Why differ between aggregate and regenerate? And why generate inside imap and not directly to /var/lib/kolab-freebusy/? Are there plans to get rid of the ifb-files and use imap instead?

Regards
hede
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config.ini
URL: <http://lists.kolab.org/pipermail/devel/attachments/20140225/85a4cc05/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: event_triggered_freebusy.patch
Type: text/x-patch
Size: 3097 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/devel/attachments/20140225/85a4cc05/attachment.bin>


More information about the devel mailing list