You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to propose an extension of the library, namely adding the concept of batches of work inside a queue. A batch of work is a grouping of jobs that all need the same processing (hence are in the same queue), but has its own status and progress.
Let's try to give an example. Let's say you implement a server that can do image processing on a large number of images. So users can upload any number of images, and then have them processed by the server. This can be done by multiple users at the same time, but the work that needs to be done is the same for each user. And also you don't know how many users there will be. So it is easiest to have one single queue for this, but how does each user then know that the progress is of their images? With this batch concept, each user would have their own batch and there would be an API to get the progress (stats) of a batch.
Specifically, we are proposing:
Defining a new option batch-name for the yoltq/put function (besides depends-on and id). This option then gets stored in the database in a new attribute :com.github.ivarref.yoltq/batch-name. Similar to the queue name, the batch name would be a keyword (or do you think a string would make more sense?)
Defining a new function batch-stats which returns a filtered version of queue-stats, with the following signature:
(defn batch-stats [qname batch-name] ...)
We are working on this at the moment and would very much appreciate your feedback and thoughts on specific choices.
The text was updated successfully, but these errors were encountered:
svdo
added a commit
to Viduet-EU/yoltq
that referenced
this issue
Jun 14, 2024
Thanks for yoltq, this is a great library!
We want to propose an extension of the library, namely adding the concept of batches of work inside a queue. A batch of work is a grouping of jobs that all need the same processing (hence are in the same queue), but has its own status and progress.
Let's try to give an example. Let's say you implement a server that can do image processing on a large number of images. So users can upload any number of images, and then have them processed by the server. This can be done by multiple users at the same time, but the work that needs to be done is the same for each user. And also you don't know how many users there will be. So it is easiest to have one single queue for this, but how does each user then know that the progress is of their images? With this batch concept, each user would have their own batch and there would be an API to get the progress (stats) of a batch.
Specifically, we are proposing:
batch-name
for theyoltq/put
function (besidesdepends-on
andid
). This option then gets stored in the database in a new attribute:com.github.ivarref.yoltq/batch-name
. Similar to the queue name, the batch name would be a keyword (or do you think a string would make more sense?)batch-stats
which returns a filtered version ofqueue-stats
, with the following signature:We are working on this at the moment and would very much appreciate your feedback and thoughts on specific choices.
The text was updated successfully, but these errors were encountered: