Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Jobs aggregation #550

Open
krhubert opened this issue Aug 22, 2024 · 6 comments
Open

[FEATURE REQUEST] Jobs aggregation #550

krhubert opened this issue Aug 22, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@krhubert
Copy link

I wonder if this feature is on your roadmap.

TL;DR;
Job aggregation allows you to enqueue multiple jobs successively, and have them passed to the Worker together rather than individually. The feature allows you to batch multiple successive operations into one.

You can see the usecase and the original PR:
hibiken/asynq#339

Final docs
https://github.com/hibiken/asynq/wiki/Task-aggregation

@nexovec
Copy link

nexovec commented Aug 22, 2024

Might be a duplicate of #453

@brandur
Copy link
Contributor

brandur commented Aug 22, 2024

This one's WIP and coming very soon.

@bgentry bgentry added the enhancement New feature or request label Aug 22, 2024
@krhubert
Copy link
Author

Let me close this one since it's a duplicate.

@bgentry
Copy link
Contributor

bgentry commented Aug 23, 2024

@krhubert actually I wonder if you might be able to provide some more context on how you’re looking to use job aggregation / grouping / batching? I’ve read your linked issue on Asynq, not sure if that reflects your current use case. Mostly curious what timeframe you’re looking to batch over, whether and how you’re wanting to partition your batches, etc.

@bgentry bgentry reopened this Aug 23, 2024
@krhubert
Copy link
Author

krhubert commented Aug 23, 2024

@bgentry I'm unsure if I can share details in the public discussion, but I can give more specific overview in the private conversation. I can hop on a call to talk or join slack/discord if you have some. Let me know if that is something you are interested in.

Mostly curious what timeframe you’re looking to batch over,

My usecase is very different from what I shared in the issue, although the aggregate feature described in the issue solves the problem.

The timeframe I use right now:

  1. Grace Period - 5 min
  2. Max Delay - 15 min

GroupGracePeriod: The grace period is renewed whenever a task with the same group key is added to the group
GroupMaxDelay: The grace period has a configurable upper bound, user can optionally set maximum delay, after which Asynq will deliver the tasks to Handler regardless of the remaining grace period

whether and how you’re wanting to partition your batches, etc.

I don't partition them - If we think about the same partitioning - because to me it can happen before adding a job, and after aggregation.

I know this context might not give you full visibility.

@bgentry
Copy link
Contributor

bgentry commented Aug 23, 2024

whenever a task with the same group key is added to the group

I think this maybe hints at what I was asking about partitioning. Essentially I'm trying to understand what criteria you want to use to group your jobs, whether it's merely about grouping any jobs of the same kind, or if you want to group on some other attrs.

I also sent you an email to try to connect another way about details you don't wish to post on GitHub. Cheers ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants