Download the PHP package ride/lib-queue without Composer

On this page you can find all versions of the php package ride/lib-queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lib-queue

Ride: Queue Library

Queue abstraction library of the PHP Ride framework.

Use a queue system for time-consuming tasks.

What's In This Library

QueueJob

The QueueJob interface is for you to implement. It holds the logic to run your task.

Your job implementation will probably need data to work with. Instead of attaching initialized objects to your job, you should attach references to the needed data, like id's. It will make your job smaller to store since id's are easier to serialize then object instances.

When your job is invoked, you should lookup your data, using the references, in the current state instead of the state when the job was queued.

QueueManager

The QueueManager interface is to be implemented for the underlying queue system. This is the facade to the queue system. You can check the status of the system, a queue or a job. It's also used to queue jobs and to update their status.

The QueueJob interface receives the QueueManager when it's invoked. The queue manager should be extended so it can be used by queue jobs to lookup their references.

QueueJobStatus

When you ask information about queue jobs, the QueueManager will return QueueJobStatus instances. This interface is also to be implemented by the underlying queue system.

QueueDispatcher

A QueueJob holds the queue it is in. When you create a job, you might not know about the available queues or their availability. You can use a QueueDispatcher to queue the job. This dispatcher's goal is to select the proper queue for the job and perform the queueing process.

There are 2 dispatchers provided by the library.

SingleQueueDispatcher

The SingleQueueDispatcher is a very simple dispatcher. It's used when you have only one static queue.

RoundRobinQueueDispatcher

The RoundRobinQueueDispatcher is initialized with a number of queues. When this dispatcher queues a job, it will push it to the queue with the least amount of jobs pending.

QueueWorker

A QueueWorker is used to grab jobs from the queue, and invoke them. This work process is most likely a command or daemon which runs in the background. You will need a worker for each queue.

A generic implementation is provided with the GenericQueueWorker class.

Code Sample

Check this code sample to see some possibilities of this library:

Related Modules

You can check the following related modules to this library:

Installation

You can use Composer to install this library.


All versions of lib-queue with dependencies

PHP Build Version
Package Version
Requires ride/lib-common Version ^1.0.0
ride/lib-log Version ^1.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ride/lib-queue contains the following files

Loading the files please wait ....