A system doing house-keeping jobs like removing old backups, stale edit locks, etc.
What I'd like here is something that would not require cron nor a demon, but works behind the scenes per request. Apart from this, you can always call a CLI interface of the house-keeping system doing all the work in one rush (moin-maint).
The idea is to implement this as a FOLDOC:FSM, and yield()ing after small steps (like deleting a backup file). Thus, we can limit the time spent on house.keeping to a few secs, without blocking the httpd slot for too long. The state of the FSM is persisted to a pickle. Behind-the-scenes house-keeping would happen after the page has been flushed to the browser.
Why all this fuss?
- we keep the easy installation (some people already have problems) w/o the need for demons, crob-jobs and stuff
- no unduly load on the system
you can still use a cron setup by calling moin-maint
All this needs file locking, but we need that anyway for other features.
Why not forking into a second process that does the work? This would not slow down the request, that finds the "It's time again" condition true, but would keep the house-keeping code simple and avoid yielding and the FSM, which seams unnatural for the task for me -- FlorianFesti 2003-03-29 12:19:17
Transcend your Linux/POSIX viewpoint. Also, the FSM and yielding makes this stuff TwistedFramework compatible.
I agree with Florian, our viewpoint (at least mine) is Linux/Unix first. I don't care about those who want to use a windows server. They are invited to write a solution that works for them. -- NirSoffer 2004-12-09 21:53:49
Who said that forking does not work on Windows? Forking is expensive in most OS (even on Linux with glibc), though. IMHO a FSM would spend much time on locking and managing the tasks (splitting them into states/transactions, restoring them, etc.) - and it would be too complex for such a task. -- AlexanderSchremmer 2004-12-09 23:54:17