Hi Folks,
I am interested in implementing a timer to check that an external event completes within a certain amount of time. Basically it would work like this: 1. A status record is inserted into the MarkLogic database with the state is set to START and the datetime set to the current-dateTime(). 2. The external process is started. 3. A timeout period is determined based on some criteria in the record being processed. The more rows of content, the longer the timeout. 4. A timer is started and fires after the timeout period. The ID of the status record is supplied to the timer. 5. When the timer fires, it checks to see if the state is still set to START, in which case the necessary processing takes place to report a timeout and to either kill the external process or to ignore it just in case it should complete after the timeout. I'm wondering if I can automate programming of a scheduled task to accomplish this. I would need to be able to delete the scheduled task and also I need to be able to queue up as many concurrently scheduled tasks as possible depending on usage which is TBD. However, I would like to get an idea what kind of performance I can expect from the task scheduler and how many timer tasks can be concurrently scheduled? Alternatively I can probably fire an event every couple of minutes to check every stats record for a timeout, but I don't want to take up too much bandwidth processing a regularly scheduled event. Granted if the system is heavily utilized, then it may be optimal to fire an event every couple of minutes to check every stats record for a timeout. Any recommendations or experience on the subject? Thank you! Tim Meagher
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
