On May 30, 9:23 pm, henk-jan ebbers <
eppye.b...@gmail.com> wrote:
> hi Mike,
>
> very interesting.
>
> what exactly is the difference with a scheduler? a scheduler just runs, without queue?
Yes, a scheduler (Windows task scheduler, Unix cron) just runs a
process. In the PC/server world, there does not seem to be any concept
of queues or batch processing. Every process just runs, and the OS
manages multitasking. The AS/400 has a scheduler too, but jobs go from
the scheduler to a queue to be run when resource is available. In a
well running system the queue never gets long ;-)) There are multiple
queues, and each queue and each job has a priority. So some jobs can
jump ahead. I don't think we need that complexity for bots though!
So with the job queue in bots you can more reliably use task
scheduler / cron etc.
> this might be a very good solution for the 'parallel routes' (when combined with the option to limit the time in a channel).
> (it solves the same problem, doesn't it?)
> why 'parallel routes' have been requested:
> - start a route, and know that it will be run. this is a problem now, because a run can just be discarded (when engine is already running). Might be an idea to introduce 'priority' in the queue.
> - performance: parallel processes can be started, which run on separate processor-cores. This is nice, but AFAIK perfromance is not a problem now (never been reported).
> when thinking about how to implement parallel routes, I have this conceptual problem:
> now I do a global lock (on the database); for my idea I have to introduce other, lower-level locks. Eg locks on routes, channels....this is hard to get right.
It is an alternative to parallel routes, but does not solve every
problem. If you have a performance problem, this will not help it. For
example, a route that takes 30 minutes to process a single very large
file could still hold up other high priority routes. I have seen
several requests like his in the mailing list, but it is not an issue
for me. It does solve the problem of discarded runs, which was my
problem. I still deliberately discard duplicates of already queued
runs.