Add batch functionality to queue system

Created on 26 December 2013, over 11 years ago
Updated 8 March 2025, about 2 months ago

Problem/Motivation

Many third party queue services, such as Amazon SQS, bill per request. Thus batching requests, for services that support it, saves on both HTTP requests and service costs.* And service integration modules, such as Amazon Simple Queue System can provide batch methods, but if those methods aren't on the queue interface, it forces client code to test for their presence and provide fallback functionality. In other words, it violates the Liskov Substitution Principle and introduces all the attendant evils of doing that.

* Adding batch support could have the side effect of improving performance for database implementations, too.

Proposed resolution

Add batch functionality to the core interface and implementations.

Remaining tasks

  1. Add batch methods to the queue interface.
  2. Refactor implementations for the new methods.
  3. Add/update automated tests.

User interface changes

n/a

API changes

Add the following methods to QueueInterface and its core implementations:

...and refactor the corresponding single item methods as wrappers around their new multiple item counterparts. ("One is a special case of many.")

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡ΊπŸ‡ΈUnited States traviscarden

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • πŸ‡ΊπŸ‡ΈUnited States traviscarden

    Thank you, @smustgrave. This hasn't affected my work for over a decade at this point, so since it never gained traction, I'm happy to go ahead and close it now.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thanks for checking! Putting the tag back for stats later

Production build 0.71.5 2024