Basic queue handling
Let's say the user need to execute some heavy code (build a report, or extensive calculations etc.). So, of course it needs to be asynchronous, and we possibly need to store some data about execution status. How?
If it's not user action, but periodic action, Task Manager could be used (RunLegacyTask or Custom task).
If it's an often encountered workflow, then it's Ensemble.
But what about Caché?
I know about job and %SYSTEM.Event class, and I'm interested in different approaches (and code samples) to basic queue handling.
Comments
Take a look at the work queue manager. Tom posted a thread here:
https://community.intersystems.com/post/using-work-queue-manager-process-data-multiple-cores
In Zen applications, you can make use of asynchronous background tasks, but you can only observe one task at a time.
Thank you.
Hi Eduard,
I have some $system.Event examples. Have a look at:
https://community.intersystems.com/post/simple-systemevent-examples
Also, I've just uploaded a very basic WorkMgr example:
https://community.intersystems.com/post/simple-workmgr-example
Depending on what you are trying to achieve you could go one way or the other, or maybe combine them.
Have you thought about uploading this projects on GitHub?
UPD. Nevermind, seen your message about GitHub in another topic.
Hi Eduard,
I've just published the PubSub example in GitHub:
https://github.com/intersystems-ib/cache-iat-pubsub
Queue handling can be an interesting topic. There are several concepts that be discussed like using $system.Events or $sytem.Semaphore (network support), transactions, etc.
Reading it now. Intresting. Thank you.
_____
| LLL |