https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35920

--- Comment #34 from David Cook <[email protected]> ---
I suppose the only question is whether all background jobs have to be scheduled
tasks. 

If so, then that does eliminate some of the speed/performance advantages of
RabbitMQ, because it would be captive to the task scheduler that polls the
database based on a slow interval.

Of course, the task scheduler does not have to poll the database - the task
scheduler I wrote for bug 10662 was reachable by Unix socket from the Koha
backend. It could easily handle tasks scheduled for ASAP/now() or the future.

If we did that, we get back to the message passing. For RabbitMQ, you'd just
send the message to the broker. Easy. For the DB, do we communicate with a
background_jobs.pl daemon? Do we set something special in the DB, so that
background_jobs.pl can poll for it? Currently, it sounds like you'd want to
fork the worker processes from there? Because if everything is forked from the
1 parent, it's easier to manage?

I understand the appeal of putting all the code into 1 monolithic daemon, but
it's also the most custom non-standard way of doing it. 

And I suppose here it would actually be 2 monolithic daemons? Because
background_jobs_worker.pl and es_indexer_daemon.pl would both be their own
schedulers, message passers, workers. 

--

In an ideal world, we'd have a task scheduler daemon, RabbitMQ as the message
broker, and then the worker daemons. Koha would schedule tasks, the task
scheduler would pass the message at the appropriate time, and then the workers
would consume the message. 

Everything would just be doing its own function using only the system resources
that they need. And you could scale up/scale down as necessary depending on the
size of your installation.

This is a pattern that other systems use, and I think it's easy to understand.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to