Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Resque Laravel Package

catch-of-the-day/php-resque

Redis-backed background job queue for PHP (Resque port). Enqueue jobs onto one or more prioritized queues and process them with distributed workers. Supports forking for leak resilience, failure handling, optional job status tracking, and setUp/tearDown hooks.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Background Processing: Enables asynchronous execution of non-critical tasks (e.g., email sends, report generation, data processing) to improve user experience and system responsiveness.
  • Scalability: Distributes workload across multiple workers/machines, reducing server load spikes and enabling horizontal scaling.
  • Job Prioritization: Supports multi-queue systems with configurable priority (e.g., critical vs. low-priority tasks) to optimize resource allocation.
  • Build vs. Buy: Avoids reinventing a Redis-backed job queue system, leveraging a battle-tested Ruby port for PHP.
  • Roadmap: Foundational for future features like job retries, delayed execution, or integration with monitoring tools (e.g., Resque Web UI via custom extensions).
  • Use Cases:
    • Batch Processing: Large data transformations (e.g., CSV imports, API syncs).
    • User Notifications: Delayed emails/SMS without blocking HTTP requests.
    • Scheduled Tasks: Time-based jobs (e.g., nightly analytics) via cron-triggered workers.
    • Microservices: Decoupling services by offloading heavy tasks to workers.

When to Consider This Package

  • Adopt if:
    • Your stack is PHP + Redis and you need a lightweight, Redis-backed job queue.
    • You prioritize simplicity over advanced features (e.g., no built-in dashboard; UI must be custom-built).
    • Your jobs are stateless or can be retried on failure (no persistent job storage beyond Redis).
    • You’re comfortable with forking processes (PHP’s pcntl extension required for workers).
    • You need basic job tracking (status polling via tokens) but not real-time monitoring.
  • Look elsewhere if:
    • You require GUI monitoring (consider Resque Web + custom PHP integration or Supervisor).
    • Your jobs need persistent storage (e.g., database-backed retries; see Laravel Queues).
    • You’re on PHP < 5.3 or lack Redis support.
    • You need distributed locking or advanced scheduling (e.g., cron-like triggers; consider Laravel Task Scheduling).
    • Your team lacks DevOps expertise to manage worker processes (forking, signals, logging).

How to Pitch It (Stakeholders)

For Executives: "This package lets us offload slow, non-critical tasks (like sending emails or processing large files) to background workers, making our app faster and more scalable. It’s like hiring extra hands to handle busywork while our main team focuses on serving users. It’s open-source, lightweight, and integrates seamlessly with our existing PHP/Redis stack—no new infrastructure needed. We can start with basic features and add monitoring later if required."

For Engineers: *"php-resque is a direct port of Ruby’s Resque, giving us a battle-tested, Redis-backed job queue for PHP. Key benefits:

  • Simple API: Define jobs as classes with a perform() method; enqueue with one line.
  • Worker Scaling: Spin up multiple workers (horizontally scalable) via COUNT env var.
  • Job Lifecycle: Built-in setUp/tearDown, status tracking (waiting/running/failed/complete), and failure handling.
  • Extensible: Hook into events (e.g., beforePerform, onFailure) for custom logic or logging.
  • No Lock-in: Uses standard Redis keys; easy to migrate or replace later.

Trade-offs:

  • No built-in UI (but we can integrate Resque Web or build a simple one).
  • Requires pcntl for forking (check PHP config).
  • Best for short-lived jobs; long-running tasks may need process management (e.g., Supervisor).

Next Steps:

  1. Proof of Concept: Queue a non-critical task (e.g., sending a welcome email) and verify it works.
  2. Worker Setup: Test multi-worker deployment and failure scenarios.
  3. Monitoring: Add basic logging (via VERBOSE) and explore custom status tracking.
  4. Scale: Benchmark performance under load and adjust worker counts.

Alternatives Considered:

  • Laravel Queues: Overkill if not using Laravel; adds framework dependency.
  • Beanstalkd: Simpler but lacks Redis features (e.g., priorities, persistence).
  • Custom Solution: Reinventing Resque would take weeks; this is a weekend project with years of Ruby testing behind it."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony